forked from DA0-DA0/dao-contracts
-
Notifications
You must be signed in to change notification settings - Fork 2
/
justfile
executable file
·72 lines (59 loc) · 2.76 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
67
68
69
70
71
72
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
test-tube:
cargo test --features "test-tube"
test-tube-dev: workspace-optimize
cargo test --features "test-tube"
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
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:v15.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
workspace-optimize:
#!/bin/bash
if [[ $(uname -m) == 'arm64' ]]; then docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
--platform linux/arm64 \
cosmwasm/workspace-optimizer-arm64:0.14.0; \
elif [[ $(uname -m) == 'aarch64' ]]; then docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
--platform linux/arm64 \
cosmwasm/workspace-optimizer-arm64:0.14.0; \
elif [[ $(uname -m) == 'x86_64' ]]; then docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
--platform linux/amd64 \
cosmwasm/workspace-optimizer:0.14.0; fi