-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
41 lines (35 loc) · 1.09 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Run tests
test:
@echo '🔬 Running tests...'
cargo test --locked
@echo '✅ Tests completed.'
# Run clippy
clippy:
@echo '🔍 Running clippy...'
cargo clippy --all-targets -- -D warnings
@echo '✅ Clippy completed.'
# Run fmt
fmt:
@echo '📐 Running fmt...'
cargo fmt --all -- --check
@echo '✅ Fmt completed.'
# Run codecoverage
tarpaulin:
@echo '👀 Running tarpaulin...'
cargo tarpaulin
@echo '✅ Tarpaulin completed.'
# Run checks required by github repo.
default-flow: fmt clippy test
# Run workspace optimizer
platform := if arch() =~ "aarch64" {"linux/arm64"} else {"linux/amd64"}
image := if arch() =~ "aarch64" {"cosmwasm/rust-optimizer-arm64:0.15.1"} else {"cosmwasm/rust-optimizer:0.15.1"}
optimize:
@echo '🚀 Running build optimizer...'
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
--platform {{platform}} \
{{image}}
@echo '✅ Optimized build completed.'
schema:
./scripts/build_schema.sh