Files
sim 1a35f92605 ci(nix): build darwin only when flake inputs change
Hosted macOS arm64 runners often fail to pick up the job ("The job was not
acquired by Runner of type hosted even after multiple attempts"), so the Nix
run turned red on most pushes while the Linux flake check passed. Go code on
macOS is already covered by the required integration-test (macos-latest); the
darwin package build mainly guards the flake and vendorHash, which only change
with flake.nix, flake.lock, nix/, go.mod or go.sum. Run it for those paths and
on manual dispatch.
2026-11-05 23:12:44 +08:00

41 lines
985 B
YAML

name: Nix
# Keeps the flake building, including the Go unit tests in the Nix sandbox.
# A hash mismatch after a go.sum change means vendorHash in nix/package.nix
# needs the "got: sha256-..." value from the log. The darwin build is in
# nix-darwin.yaml.
on:
push:
branches: [main]
paths-ignore: &docs-paths
- "website/**"
- "video/**"
- "wiki/**"
- "proposals/**"
- "ai_docs/**"
- "**/*.md"
pull_request:
branches: [main]
paths-ignore: *docs-paths
workflow_dispatch:
concurrency:
group: ${{ github.event_name == 'pull_request' && format('nix-pr-{0}', github.event.pull_request.number) || format('nix-{0}', github.run_id) }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v31
- name: Flake check
run: nix flake check -L