-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
61 lines (52 loc) · 1.65 KB
/
Copy pathjustfile
File metadata and controls
61 lines (52 loc) · 1.65 KB
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
# Run all checks
check: check-typos check-toml fmt clippy test
# Check for typos
check-typos:
typos
# Lint TOML files
check-toml:
taplo check
# Format check
fmt:
cargo fmt --all -- --check
# Clippy
clippy:
cargo clippy --workspace -- -D warnings
# Run tests
test:
cargo nextest run --workspace
# Run e2e tests
e2e:
cargo nextest run -p mercury-e2e --run-ignored all
# Build Solana programs from the eureka submodule into target/solana-fixtures/
build-solana-fixtures force="true":
#!/usr/bin/env bash
set -euo pipefail
SRC=external/solidity-ibc-eureka/programs/solana
OUT=target/solana-fixtures
PROGS=(ics26_router ics07_tendermint access_manager test_ibc_app)
if [ "{{force}}" != "true" ]; then
all_present=true
for prog in "${PROGS[@]}"; do
[ -f "$OUT/${prog}.so" ] && [ -f "$OUT/${prog}-keypair.json" ] || { all_present=false; break; }
done
if $all_present; then
echo "Solana fixtures already present at $OUT — skipping build"
exit 0
fi
fi
mkdir -p "$OUT"
(cd "$SRC" && anchor build)
for prog in "${PROGS[@]}"; do
cp "$SRC/target/sbf-solana-solana/release/${prog}.so" "$OUT/${prog}.so"
cp "external/solidity-ibc-eureka/solana-keypairs/localnet/${prog}-keypair.json" "$OUT/${prog}-keypair.json"
done
echo "Solana fixtures staged at $OUT"
# Run the cosmos-solana e2e test end-to-end (builds fixtures automatically if missing)
e2e-cosmos-solana:
cargo test -p mercury-e2e --test cosmos_solana -- --ignored --nocapture
# Format everything
fmt-fix:
cargo fmt --all
taplo fmt
nix fmt -- flake.nix