Skip to content

Commit

Permalink
ci: cachix/install-nix-action -> DeterminateSystems/nix-installer-action
Browse files Browse the repository at this point in the history
The Cachix action relies on the official update script, which doesn't
work with Hydra builds (as it links to non-existent tarballs on
releases.nixos.org). Lets just use the tarballs directly for now
  • Loading branch information
getchoo committed Jan 18, 2025
1 parent c075e40 commit a00d2ef
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 18 deletions.
37 changes: 25 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,22 @@ on:

jobs:
packages:
name: Build Packages
name: Build Packages (${{ matrix.os }})

strategy:
fail-fast: false
matrix:
os: [ macos-latest, macos-13, ubuntu-latest ]
include:
# TODO: Stop pinning Nix when 2.26 is released
# https://hydra.nixos.org/eval/1811064
- os: macos-latest
nix-package-url: https://hydra.nixos.org/build/285560837/download/1/nix-2.26.0pre19700101_043df13-aarch64-darwin.tar.xz

- os: macos-13
nix-package-url: https://hydra.nixos.org/build/285561062/download/1/nix-2.26.0pre19700101_043df13-x86_64-darwin.tar.xz

- os: ubuntu-latest
nix-package-url: https://hydra.nixos.org/build/285561167/download/1/nix-2.26.0pre19700101_043df13-x86_64-linux.tar.xz

runs-on: ${{ matrix.os }}

Expand All @@ -34,11 +44,9 @@ jobs:
uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@V27
uses: DeterminateSystems/nix-installer-action@v16
with:
# TODO: Remove when Nix 2.26 is released
# https://hydra.nixos.org/build/285560910
install_url: https://hydra.nixos.org/build/285560910/download/1/install
nix-package-url: ${{ matrix.nix-package-url }}

- name: Install Cachix
uses: cachix/cachix-action@v15
Expand All @@ -51,13 +59,20 @@ jobs:
nix run './dev#build-hydra-job' -- 'packages'
modules:
name: Test Modules
name: Test Modules (${{ matrix.os }})
needs: packages

strategy:
fail-fast: false
matrix:
os: [ macos-latest, ubuntu-latest ]
include:
# TODO: Stop pinning Nix when 2.26 is released
# https://hydra.nixos.org/eval/1811064
- os: macos-latest
nix-package-url: https://hydra.nixos.org/build/285560837/download/1/nix-2.26.0pre19700101_043df13-aarch64-darwin.tar.xz

- os: ubuntu-latest
nix-package-url: https://hydra.nixos.org/build/285561167/download/1/nix-2.26.0pre19700101_043df13-x86_64-linux.tar.xz

runs-on: ${{ matrix.os }}

Expand All @@ -66,11 +81,9 @@ jobs:
uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@V27
uses: DeterminateSystems/nix-installer-action@v16
with:
# TODO: Remove when Nix 2.26 is released
# https://hydra.nixos.org/build/285560910
install_url: https://hydra.nixos.org/build/285560910/download/1/install
nix-package-url: ${{ matrix.nix-package-url }}

- name: Install Cachix
uses: cachix/cachix-action@v15
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
echo "rev=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"

- name: Install Nix
uses: cachix/install-nix-action@V27
uses: DeterminateSystems/nix-installer-action@v16

- name: Format changes
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
ref: ${{ inputs.tag }}

- name: Install Nix
uses: cachix/install-nix-action@V27
uses: DeterminateSystems/nix-installer-action@v16

- name: Push to FlakeHub
uses: DeterminateSystems/flakehub-push@v5
Expand All @@ -52,7 +52,7 @@ jobs:
ref: ${{ inputs.tag }}

- name: Install Nix
uses: cachix/install-nix-action@V27
uses: DeterminateSystems/nix-installer-action@v16

- name: Push to Flakestry
uses: flakestry/flakestry-publish@main
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:
uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@V27
uses: DeterminateSystems/nix-installer-action@v16
with:
# TODO: Remove when Nix 2.26 is released
# https://hydra.nixos.org/build/285560910
install_url: https://hydra.nixos.org/build/285560910/download/1/install
# https://hydra.nixos.org/eval/1811064
nix-package-url: https://hydra.nixos.org/build/285561167/download/1/nix-2.26.0pre19700101_043df13-x86_64-linux.tar.xz

- name: Install Cachix
uses: cachix/cachix-action@v15
Expand Down

0 comments on commit a00d2ef

Please sign in to comment.