Skip to content

Commit 4cb4d8b

Browse files
authored
workflows: nix: hardcode cachix ids, build unconditionally (#5663)
GitHub does not expose environment and repository variables to PRs coming from forks implies that we've been disabling the Nix CI actions for most PRs. The `if:` also didn't make much sense, because we can always pull from cachix, and there's no point (albeit no risk either) in pushing cache for the untrusted code.
1 parent 3a03541 commit 4cb4d8b

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

.github/workflows/nix-ci-aarch64.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ on:
1919

2020
jobs:
2121
nix-build-aarch64:
22-
if: ${{ vars.CACHIX_NAME != '' }}
2322
runs-on: ubuntu-latest
2423
steps:
2524
- name: Checkout repository
@@ -37,16 +36,16 @@ jobs:
3736
extra-conf: |
3837
extra-platforms = aarch64-linux
3938
extra-system-features = nixos-test kvm
40-
extra-substituters = https://${{ vars.CACHIX_NAME }}.cachix.org https://cuda-maintainers.cachix.org
41-
extra-trusted-public-keys = ${{ vars.CACHIX_PUBLIC_KEY }} cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=
39+
extra-substituters = https://llama-cpp.cachix.org https://cuda-maintainers.cachix.org
40+
extra-trusted-public-keys = llama-cpp.cachix.org-1:H75X+w83wUKTIPSO1KWy9ADUrzThyGs8P5tmAbkWhQc= cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=
4241
- uses: DeterminateSystems/magic-nix-cache-action@v2
4342
with:
4443
upstream-cache: https://${{ matrix.cachixName }}.cachix.org
4544
- name: Set-up cachix to push the results to
4645
uses: cachix/cachix-action@v13
4746
with:
4847
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
49-
name: ${{ vars.CACHIX_NAME }}
48+
name: llama-cpp
5049
- name: Show all output paths
5150
run: >
5251
nix run github:nix-community/nix-eval-jobs

.github/workflows/nix-ci.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
with:
2424
github-token: ${{ secrets.GITHUB_TOKEN }}
2525
extra-conf: |
26-
extra-substituters = https://${{ vars.CACHIX_NAME }}.cachix.org https://cuda-maintainers.cachix.org
27-
extra-trusted-public-keys = ${{ vars.CACHIX_PUBLIC_KEY }} cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=
26+
extra-substituters = https://llama-cpp.cachix.org https://cuda-maintainers.cachix.org
27+
extra-trusted-public-keys = llama-cpp.cachix.org-1:H75X+w83wUKTIPSO1KWy9ADUrzThyGs8P5tmAbkWhQc= cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=
2828
- uses: DeterminateSystems/magic-nix-cache-action@v2
2929
with:
3030
upstream-cache: https://${{ matrix.cachixName }}.cachix.org
@@ -37,7 +37,6 @@ jobs:
3737
--flake
3838
".#packages.$(nix eval --raw --impure --expr builtins.currentSystem)"
3939
nix-build:
40-
if: ${{ vars.CACHIX_NAME != '' }}
4140
strategy:
4241
fail-fast: false
4342
matrix:
@@ -51,16 +50,16 @@ jobs:
5150
with:
5251
github-token: ${{ secrets.GITHUB_TOKEN }}
5352
extra-conf: |
54-
extra-substituters = https://${{ vars.CACHIX_NAME }}.cachix.org https://cuda-maintainers.cachix.org
55-
extra-trusted-public-keys = ${{ vars.CACHIX_PUBLIC_KEY }} cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=
53+
extra-substituters = https://llama-cpp.cachix.org https://cuda-maintainers.cachix.org
54+
extra-trusted-public-keys = llama-cpp.cachix.org-1:H75X+w83wUKTIPSO1KWy9ADUrzThyGs8P5tmAbkWhQc= cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=
5655
- uses: DeterminateSystems/magic-nix-cache-action@v2
5756
with:
5857
upstream-cache: https://${{ matrix.cachixName }}.cachix.org
5958
- name: Set-up cachix to push the results to
6059
uses: cachix/cachix-action@v13
6160
with:
6261
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
63-
name: ${{ vars.CACHIX_NAME }}
62+
name: llama-cpp
6463
- name: Build
6564
run: >
6665
nix run github:Mic92/nix-fast-build

0 commit comments

Comments
 (0)