hex/.github/workflows/check-macos.yml
Luke Parker 8f463e0768
build: replace the vendored gpui with a pinned fork, and fix the Nix package (#159)
* build: depend on a gpui fork instead of vendoring gpui

Replaces the 84k-line vendor/gpui from #156 with Hona/gpui, which is gpui 0.2.2 plus the one commit with the Wayland keymap fix, pinned by revision. Also adds sdk/commands, which the Linux build now embeds, to the Nix package source.

* build(nix): pin the gpui fork's source hash

* build(nix): give the test phase curl for OpenCode requests

* fix(linux): find curl on PATH when /usr/bin/curl doesn't exist, as on NixOS

OpenCode requests always ran /usr/bin/curl, which NixOS lacks, so Modes transformations and Voice Action failed there with 'opencode2 is not installed'. macOS keeps the fixed system path.

* test: run sleep from PATH, which the Nix build sandbox provides
2026-10-19 17:42:08 +10:00

51 lines
1.2 KiB
YAML

name: Check macOS
on:
pull_request:
paths:
- "Cargo.toml"
- "Cargo.lock"
- "build.rs"
- "src/**"
- "native/**"
- "resources/**"
- "assets/**"
- ".github/workflows/check-macos.yml"
push:
branches: [main]
paths:
- "Cargo.toml"
- "Cargo.lock"
- "build.rs"
- "src/**"
- "native/**"
- "resources/**"
- "assets/**"
- ".github/workflows/check-macos.yml"
permissions:
contents: read
concurrency:
group: macos-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
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
- name: Install the Metal toolchain
run: xcrun --sdk macosx metal --version || xcodebuild -downloadComponent MetalToolchain
- run: cargo fmt --all --check
- run: cargo clippy --locked --bin voice-control --tests -- -D warnings
- run: cargo test --locked --bin voice-control