Skip to content

Commit

Permalink
Reenable caching for nix workflows
Browse files Browse the repository at this point in the history
This has been fixed upstream. Pull the change in early to speed up
workflows significantly. This also includes missing `github-token`
fields which increase the API rate limit.

Fixes: #464
  • Loading branch information
aaronmondal committed Jan 25, 2024
1 parent 39c6678 commit 8ee4ad9
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 10 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ jobs:
DeterminateSystems/nix-installer-action@5620eb4af6b562c53e4d4628c0b6e4f9d9ae8612
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# TODO(aaronmondal): Remove after:
# https://github.com/DeterminateSystems/nix-installer/pull/820
nix-installer-pr: 820

# TODO(aaronmondal): Caching is flaky for this workflow.
# See: https://github.com/DeterminateSystems/magic-nix-cache/issues/32
# - name: Cache Nix derivations
# uses: >- # Custom commit, last pinned at 2023-11-17.
# DeterminateSystems/magic-nix-cache-action@a04e6275a6bea232cd04fc6f3cbf20d4cb02a3e1
- name: Cache Nix derivations
uses: >- # Custom commit, last pinned at 2023-11-17.
DeterminateSystems/magic-nix-cache-action@a04e6275a6bea232cd04fc6f3cbf20d4cb02a3e1
- name: Test image
run: |
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/lre.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
- name: Install Nix
uses: >- #v7
DeterminateSystems/nix-installer-action@5620eb4af6b562c53e4d4628c0b6e4f9d9ae8612
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# TODO(aaronmondal): Remove after:
# https://github.com/DeterminateSystems/nix-installer/pull/820
nix-installer-pr: 820

- name: Cache Nix derivations
uses: >- # Custom commit, last pinned at 2023-11-17.
Expand Down Expand Up @@ -54,12 +59,15 @@ jobs:
- name: Install Nix
uses: >- #v7
DeterminateSystems/nix-installer-action@5620eb4af6b562c53e4d4628c0b6e4f9d9ae8612
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# TODO(aaronmondal): Remove after:
# https://github.com/DeterminateSystems/nix-installer/pull/820
nix-installer-pr: 820

# TODO(aaronmondal): Caching is flaky for this workflow.
# See: https://github.com/DeterminateSystems/magic-nix-cache/issues/32
# - name: Cache Nix derivations
# uses: >- # Custom commit, last pinned at 2023-11-17.
# DeterminateSystems/magic-nix-cache-action@a04e6275a6bea232cd04fc6f3cbf20d4cb02a3e1
- name: Cache Nix derivations
uses: >- # Custom commit, last pinned at 2023-11-17.
DeterminateSystems/magic-nix-cache-action@a04e6275a6bea232cd04fc6f3cbf20d4cb02a3e1
- name: Start Kubernetes cluster (Infra)
run: >
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/nix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
- name: Install Nix
uses: >- #v7
DeterminateSystems/nix-installer-action@5620eb4af6b562c53e4d4628c0b6e4f9d9ae8612
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# TODO(aaronmondal): Remove after:
# https://github.com/DeterminateSystems/nix-installer/pull/820
nix-installer-pr: 820

- name: Cache Nix derivations
uses: >- # Custom commit, last pinned at 2023-11-17.
Expand Down Expand Up @@ -58,6 +63,11 @@ jobs:
- name: Install Nix
uses: >- #v7
DeterminateSystems/nix-installer-action@5620eb4af6b562c53e4d4628c0b6e4f9d9ae8612
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# TODO(aaronmondal): Remove after:
# https://github.com/DeterminateSystems/nix-installer/pull/820
nix-installer-pr: 820

- name: Cache Nix derivations
uses: >- # Custom commit, last pinned at 2023-11-17.
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jobs:
- name: Install Nix
uses: >- #v7
DeterminateSystems/nix-installer-action@5620eb4af6b562c53e4d4628c0b6e4f9d9ae8612
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# TODO(aaronmondal): Remove after:
# https://github.com/DeterminateSystems/nix-installer/pull/820
nix-installer-pr: 820

- name: Cache Nix derivations
uses: >- # Custom commit, last pinned at 2023-11-17.
DeterminateSystems/magic-nix-cache-action@a04e6275a6bea232cd04fc6f3cbf20d4cb02a3e1
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tagged_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
DeterminateSystems/nix-installer-action@5620eb4af6b562c53e4d4628c0b6e4f9d9ae8612
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# TODO(aaronmondal): Remove after:
# https://github.com/DeterminateSystems/nix-installer/pull/820
nix-installer-pr: 820

- name: Test image
run: |
Expand Down

0 comments on commit 8ee4ad9

Please sign in to comment.