ci.yml
This file
Path
.github/workflows/ci.yml
146 lines · 3.7 KiB · YAML
Last changed by
Raise minimum tested compiler to rust 1.88David Tolnaybefore adoptioncfcc279
History of this fileTake it
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147name: CI
on: push: pull_request: workflow_dispatch: schedule: [cron: "40 1 * * *"]
permissions: contents: read
env: RUSTFLAGS: -Dwarnings
jobs: pre_ci: uses: dtolnay/.github/.github/workflows/pre_ci.yml@master
test: name: Rust ${{matrix.rust}} needs: pre_ci if: needs.pre_ci.outputs.continue runs-on: ubuntu-latest strategy: fail-fast: false matrix: rust: [nightly, beta, stable, 1.88.0] timeout-minutes: 45 steps: - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@master with: toolchain: ${{matrix.rust}} components: rust-src - name: Enable type layout randomization run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV if: matrix.rust == 'nightly' - name: Enable nightly-only tests run: echo RUSTFLAGS=${RUSTFLAGS}\ --cfg=anyhow_nightly_testing >> $GITHUB_ENV if: matrix.rust == 'nightly' - run: cargo test - run: cargo check --no-default-features - run: cargo check - uses: actions/upload-artifact@v7 if: matrix.rust == 'nightly' && always() with: name: Cargo.lock path: Cargo.lock continue-on-error: true
build: name: Rust ${{matrix.rust}} needs: pre_ci if: needs.pre_ci.outputs.continue runs-on: ubuntu-latest strategy: fail-fast: false matrix: rust: [1.68.0] timeout-minutes: 45 steps: - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@master with: toolchain: ${{matrix.rust}} components: rust-src - run: cargo check --manifest-path tests/crate/Cargo.toml - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features
minimal: name: Minimal versions needs: pre_ci if: needs.pre_ci.outputs.continue runs-on: ubuntu-latest timeout-minutes: 45 steps: - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@nightly - run: cargo generate-lockfile -Z minimal-versions - run: cargo check --locked
windows: name: Windows needs: pre_ci if: needs.pre_ci.outputs.continue runs-on: windows-latest timeout-minutes: 45 steps: - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@stable with: components: rust-src - run: cargo check
doc: name: Documentation needs: pre_ci if: needs.pre_ci.outputs.continue runs-on: ubuntu-latest timeout-minutes: 45 env: RUSTDOCFLAGS: -Dwarnings steps: - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@nightly with: components: rust-src - uses: dtolnay/install@cargo-docs-rs - run: cargo docs-rs
clippy: name: Clippy runs-on: ubuntu-latest if: github.event_name != 'pull_request' timeout-minutes: 45 steps: - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@nightly with: components: clippy, rust-src - run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
miri: name: Miri needs: pre_ci if: needs.pre_ci.outputs.continue runs-on: ubuntu-latest timeout-minutes: 45 steps: - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@miri - run: cargo miri setup - run: cargo miri test env: MIRIFLAGS: -Zmiri-strict-provenance
outdated: name: Outdated runs-on: ubuntu-latest if: github.event_name != 'pull_request' timeout-minutes: 45 steps: - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@stable - uses: dtolnay/install@cargo-outdated - run: cargo outdated --workspace --exit-code 1