CI #1236
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: | |
pre_ci: | |
uses: dtolnay/.github/.github/workflows/pre_ci.yml@master | |
test: | |
name: Rust nightly | |
needs: pre_ci | |
if: needs.pre_ci.outputs.continue | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
- run: cargo test --release | |
windows: | |
name: Windows | |
needs: pre_ci | |
if: needs.pre_ci.outputs.continue | |
runs-on: windows-latest | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Add clang path to $PATH env | |
run: echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- run: cargo test --release | |
# Clang 13 does not understand Microsoft Visual Studio 2022's standard | |
# library implementation. It's worked fine against older MSVC so | |
# hopefully this job will start working again at some point. | |
# "cannot mangle this dependent-length array yet" | |
# "cannot mangle this template type parameter type yet" | |
continue-on-error: true | |
macos: | |
name: macOS | |
needs: pre_ci | |
if: needs.pre_ci.outputs.continue | |
runs-on: macos-latest | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: cargo test --release | |
check: | |
name: Rust ${{matrix.rust}} | |
needs: pre_ci | |
if: needs.pre_ci.outputs.continue | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [beta, stable, 1.56.0] | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{matrix.rust}} | |
- run: cargo check | |
minimal: | |
name: Minimal versions | |
needs: pre_ci | |
if: needs.pre_ci.outputs.continue | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
- run: cargo generate-lockfile -Z minimal-versions | |
- run: cargo check --locked | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@clippy | |
- run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic | |
outdated: | |
name: Outdated | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/install@cargo-outdated | |
- run: cargo outdated --workspace --exit-code 1 |