ci: fix ci yet again #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: format bump-scope | |
run: cargo fmt --all -- --check | |
- name: format fuzzing-support | |
run: cd crates/fuzzing-support && cargo fmt --all -- --check | |
- name: format inspect-asm | |
run: cd crates/inspect-asm && cargo fmt --all -- --check | |
- name: format test-fallibility | |
run: cd crates/test-fallibility && cargo fmt --all -- --check | |
- name: format fuzz | |
run: cd fuzz && cargo fmt --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust_channel: ["1.64.0", "stable", "nightly"] | |
features: ["--no-default-features"] | |
tests: [""] | |
include: | |
- rust_channel: "nightly" | |
features: "--all-features" | |
tests: "--tests" | |
exclude: | |
- rust_channel: "nightly" | |
tests: "" | |
steps: | |
- name: install rustup | |
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal | |
- name: install rust | |
run: rustup toolchain install ${{matrix.rust_channel}} --component clippy && rustup default ${{matrix.rust_channel}} | |
- uses: actions/checkout@v4 | |
- name: cargo clippy (without features) | |
run: cargo clippy --all ${{matrix.tests}} | |
- name: cargo clippy (with features) | |
run: cargo clippy --all ${{matrix.tests}} ${{matrix.features}} | |
clippy-benches: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install rustup | |
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal | |
- name: Install rust nightly | |
run: rustup toolchain install nightly --component clippy && rustup default nightly | |
- uses: actions/checkout@v4 | |
- name: Check that benches build | |
run: cargo clippy --benches --all-features | |
test: | |
runs-on: ubuntu-latest | |
env: | |
MIRIFLAGS: "-Zmiri-strict-provenance" | |
steps: | |
- name: install rustup | |
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain nightly -y | |
- name: install miri | |
run: rustup toolchain install nightly --allow-downgrade --profile minimal --component miri | |
- uses: actions/checkout@v4 | |
- name: test | |
run: cargo test --all-features | |
- name: miri test | |
run: cargo miri test --all-features | |