forked from DA0-DA0/dao-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
66 lines (53 loc) · 2.26 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
orc_config := env_var_or_default('CONFIG', '`pwd`/ci/configs/cosm-orc/ci.yaml')
test_addrs := env_var_or_default('TEST_ADDRS', `jq -r '.[].address' ci/configs/test_accounts.json | tr '\n' ' '`)
gas_limit := env_var_or_default('GAS_LIMIT', '10000000')
build:
cargo build
test:
cargo test
lint:
cargo +nightly clippy --all-targets -- -D warnings
gen: build gen-schema
gen-schema:
./scripts/schema.sh
integration-test: deploy-local workspace-optimize
RUST_LOG=info CONFIG={{orc_config}} cargo integration-test
integration-test-dev test_name="":
SKIP_CONTRACT_STORE=true RUST_LOG=info CONFIG='{{`pwd`}}/ci/configs/cosm-orc/local.yaml' cargo integration-test {{test_name}}
bootstrap-dev: deploy-local workspace-optimize-arm
RUST_LOG=info CONFIG={{orc_config}} cargo run bootstrap-env
deploy-local: download-deps
docker kill cosmwasm || true
docker volume rm -f junod_data
docker run --rm -d --name cosmwasm \
-e PASSWORD=xxxxxxxxx \
-e STAKE_TOKEN=ujunox \
-e GAS_LIMIT={{gas_limit}} \
-e MAX_BYTES=22020096 \
-e UNSAFE_CORS=true \
-p 1317:1317 \
-p 26656:26656 \
-p 26657:26657 \
-p 9090:9090 \
--mount type=volume,source=junod_data,target=/root \
ghcr.io/cosmoscontracts/juno:v11.0.0 /opt/setup_and_run.sh {{test_addrs}}
download-deps:
mkdir -p artifacts target
wget https://github.com/CosmWasm/cw-plus/releases/latest/download/cw20_base.wasm -O artifacts/cw20_base.wasm
wget https://github.com/CosmWasm/cw-plus/releases/latest/download/cw4_group.wasm -O artifacts/cw4_group.wasm
wget https://github.com/CosmWasm/cw-nfts/releases/latest/download/cw721_base.wasm -O artifacts/cw721_base.wasm
optimize:
cargo install cw-optimizoor || true
cargo cw-optimizoor Cargo.toml
workspace-optimize:
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 linux/amd64 \
cosmwasm/workspace-optimizer:0.12.11
workspace-optimize-arm:
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 linux/arm64 \
cosmwasm/workspace-optimizer-arm64:0.12.11