Skip to content

Commit

Permalink
Split up miri CI job into miri and miri-spec (#1028)
Browse files Browse the repository at this point in the history
* split up miri CI job

* use the GitHub Action CI's job ID for caching params

* remove outdated comment
  • Loading branch information
Robbepop committed May 11, 2024
1 parent af03289 commit ffcd68f
Showing 1 changed file with 56 additions and 27 deletions.
83 changes: 56 additions & 27 deletions .github/workflows/rust.yml
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -93,8 +91,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)
Expand Down Expand Up @@ -137,8 +135,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"
Expand Down Expand Up @@ -174,8 +172,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
Expand All @@ -186,7 +184,7 @@ jobs:
- name: Check uDeps
run: cargo udeps --all-targets

fuzz_translate:
fuzz-translate:
name: Fuzz (Translation)
runs-on: ubuntu-latest
steps:
Expand All @@ -205,8 +203,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
Expand All @@ -219,7 +217,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:
Expand All @@ -237,8 +235,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
Expand All @@ -249,7 +247,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:
Expand All @@ -267,8 +265,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
Expand All @@ -294,12 +292,13 @@ jobs:
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-
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
Expand All @@ -311,6 +310,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 }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-${{ github.job }}-
- 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
Expand All @@ -335,8 +364,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)
Expand Down Expand Up @@ -369,8 +398,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)
Expand Down

0 comments on commit ffcd68f

Please sign in to comment.