From a00d2ef937285e28a3cf616cfc1ea3fb34a9cb1a Mon Sep 17 00:00:00 2001 From: seth Date: Fri, 17 Jan 2025 14:18:09 -0500 Subject: [PATCH] ci: cachix/install-nix-action -> DeterminateSystems/nix-installer-action 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 --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++------------ .github/workflows/format.yml | 2 +- .github/workflows/publish.yml | 4 ++-- .github/workflows/website.yml | 6 +++--- 4 files changed, 31 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d34402e..04faa20f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} @@ -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 @@ -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 }} @@ -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 diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 1b085770..29b740c3 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -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: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4a5a86c7..77480792 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 @@ -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 diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index d52b2ad6..86635396 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -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