Skip to content

Commit

Permalink
build: use Rust 1.79.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bidzyyys committed Aug 27, 2024
1 parent d4f57e6 commit 7ef518e
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
6 changes: 2 additions & 4 deletions .github/workflows/gas-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
2 changes: 2 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "1.79.0"
3 changes: 1 addition & 2 deletions scripts/bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions scripts/check-wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions scripts/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "*"

0 comments on commit 7ef518e

Please sign in to comment.