macOS Rust Check #3
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: macOS Rust Check | |
| # Manual only -- not on every PR/push, to keep the self-hosted runner's load | |
| # and cost unchanged from today. Exists because ci.yml (which does run on | |
| # every PR) is 100% ubuntu-latest, and a Linux runner cannot type-check code | |
| # behind #[cfg(target_os = "macos")] at all -- that code is stripped before | |
| # semantic analysis even starts, not just skipped at test time. This is the | |
| # only way to get a real compiler pass over it before merging. | |
| on: | |
| workflow_dispatch: | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check: | |
| # Runner must be darwin/arm64 with Xcode CLT and rustup (same requirements | |
| # as macos-release.yml, which this intentionally does not replace -- this | |
| # only builds/checks, never signs, packages, or uploads anything). | |
| runs-on: [self-hosted, macOS, ARM64] | |
| timeout-minutes: 30 | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: desktop/src-tauri | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: cargo fmt --check | |
| run: cargo fmt --check | |
| - name: cargo build | |
| run: cargo build | |
| - name: cargo clippy | |
| # -A flags suppress pre-existing lints unrelated to this workflow's | |
| # purpose (tracked separately, not introduced by whatever change this | |
| # check is run against) so a real regression isn't lost in known noise. | |
| # unused_variables/dead_code (ensure_torch_device, classify_cuda_install_error, | |
| # child_output_with_timeout) are macOS-build-only findings from this | |
| # workflow's first-ever run -- nothing has type-checked this target | |
| # before, so they predate this workflow rather than being caused by it. | |
| run: | | |
| cargo clippy -- -D warnings \ | |
| -A clippy::derivable_impls \ | |
| -A clippy::single_match \ | |
| -A clippy::trim_split_whitespace \ | |
| -A unused_variables \ | |
| -A dead_code | |
| - name: cargo test | |
| run: cargo test |