Pin dependencies #175
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
| # | |
| # Configuration for GitHub-based CI, based on the stock GitHub Rust config. | |
| # | |
| name: Rust | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - 'rel/**' | |
| pull_request: {} | |
| jobs: | |
| check-style: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461 | |
| - name: Report cargo version | |
| run: cargo --version | |
| - name: Report rustfmt version | |
| run: cargo fmt -- --version | |
| - name: Check style | |
| run: cargo fmt -- --check | |
| # Note that `cargo clippy` includes `cargo check, so this ends up checking all | |
| # of our (default) code. | |
| clippy-lint: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| steps: | |
| # This repo is unstable and unnecessary: https://github.com/microsoft/linux-package-repositories/issues/34 | |
| - name: Disable packages.microsoft.com repo | |
| run: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461 | |
| - uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0 | |
| if: ${{ github.ref != 'refs/heads/main' }} | |
| - name: Report cargo version | |
| run: cargo --version | |
| - name: Report Clippy version | |
| run: cargo clippy -- --version | |
| - name: Run Clippy Lints | |
| run: cargo clippy --all-targets --workspace -- --deny warnings | |
| build: | |
| name: Build and test | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| # This repo is unstable and unnecessary: https://github.com/microsoft/linux-package-repositories/issues/34 | |
| - name: Disable packages.microsoft.com repo | |
| run: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461 | |
| - uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0 | |
| if: ${{ github.ref != 'refs/heads/main' }} | |
| - name: Build all targets with all features | |
| uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1 | |
| with: | |
| command: build | |
| args: --all-targets --all-features | |
| - name: Install latest nextest release | |
| uses: taiki-e/install-action@22ccaeae9b82fcedee0d273f721f2223b6a6ef66 # nextest | |
| - name: Test with latest nextest release | |
| uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1 | |
| with: | |
| command: nextest | |
| args: run --all-features --profile ci | |