Reduce cargo-build-test.sh
This commit is contained in:
parent
99236f4311
commit
eafa215c0d
|
@ -128,7 +128,7 @@ jobs:
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: programs
|
name: programs
|
||||||
path: "*.so"
|
path: "target/deploy/*.so"
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
js-test-token:
|
js-test-token:
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")/.."
|
||||||
cd ..
|
|
||||||
|
|
||||||
source ./ci/rust-version.sh stable
|
source ./ci/rust-version.sh stable
|
||||||
source ./ci/solana-version.sh install
|
source ./ci/solana-version.sh install
|
||||||
|
@ -12,26 +11,27 @@ export RUSTBACKTRACE=1
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
# For all BPF programs
|
# Build/test all BPF programs
|
||||||
for Xargo_toml in $(git ls-files -- '*/Xargo.toml'); do
|
cargo +"$rust_stable" test-bpf -- --nocapture
|
||||||
program_dir=$(dirname "$Xargo_toml")
|
|
||||||
|
|
||||||
if [ "$program_dir" == "token-swap/program" ]; then
|
|
||||||
address="SwaPpA9LAaLfeLi3a68M4DjnLqgtticKg6CnyNwgAC8"
|
|
||||||
SWAP_PROGRAM_OWNER_FEE_ADDRESS="$address" cargo build-bpf \
|
|
||||||
--manifest-path=token-swap/program/Cargo.toml \
|
|
||||||
--dump --features production
|
|
||||||
mv target/deploy/spl_token_swap.so target/deploy/spl_token_swap_production.so
|
|
||||||
fi
|
|
||||||
|
|
||||||
cargo +"$rust_stable" test-bpf --manifest-path="$program_dir"/Cargo.toml -- --nocapture
|
|
||||||
done
|
|
||||||
|
|
||||||
|
# Build/test all host crates
|
||||||
cargo +"$rust_stable" build
|
cargo +"$rust_stable" build
|
||||||
cargo +"$rust_stable" test -- --nocapture
|
cargo +"$rust_stable" test -- --nocapture
|
||||||
|
|
||||||
|
# Run test-client sanity check
|
||||||
cargo +"$rust_stable" run --manifest-path=utils/test-client/Cargo.toml
|
cargo +"$rust_stable" run --manifest-path=utils/test-client/Cargo.toml
|
||||||
|
|
||||||
|
# client_ristretto isn't in the workspace, test it explictly
|
||||||
cargo +"$rust_stable" test --manifest-path=themis/client_ristretto/Cargo.toml -- --nocapture
|
cargo +"$rust_stable" test --manifest-path=themis/client_ristretto/Cargo.toml -- --nocapture
|
||||||
|
|
||||||
|
|
||||||
|
SWAP_PROGRAM_OWNER_FEE_ADDRESS="SwaPpA9LAaLfeLi3a68M4DjnLqgtticKg6CnyNwgAC8" \
|
||||||
|
cargo +"$rust_stable" build-bpf \
|
||||||
|
--manifest-path=token-swap/program/Cargo.toml \
|
||||||
|
--features production \
|
||||||
|
--bpf-out-dir target/deploy-production
|
||||||
|
mv target/deploy-production/spl_token_swap.so target/deploy/spl_token_swap_production.so
|
||||||
|
|
||||||
# # Check generated C headers
|
# # Check generated C headers
|
||||||
# cargo run --manifest-path=utils/cgen/Cargo.toml
|
# cargo run --manifest-path=utils/cgen/Cargo.toml
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue