Modernize GitHub actions and declare MSRV #45
Workflow file for this run
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: checks | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # allow manual trigger | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| name: Build and test for ${{matrix.rust}} on ${{matrix.os}} | |
| runs-on: ${{matrix.os}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| rust: | |
| - 1.63 # MSRV from Cargo.toml | |
| - 1.84.1 # pre edition2024 | |
| - 1.87 | |
| - stable | |
| - nightly | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| components: rustfmt, clippy | |
| toolchain: ${{matrix.rust}} | |
| - name: Build lib | |
| run: cargo build --verbose --all-targets --all-features | |
| - name: Run tests | |
| run: cargo test --verbose | |
| - name: fmt | |
| run: cargo fmt --all -- --check | |
| - name: clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings |