Skip to content

Commit 8aa4937

Browse files
jfrocheMic92
authored andcommitted
Use cachix instead of magic-nix-cache
magic-nix-cache no longer works on x86_64 macOS runners and the upload is slow.
1 parent a313ed4 commit 8aa4937

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

.github/actions/install-nix-action/action.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ inputs:
1414
no-init:
1515
description: "Whether to install Nix without init system integration"
1616
default: false
17+
cachix-authtoken:
18+
description: "cachix authentication token"
19+
default: ""
1720

1821
runs:
1922
using: "composite"
@@ -30,8 +33,7 @@ runs:
3033
init: ${{ inputs.no-init == 'true' && 'none' || '' }}
3134
planner: ${{ inputs.no-init == 'true' && 'linux' || '' }}
3235

33-
- uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13
34-
if: ${{ inputs.use-cache == 'true' && !(runner.os == 'macOS' && runner.arch == 'X64') }}
36+
- uses: cachix/cachix-action@v15
3537
with:
36-
use-flakehub: false
37-
use-gha-cache: true
38+
name: nix-installer
39+
authToken: "${{ inputs.cachix-authtoken}}"

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434

3535
- name: Install Nix
3636
uses: ./.github/actions/install-nix-action
37+
with:
38+
cachix-authtoken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
39+
3740

3841
- name: Build the installer
3942
run: |
@@ -75,6 +78,8 @@ jobs:
7578

7679
- name: Install Nix
7780
uses: ./.github/actions/install-nix-action
81+
with:
82+
cachix-authtoken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
7883

7984
- name: Check rustfmt
8085
run: nix develop --command check-rustfmt
@@ -143,6 +148,7 @@ jobs:
143148
- name: Initial install
144149
uses: ./.github/actions/install-nix-action
145150
with:
151+
cachix-authtoken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
146152
dogfood: true
147153
dogfood-path: ${{ steps.download-installer.outputs.download-path }}
148154
use-cache: false
@@ -187,6 +193,7 @@ jobs:
187193
- name: Repeated install
188194
uses: ./.github/actions/install-nix-action
189195
with:
196+
cachix-authtoken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
190197
dogfood: true
191198
dogfood-path: ${{ steps.download-installer.outputs.download-path }}
192199
use-cache: false
@@ -273,6 +280,7 @@ jobs:
273280
- name: Initial install
274281
uses: ./.github/actions/install-nix-action
275282
with:
283+
cachix-authtoken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
276284
dogfood: true
277285
dogfood-path: ${{ steps.download-installer.outputs.download-path }}
278286

.github/workflows/release-script.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
- name: Checkout
1616
uses: actions/checkout@v4
1717
- uses: cachix/install-nix-action@v25
18+
with:
19+
cachix-authtoken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
1820
- name: Create draft release
1921
# The script also depends on gh and git but those are both pre-installed on the runner
2022
run: nix run --inputs-from .# nixpkgs#python3 -- assemble_installer.py "${{ github.event.inputs.testing_hydra_eval_id }}"

.github/workflows/update.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
uses: actions/checkout@v4
1616
- name: Install Nix
1717
uses: ./.github/actions/install-nix-action
18+
with:
19+
cachix-authtoken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
1820
- name: Check flake
1921
uses: DeterminateSystems/flake-checker-action@main
2022
- name: Update flake.lock

0 commit comments

Comments
 (0)