From f4c6ae6b7fbaaedc4e3aa83453d998a2dfb759e5 Mon Sep 17 00:00:00 2001 From: Robin Freyler Date: Sat, 11 May 2024 16:15:41 +0200 Subject: [PATCH 1/3] split up miri CI job --- .github/workflows/rust.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7943527867..e972d36eb0 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -294,6 +294,7 @@ jobs: with: path: | ~/.cargo/bin/ + ~/.cargo/bin/cargo-nextest ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ @@ -311,6 +312,36 @@ jobs: run: cargo miri nextest run --target x86_64-unknown-linux-gnu --lib --workspace - name: Miri (--doc) run: cargo miri test --doc --workspace --target x86_64-unknown-linux-gnu + + miri-spec: + name: Miri (spec) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + - uses: dtolnay/rust-toolchain@nightly + with: + components: miri + targets: x86_64-unknown-linux-gnu + - name: Set up Cargo cache + uses: actions/cache@v4 + continue-on-error: false + with: + path: | + ~/.cargo/bin/ + ~/.cargo/bin/cargo-nextest + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + ~/target/ + key: ${{ runner.os }}-cargo-miri-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo-miri- + - name: Checkout Submodules + run: git submodule update --init --recursive + - name: Install cargo-nextest + run: | + # Note: We use `|| true` because cargo install returns an error + # if cargo-nextest was already installed on the CI runner. + cargo install cargo-nextest || true - name: Miri - Wasm Spec Testsuite (store) # We just run the `store.wast` test since running the entire Wasm spec testsuite # simply takes too long to do on every pull request commit. There exists an entire From 82877d877146949b8323a6ab63611b0052e94263 Mon Sep 17 00:00:00 2001 From: Robin Freyler Date: Sat, 11 May 2024 16:21:58 +0200 Subject: [PATCH 2/3] use the GitHub Action CI's job ID for caching params --- .github/workflows/rust.yml | 54 +++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e972d36eb0..57ff0082c7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -30,8 +30,8 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ ~/target/ - key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-build- + key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-${{ github.job }}- - name: Build (default features) run: cargo build --workspace - name: Build (all features) @@ -59,8 +59,8 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ ~/target/ - key: ${{ runner.os }}-cargo-test-asan-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-test-asan- + key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-${{ github.job }}- - name: Checkout Submodules run: git submodule update --init --recursive - name: Show Rust Toolchain @@ -93,8 +93,8 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ ~/target/ - key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-test- + key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-${{ github.job }}- - name: Checkout Submodules run: git submodule update --init --recursive - name: Test (default features) @@ -137,8 +137,8 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ ~/target/ - key: ${{ runner.os }}-cargo-doc-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-doc- + key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-${{ github.job }}- - name: Check Docs env: RUSTDOCFLAGS: "-D warnings" @@ -174,8 +174,8 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ ~/target/ - key: ${{ runner.os }}-cargo-udeps-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-udeps- + key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-${{ github.job }}- - name: Checkout Submodules run: git submodule update --init --recursive - name: Install cargo-udeps @@ -186,7 +186,7 @@ jobs: - name: Check uDeps run: cargo udeps --all-targets - fuzz_translate: + fuzz-translate: name: Fuzz (Translation) runs-on: ubuntu-latest steps: @@ -205,8 +205,8 @@ jobs: ~/fuzz/target/ ~/fuzz/corpus/translate/ ~/fuzz/curpus/translate_metered/ - key: ${{ runner.os }}-cargo-fuzz-translation-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-fuzz-translation- + key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-${{ github.job }}- - name: Checkout Submodules run: git submodule update --init --recursive - name: Install cargo-fuzz @@ -219,7 +219,7 @@ jobs: - name: Fuzz (Translation) + fuel run: cargo fuzz run translate_metered -j 2 --verbose -- -max_total_time=60 # 1 minute of fuzzing - fuzz_execute: + fuzz-execute: name: Fuzz (Execution) runs-on: ubuntu-latest steps: @@ -237,8 +237,8 @@ jobs: ~/target/ ~/fuzz/target/ ~/fuzz/corpus/execute/ - key: ${{ runner.os }}-cargo-fuzz-execution-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-fuzz-execution- + key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-${{ github.job }}- - name: Checkout Submodules run: git submodule update --init --recursive - name: Install cargo-fuzz @@ -249,7 +249,7 @@ jobs: - name: Fuzz (Execution) run: cargo fuzz run execute -j 2 --verbose -- -max_total_time=120 # 2 minutes of fuzzing - fuzz_differential: + fuzz-differential: name: Fuzz (Differential) runs-on: ubuntu-latest steps: @@ -267,8 +267,8 @@ jobs: ~/target/ ~/fuzz/target/ ~/fuzz/corpus/execute/ - key: ${{ runner.os }}-cargo-fuzz-differential-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-fuzz-differential- + key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-${{ github.job }}- - name: Checkout Submodules run: git submodule update --init --recursive - name: Install cargo-fuzz @@ -299,8 +299,8 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ ~/target/ - key: ${{ runner.os }}-cargo-miri-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-miri- + key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-${{ github.job }}- - name: Checkout Submodules run: git submodule update --init --recursive - name: Install cargo-nextest @@ -333,8 +333,8 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ ~/target/ - key: ${{ runner.os }}-cargo-miri-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-miri- + key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-${{ github.job }}- - name: Checkout Submodules run: git submodule update --init --recursive - name: Install cargo-nextest @@ -366,8 +366,8 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ ~/target/ - key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-clippy- + key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-${{ github.job }}- - name: Checkout Submodules run: git submodule update --init --recursive - name: Clippy (default features) @@ -400,8 +400,8 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ ~/target/ - key: ${{ runner.os }}-cargo-coverage-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-coverage- + key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-${{ github.job }}- - name: Checkout Submodules run: git submodule update --init --recursive - name: Run cargo-tarpaulin (default features) From 285f58315815dd7f5137462e17d7bf4d95bdbaf0 Mon Sep 17 00:00:00 2001 From: Robin Freyler Date: Sat, 11 May 2024 16:26:33 +0200 Subject: [PATCH 3/3] remove outdated comment --- .github/workflows/rust.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 57ff0082c7..8dc45fe79e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -76,8 +76,6 @@ jobs: name: Test strategy: matrix: - # windows-latest was pinned to windows-2019 - # because of https://github.com/wasmi-labs/wasmi/runs/5021520759 os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} steps: