From 1ce698c1cf6452b9ab083900eaccc33d91c71f40 Mon Sep 17 00:00:00 2001 From: Ashley Mannix Date: Fri, 10 Jan 2025 10:55:28 +1000 Subject: [PATCH] update rust toolchain before building --- .cargo/config.toml | 2 +- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 152e0b46..8e7c3afd 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,2 @@ -[target.wasm32-wasi] +[target.wasm32-wasip1] runner = "wasmtime" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a657157..428d376e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - name: Install Rust Toolchain - run: rustup default ${{ matrix.channel }}-${{ matrix.rust_target }} + run: rustup update ${{ matrix.channel }}-${{ matrix.rust_target }} && rustup default ${{ matrix.channel }}-${{ matrix.rust_target }} - name: Install cargo-hack run: cargo install cargo-hack @@ -74,6 +74,9 @@ jobs: - name: Checkout sources uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + - name: Install Rust Toolchain + run: rustup update stable + - name: All features run: cargo test --all-features @@ -97,6 +100,9 @@ jobs: - name: Checkout sources uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + - name: Install Rust Toolchain + run: rustup update stable + - name: Examples run: cargo test --manifest-path examples/Cargo.toml @@ -112,6 +118,9 @@ jobs: with: node-version: '20' + - name: Install Rust Toolchain + run: rustup update stable + - name: Install run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh @@ -137,17 +146,20 @@ jobs: - name: Add Wasmtime to path run: echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH - - name: Install wasm32-wasi target - run: rustup target add wasm32-wasi + - name: Install Rust Toolchain + run: rustup update nightly && rustup default nightly + + - name: Install wasm32-wasip1 target + run: rustup target add wasm32-wasip1 - name: Default features - run: cargo test --target wasm32-wasi + run: cargo test --target wasm32-wasip1 - name: Version features - run: cargo test --target wasm32-wasi --features "$VERSION_FEATURES $DEP_FEATURES" + run: cargo test --target wasm32-wasip1 --features "$VERSION_FEATURES $DEP_FEATURES" - name: Fast RNG - run: cargo test --target wasm32-wasi --features "v4 fast-rng" + run: cargo test --target wasm32-wasip1 --features "v4 fast-rng" miri: name: Tests / Miri @@ -156,6 +168,9 @@ jobs: - name: Checkout sources uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + - name: Install Rust Toolchain + run: rustup update nightly + - name: Install Miri run: | rustup toolchain install nightly --component miri @@ -174,6 +189,9 @@ jobs: - name: Checkout sources uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + - name: Install Rust Toolchain + run: rustup update beta + - name: Install Clippy run: | rustup update beta