diff --git a/.github/workflows/check-wasm.yml b/.github/workflows/check-wasm.yml index ca16f313..d420a46b 100644 --- a/.github/workflows/check-wasm.yml +++ b/.github/workflows/check-wasm.yml @@ -25,7 +25,7 @@ jobs: with: target: wasm32-unknown-unknown components: rust-src - toolchain: nightly-2024-01-01 + toolchain: 1.79.0 - uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 22fa1d85..17e0fe89 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -32,7 +32,7 @@ jobs: with: target: wasm32-unknown-unknown components: rust-src - toolchain: nightly-2024-01-01 + toolchain: 1.79.0 - uses: Swatinem/rust-cache@v2 with: @@ -50,6 +50,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 7d572fc4..9f5fcb3d 100644 --- a/.github/workflows/gas-bench.yml +++ b/.github/workflows/gas-bench.yml @@ -25,7 +25,7 @@ jobs: with: target: wasm32-unknown-unknown components: rust-src - toolchain: nightly-2024-01-01 + toolchain: 1.79.0 - uses: Swatinem/rust-cache@v2 with: @@ -40,6 +40,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/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 00000000..628740b1 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.79.0" 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 1f6ce078..d8bc3f2d 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 3a26eacb..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} -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 "*"