CI #710
This file contains hidden or 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: CI | |
| on: | |
| pull_request: | |
| push: | |
| schedule: | |
| - cron: '53 1 * * *' # *-*-* 01:53:00 UTC | |
| permissions: | |
| contents: read | |
| env: | |
| RUST_BACKTRACE: full | |
| # Workaround: https://github.com/rust-lang/rust/issues/113436 | |
| RUSTFLAGS: -Dwarnings -Aimproper-ctypes-definitions | |
| jobs: | |
| test: | |
| name: Rust ${{matrix.rust}} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust: [nightly, beta, stable] | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: | | |
| rustup update --no-self-update ${{ matrix.rust }} | |
| rustup default ${{ matrix.rust }} | |
| - name: Enable type layout randomization | |
| run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV | |
| if: matrix.rust == 'nightly' | |
| - run: cargo test --workspace | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust stable | |
| run: | | |
| rustup update --no-self-update stable | |
| rustup default stable | |
| - run: | | |
| cargo clippy --workspace --tests -- -Dclippy::all -Dclippy::pedantic | |
| miri: | |
| name: Miri | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust nightly | |
| run: | | |
| rustup update --no-self-update nightly | |
| rustup default nightly | |
| rustup component add miri | |
| # Miri is only run on the main crate. | |
| # Workaround: `abi_stable` is disabled. It breaks rustc now. | |
| # See https://github.com/rust-lang/rust/issues/113900 | |
| - run: cargo miri test | |
| env: | |
| MIRIFLAGS: -Zmiri-strict-provenance | |
| minimal: | |
| name: MSRV 1.56 | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: | | |
| rustup update --no-self-update nightly | |
| rustup default 1.56 | |
| - run: cargo +nightly generate-lockfile -Z minimal-versions | |
| - run: cargo check --locked |