@@ -15,15 +15,23 @@ jobs:
1515 # (e.g. moq-relay) maps 1:1 to a flake attribute.
1616 release :
1717 name : Release (${{ matrix.os }})
18- runs-on : ${{ matrix.os }}
18+ runs-on : ${{ matrix.runs-on }}
1919 permissions :
2020 contents : read
2121 strategy :
2222 fail-fast : false
2323 matrix :
24- os :
25- - ubuntu-latest
26- - macos-latest
24+ include :
25+ # `os` is just the cache pin label; keep the existing values stable so
26+ # old pins aren't orphaned.
27+ - os : ubuntu-latest # x86_64-linux
28+ runs-on : ubuntu-latest
29+ - os : macos-latest # aarch64-darwin
30+ runs-on : macos-latest
31+ # aarch64-linux on the moq-dev self-hosted A1 (warm /nix/store). Tag
32+ # pushes are trusted, so no fork concern.
33+ - os : aarch64-linux
34+ runs-on : [self-hosted, nix]
2735
2836 steps :
2937 - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
@@ -45,14 +53,29 @@ jobs:
4553 fi
4654 echo "name=${BASH_REMATCH[1]}" >> "$GITHUB_OUTPUT"
4755
48- - uses : DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main
56+ # The cachix action and `nix build` below run `nix` directly, so put it on
57+ # PATH. A login shell resolves it via /etc/profile.d regardless of the
58+ # box's install path. Self-hosted only; the hosted runners get Nix from
59+ # the installer step.
60+ - name : Add Nix to PATH
61+ if : runner.environment == 'self-hosted'
62+ shell : bash -leo pipefail {0}
63+ run : dirname "$(command -v nix)" >> "$GITHUB_PATH"
64+
65+ - if : runner.environment == 'github-hosted'
66+ uses : DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main
4967 with :
5068 determinate : false
5169
5270 - uses : cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17
5371 with :
5472 name : kixelated
5573 authToken : ${{ secrets.CACHIX_AUTH_TOKEN }}
74+ # The self-hosted box's runner user isn't a Nix trusted-user and the
75+ # box deliberately substitutes only from its warm local store, so
76+ # don't let `cachix use` rewrite nix.conf there. Push auth (above)
77+ # still works; this leg only pushes.
78+ skipAddingSubstituter : ${{ runner.environment == 'self-hosted' }}
5679
5780 - name : Build and cache
5881 env :
0 commit comments