hex/.github/workflows/check-macos.yml
Daniel Smolsky 59c35078b9 ci: build the Nix check on every core, skip draft PRs, keep every dev run
The Nix job built the release package and ran its tests on one core, taking
25-40 minutes; every other check finishes in 6-12. It now uses all of the
runner's cores. The derivation and the tests it runs are unchanged.

Draft pull requests no longer run the checks; marking one ready runs them.

Pushes to dev no longer cancel each other's runs, so every dev commit gets a
result. A new push to a pull request still cancels its stale run.
2026-10-28 09:31:42 -04:00

73 lines
2.3 KiB
YAML

name: Check macOS
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "Cargo.toml"
- "Cargo.lock"
- "build.rs"
- "crates/**"
- "src/**"
- "native/**"
- "macos/HexMicrophoneDriver/Info.plist"
- "resources/**"
- "assets/**"
- "app/**"
- "scripts/validate-app.sh"
- "scripts/test-app-identity.sh"
- ".config/nextest.toml"
- ".github/workflows/check-macos.yml"
push:
branches: [dev]
paths:
- "Cargo.toml"
- "Cargo.lock"
- "build.rs"
- "crates/**"
- "src/**"
- "native/**"
- "macos/HexMicrophoneDriver/Info.plist"
- "resources/**"
- "assets/**"
- "app/**"
- "scripts/validate-app.sh"
- "scripts/test-app-identity.sh"
- ".config/nextest.toml"
- ".github/workflows/check-macos.yml"
permissions:
contents: read
# A new push to a pull request cancels its stale run. Every push and manual run
# keeps its own group, so each dev commit gets a result.
concurrency:
group: ${{ github.event_name == 'pull_request' && format('{0}-pr-{1}', github.workflow, github.event.pull_request.number) || format('{0}-run-{1}', github.workflow, github.run_id) }}
cancel-in-progress: true
jobs:
test:
if: ${{ !github.event.pull_request.draft }}
runs-on: macos-26
timeout-minutes: 60
env:
CARGO_PROFILE_DEV_DEBUG: "0"
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- name: Install the Metal toolchain
run: xcrun --sdk macosx metal --version || xcodebuild -downloadComponent MetalToolchain
- run: cargo fmt --all --check
- run: scripts/test-app-identity.sh
- run: cargo clippy --locked -p voice-control -p scrawl-capture --bin voice-control --lib --tests --features capture -- -D warnings
- run: cargo nextest run --locked --profile ci -p voice-control -p scrawl-capture --bin voice-control --lib --features capture
- name: No compromised eMudhra CA roots
run: cargo build --locked --bin voice-control && scripts/check-ca-roots.sh target/debug/voice-control