CI #1734
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] | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{matrix.rust}} | |
- run: cargo check | |
solution: | |
name: Project ${{matrix.project}} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
project: [builder, debug, seq, sorted, bitfield] | |
env: | |
GIT_COMMITTER_EMAIL: [email protected] | |
GIT_COMMITTER_NAME: proc-macro-workshop CI | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
- uses: dtolnay/install@cargo-outdated | |
- run: git fetch origin --unshallow refs/solution/${{matrix.project}} HEAD | |
- run: git rev-parse FETCH_HEAD | |
- run: git rebase HEAD FETCH_HEAD | |
- name: Work around https://github.com/kbknapp/cargo-outdated/issues/402 | |
run: sed -i '2i rust-version = "1.77"' Cargo.toml | |
- run: cargo test | |
working-directory: ${{matrix.project}} | |
- run: cargo outdated --exit-code 1 | |
working-directory: ${{matrix.project}} | |
if: github.event_name != 'pull_request' |