CI #948
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: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| schedule: [cron: "40 1 * * *"] # 1:40 AM each day | |
| permissions: | |
| contents: read | |
| env: | |
| RUSTFLAGS: -Dwarnings | |
| jobs: | |
| test: | |
| name: Rust ${{matrix.rust}} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust: [nightly, beta, stable] | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{matrix.rust}} | |
| - name: Enable type layout randomization | |
| run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV | |
| if: matrix.rust == 'nightly' | |
| - run: cargo test | |
| - uses: actions/upload-artifact@v4 | |
| if: matrix.rust == 'nightly' && always() | |
| with: | |
| name: Cargo.lock | |
| path: Cargo.lock | |
| msrv: | |
| name: Fresh install of MSRV across self (1.61) + latest dependencies (1.68) compiles | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: 1.68 | |
| - run: cargo check | |
| style-check: | |
| name: Style Check | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| components: clippy, rustfmt | |
| toolchain: stable | |
| - run: ./style-check.sh | |
| miri: | |
| name: Miri | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@miri | |
| - run: cargo miri setup | |
| - run: cargo miri test | |
| env: | |
| MIRIFLAGS: -Zmiri-strict-provenance | |
| outdated: | |
| name: Outdated Dependency Check | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'schedule' | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: dtolnay/install@cargo-outdated | |
| - run: cargo outdated --workspace --exit-code 1 |