Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: use Rust 1.79.0 #266

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 "*"
Loading