From 4292bee16528743d72018a990ec4b92920593a5b Mon Sep 17 00:00:00 2001 From: Daniel Bigos Date: Sat, 21 Sep 2024 01:10:59 +0200 Subject: [PATCH] ref: cleanup scripts --- .github/workflows/check-publish.yml | 2 -- .github/workflows/check-wasm.yml | 8 ++------ .github/workflows/e2e-tests.yml | 8 ++------ .github/workflows/gas-bench.yml | 6 +----- scripts/bench.sh | 3 +-- scripts/check-wasm.sh | 4 +--- scripts/e2e-tests.sh | 5 ++--- scripts/nitro-testnode.sh | 2 +- 8 files changed, 10 insertions(+), 28 deletions(-) diff --git a/.github/workflows/check-publish.yml b/.github/workflows/check-publish.yml index 67bbb311..a2252a03 100644 --- a/.github/workflows/check-publish.yml +++ b/.github/workflows/check-publish.yml @@ -23,8 +23,6 @@ jobs: id: toolchain with: target: wasm32-unknown-unknown - components: rust-src - toolchain: nightly-2024-01-01 - uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/check-wasm.yml b/.github/workflows/check-wasm.yml index 8d2c7f7e..b7206e1f 100644 --- a/.github/workflows/check-wasm.yml +++ b/.github/workflows/check-wasm.yml @@ -24,15 +24,11 @@ jobs: id: toolchain with: target: wasm32-unknown-unknown - components: rust-src - toolchain: nightly-2024-07-25 - uses: Swatinem/rust-cache@v2 - name: install cargo-stylus - run: cargo install cargo-stylus@0.5.1 + run: cargo install cargo-stylus@0.5.3 - name: run wasm check - run: | - export NIGHTLY_TOOLCHAIN=${{steps.toolchain.outputs.name}} - ./scripts/check-wasm.sh + run: ./scripts/check-wasm.sh diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 67673109..71bb2fc2 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -31,15 +31,13 @@ jobs: id: toolchain with: target: wasm32-unknown-unknown - components: rust-src - toolchain: nightly-2024-07-25 - uses: Swatinem/rust-cache@v2 with: key: "e2e-tests" - name: install cargo-stylus - run: cargo install cargo-stylus@0.5.1 + run: cargo install cargo-stylus@0.5.3 - name: install solc run: | @@ -50,6 +48,4 @@ jobs: - name: setup nitro node run: ./scripts/nitro-testnode.sh -d -i - name: run integration tests - run: | - export NIGHTLY_TOOLCHAIN=${{steps.toolchain.outputs.name}} - ./scripts/e2e-tests.sh + run: ./scripts/e2e-tests.sh diff --git a/.github/workflows/gas-bench.yml b/.github/workflows/gas-bench.yml index d4d64e38..45b6906c 100644 --- a/.github/workflows/gas-bench.yml +++ b/.github/workflows/gas-bench.yml @@ -24,8 +24,6 @@ jobs: id: toolchain with: target: wasm32-unknown-unknown - components: rust-src - toolchain: nightly-2024-07-25 - uses: Swatinem/rust-cache@v2 with: @@ -40,6 +38,4 @@ jobs: - name: setup nitro node run: ./scripts/nitro-testnode.sh -d -i - name: run benches - run: | - export NIGHTLY_TOOLCHAIN=${{steps.toolchain.outputs.name}} - ./scripts/bench.sh + run: ./scripts/bench.sh diff --git a/scripts/bench.sh b/scripts/bench.sh index 8878daec..9d8e89a1 100755 --- a/scripts/bench.sh +++ b/scripts/bench.sh @@ -5,8 +5,7 @@ MYDIR=$(realpath "$(dirname "$0")") cd "$MYDIR" cd .. -NIGHTLY_TOOLCHAIN=${NIGHTLY_TOOLCHAIN:-nightly} -cargo +"$NIGHTLY_TOOLCHAIN" build --release --target wasm32-unknown-unknown -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort +cargo build --release --target wasm32-unknown-unknown -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort export RPC_URL=http://localhost:8547 cargo run --release -p benches diff --git a/scripts/check-wasm.sh b/scripts/check-wasm.sh index 9ec839dd..6d1c6f84 100755 --- a/scripts/check-wasm.sh +++ b/scripts/check-wasm.sh @@ -22,9 +22,7 @@ get_example_crate_names () { find ./examples -maxdepth 2 -type f -name "Cargo.toml" | xargs grep 'name = ' | grep -oE '".*"' | tr -d "'\"" } -NIGHTLY_TOOLCHAIN=${NIGHTLY_TOOLCHAIN:-nightly} - -cargo +"$NIGHTLY_TOOLCHAIN" build --release --target wasm32-unknown-unknown -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort +cargo build --release --target wasm32-unknown-unknown -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort for CRATE_NAME in $(get_example_crate_names) do diff --git a/scripts/e2e-tests.sh b/scripts/e2e-tests.sh index f7b9cdeb..451c8750 100755 --- a/scripts/e2e-tests.sh +++ b/scripts/e2e-tests.sh @@ -5,10 +5,9 @@ MYDIR=$(realpath "$(dirname "$0")") cd "$MYDIR" cd .. -NIGHTLY_TOOLCHAIN=${NIGHTLY_TOOLCHAIN:-nightly-2024-01-01} -cargo +"$NIGHTLY_TOOLCHAIN" build --release --target wasm32-unknown-unknown -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort +cargo build --release --target wasm32-unknown-unknown -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort export RPC_URL=http://localhost:8547 # We should use stable here once nitro-testnode is updated and the contracts fit # the size limit. Work tracked [here](https://github.com/OpenZeppelin/rust-contracts-stylus/issues/87) -cargo +"$NIGHTLY_TOOLCHAIN" test --features std,e2e --test "*" +cargo test --features std,e2e --test "*" diff --git a/scripts/nitro-testnode.sh b/scripts/nitro-testnode.sh index 815323c2..d7e21133 100755 --- a/scripts/nitro-testnode.sh +++ b/scripts/nitro-testnode.sh @@ -44,7 +44,7 @@ then git clone --recurse-submodules https://github.com/OffchainLabs/nitro-testnode.git cd ./nitro-testnode || exit # `release` branch. - git checkout 8cb6b84e31909157d431e7e4af9fb83799443e00 || exit + git checkout 148b8cb33fb085345d9abdf0ba57d3b67f63499d || exit ./test-node.bash --no-run --init || exit fi