disable cron job #86
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: CI | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
# schedule: [cron: "40 1 * * *"] | |
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, 1.56.0] | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{matrix.rust}} | |
components: rust-src | |
- name: Install nightly | |
if: matrix.rust == '1.56.0' | |
run: rustup toolchain install nightly --profile minimal --no-self-update | |
- name: Generate lockfile | |
if: matrix.rust != '1.56.0' | |
run: cargo update | |
- name: Generate lockfile | |
if: matrix.rust == '1.56.0' | |
# `cargo +1.56 update` is extremely slow, so use `cargo +nightly update` | |
# instead which also uses sparse index by default. | |
# | |
# We also need to ensure it uses minimal version, since newer versions | |
# of dependencies might have higher MSRVs. | |
run: cargo +nightly generate-lockfile -Z minimal-versions | |
- uses: Swatinem/rust-cache@v2 | |
- 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=therror_nightly_testing --cfg=therror_error_generic_member_access >> $GITHUB_ENV | |
if: matrix.rust == 'nightly' | |
- run: cargo test --all | |
minimal: | |
name: Minimal versions | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
- run: cargo generate-lockfile -Z minimal-versions | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo check --locked | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: clippy, rust-src | |
- name: Generate lockfile | |
run: cargo update | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo clippy --no-deps --tests --workspace -- -Dclippy::all -Dclippy::pedantic | |
miri: | |
name: Miri | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@miri | |
- name: Generate lockfile | |
run: cargo update | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-directories: "~/.cache/miri" | |
- run: cargo miri setup | |
- run: cargo miri test | |
env: | |
MIRIFLAGS: -Zmiri-strict-provenance | |
outdated: | |
name: Outdated | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/install@cargo-outdated | |
- run: cargo outdated --workspace --exit-code 1 |