-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
63 lines (45 loc) · 2.51 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
default: check test
# Development
check:
cargo clippy
test:
cargo test
run-localnode profile="--alice":
cargo xtask run local {{profile}}
# Specs
base_spec_path := "node/specs/base.json"
gen-base-spec:
cargo run -p torus-node --release -- build-spec --chain dev > "{{base_spec_path}}"
gen-spec-file env: gen-base-spec
mkdir -p tmp/spec
node_version=$(cargo run -p torus-node --release -- --version) \
&& scripts/adjust-spec-file.py "{{env}}" "{{base_spec_path}}" \
--balances-file data/torus-genesis-balances.json \
--merge-balances \
--aura-list-file "data/{{env}}/aura.pub.json" \
--gran-list-file "data/{{env}}/gran.pub.json" \
--bootnodes-file "data/{{env}}/bootnodes.json" \
--name "Torus {{env}} $node_version" \
> "tmp/spec/{{env}}.json"
@echo "Spec file generated at: tmp/spec/{{env}}.json"
# Benchmarks
run-benchmarks:
cargo build -r --features runtime-benchmarks
./target/release/torus-node benchmark pallet --pallet pallet_torus0 --chain dev --extrinsic "*" --steps 50 --repeat 20 --output pallets/torus0/src/weights.rs --template=./.maintain/frame-weight-template.hbs
./target/release/torus-node benchmark pallet --pallet pallet_governance --chain dev --extrinsic "*" --steps 50 --repeat 20 --output pallets/governance/src/weights.rs --template=./.maintain/frame-weight-template.hbs
./target/release/torus-node benchmark pallet --pallet pallet_emission0 --chain dev --extrinsic "*" --steps 50 --repeat 20 --output pallets/emission0/src/weights.rs --template=./.maintain/frame-weight-template.hbs
# Runtime Update Testing
install-try-runtime:
cargo install --git https://github.com/paritytech/try-runtime-cli --locked
try-runtime-upgrade-testnet:
cargo build --release --features try-runtime
RUST_BACKTRACE=1 RUST_LOG=info try-runtime --runtime target/release/wbuild/torus-runtime/torus_runtime.compact.compressed.wasm on-runtime-upgrade --blocktime 8000 live --uri wss://api.testnet.torus.network
try-runtime-upgrade-mainnet:
cargo build --release --features try-runtime
RUST_BACKTRACE=1 RUST_LOG=info try-runtime --runtime target/release/wbuild/torus-runtime/torus_runtime.compact.compressed.wasm on-runtime-upgrade --blocktime 8000 live --uri wss://api.torus.network
# Github Actions
run-workflows:
act --secret-file .env \
-P 'ubuntu-24.04-8core-bakunin=ghcr.io/catthehacker/act-ubuntu:24.04' \
-P 'ubuntu-24.04-16core-friedrich=ghcr.io/catthehacker/act-ubuntu:24.04' \
-P 'ubuntu-22.04-32core-karl=ghcr.io/catthehacker/ubuntu:act-22.04'