ci: name release runs by tag #26
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
| # Rust CI — DAG pipeline. | |
| # | |
| # Architecture: | |
| # | |
| # fmt ──▶ lint (clippy + check) | |
| # | |
| # - fmt: zero-compilation gate (< 10s). | |
| # - lint: clippy + check (shares compile cache). | |
| # - Concurrency group: auto-cancels superseded runs on the same branch/PR. | |
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| # ── Gate: Format ──────────────────────────────────────────────────── | |
| # Zero compilation. Rejects style violations in seconds. | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all --check | |
| # ── Gate: Lint ────────────────────────────────────────────────────── | |
| # Clippy + check in one job (shared compile artifacts). | |
| # Depends on fmt — no point linting unformatted code. | |
| lint: | |
| name: Clippy + Check | |
| needs: [fmt] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Clippy | |
| run: cargo clippy --workspace --all-targets --locked -- -D warnings | |
| - name: Check | |
| run: cargo check --workspace --locked |