feat(nika-cli): examples run flips from refusal to execution #256
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: Diamond CI | |
| # All template expressions below reference `matrix.*` values defined from | |
| # the static literal lists in this same file — there is no untrusted input | |
| # in any `run:` step (no issue/PR/commit-message interpolation). | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: diamond-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: short | |
| jobs: | |
| ratchets: | |
| name: ratchet | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| check: | |
| - loc-limits | |
| - crate-size | |
| - fn-length | |
| - unwrap | |
| - expect | |
| - dead-code | |
| env: | |
| CHECK: ${{ matrix.check }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run ratchet | |
| run: ./scripts/ci/check-"$CHECK".sh | |
| rust: | |
| name: rust | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| job: [clippy, tests, no-default-features] | |
| env: | |
| JOB: ${{ matrix.job }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: "1.91" | |
| components: clippy, rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: diamond | |
| - name: Run rust job | |
| run: ./scripts/ci/check-"$JOB".sh | |
| deny: | |
| name: cargo-deny | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: EmbarkStudios/cargo-deny-action@v2 | |
| with: | |
| log-level: warn | |
| command: check | |
| arguments: --all-features | |
| hack: | |
| name: cargo-hack (feature matrix) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: "1.91" | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: diamond | |
| - uses: taiki-e/install-action@cargo-hack | |
| - name: check feature powerset (no dev deps) | |
| run: cargo hack --feature-powerset --no-dev-deps check --workspace | |
| miri: | |
| name: miri (L0 UB detection) | |
| runs-on: ubuntu-latest | |
| # Miri is nightly-only and slow. Runs against nika-error + nika-catalog | |
| # (L0, pure, zero I/O). Not on kernel/kernel-mock (async + tokio not | |
| # supported under miri) and not on catalog-verify (network I/O). | |
| # Non-blocking (continue-on-error) until workspace-wide miri stabilises. | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: miri | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: diamond-miri | |
| - name: miri test — nika-error + nika-catalog | |
| env: | |
| MIRIFLAGS: "-Zmiri-strict-provenance" | |
| run: cargo miri test --lib -p nika-error -p nika-catalog | |
| machete: | |
| name: cargo-machete (unused deps) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: taiki-e/install-action@cargo-machete | |
| - name: check for unused dependencies | |
| run: cargo machete | |
| semver: | |
| name: cargo-semver-checks (api breakage) | |
| runs-on: ubuntu-latest | |
| # Compares current public API against baseline `origin/main`. | |
| # Fails PRs that introduce breaking changes without documented intent. | |
| # Non-blocking on push to main (only rejects PRs). | |
| continue-on-error: ${{ github.event_name == 'push' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: "1.91" | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: diamond-semver | |
| - uses: obi1kenobi/cargo-semver-checks-action@v2 | |
| with: | |
| package: nika-error,nika-catalog,nika-kernel | |
| baseline-rev: origin/main | |
| typos: | |
| name: typos (spell check) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: crate-ci/typos@master |