Skip to content

Commit

Permalink
Reenable caching for nix workflows (#631)
Browse files Browse the repository at this point in the history
The previous crashes have been fixed in Nix 2.19.3. Thix commit also
includes missing `github-token` fields which increase the API rate
limit.

Fixes: #464
  • Loading branch information
aaronmondal committed Jan 30, 2024
1 parent d46180c commit 6de799d
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 25 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@ jobs:
actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install Nix
uses: >- # v7
DeterminateSystems/nix-installer-action@5620eb4af6b562c53e4d4628c0b6e4f9d9ae8612
uses: >- # v9
DeterminateSystems/nix-installer-action@cd46bde16ab981b0a7b2dce0574509104543276e
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
nix-installer-tag: v0.16.1

# 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
24 changes: 14 additions & 10 deletions .github/workflows/lre.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ jobs:
actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install Nix
uses: >- #v7
DeterminateSystems/nix-installer-action@5620eb4af6b562c53e4d4628c0b6e4f9d9ae8612
uses: >- # v9
DeterminateSystems/nix-installer-action@cd46bde16ab981b0a7b2dce0574509104543276e
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
nix-installer-tag: v0.16.1

- name: Cache Nix derivations
uses: >- # Custom commit, last pinned at 2023-11-17.
Expand All @@ -52,14 +55,15 @@ jobs:
actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install Nix
uses: >- #v7
DeterminateSystems/nix-installer-action@5620eb4af6b562c53e4d4628c0b6e4f9d9ae8612
# 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
uses: >- # v9
DeterminateSystems/nix-installer-action@cd46bde16ab981b0a7b2dce0574509104543276e
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
nix-installer-tag: v0.16.1

- 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
14 changes: 10 additions & 4 deletions .github/workflows/nix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ jobs:
actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install Nix
uses: >- #v7
DeterminateSystems/nix-installer-action@5620eb4af6b562c53e4d4628c0b6e4f9d9ae8612
uses: >- # v9
DeterminateSystems/nix-installer-action@cd46bde16ab981b0a7b2dce0574509104543276e
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
nix-installer-tag: v0.16.1

- name: Cache Nix derivations
uses: >- # Custom commit, last pinned at 2023-11-17.
Expand Down Expand Up @@ -65,8 +68,11 @@ jobs:
actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install Nix
uses: >- #v7
DeterminateSystems/nix-installer-action@5620eb4af6b562c53e4d4628c0b6e4f9d9ae8612
uses: >- # v9
DeterminateSystems/nix-installer-action@cd46bde16ab981b0a7b2dce0574509104543276e
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
nix-installer-tag: v0.16.1

- name: Cache Nix derivations
uses: >- # Custom commit, last pinned at 2023-11-17.
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,17 @@ jobs:
- name: Checkout
uses: >- # v3.5.3
actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: Install Nix
uses: >- #v7
DeterminateSystems/nix-installer-action@5620eb4af6b562c53e4d4628c0b6e4f9d9ae8612
uses: >- # v9
DeterminateSystems/nix-installer-action@cd46bde16ab981b0a7b2dce0574509104543276e
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
nix-installer-tag: v0.16.1

- name: Cache Nix derivations
uses: >- # Custom commit, last pinned at 2023-11-17.
DeterminateSystems/magic-nix-cache-action@a04e6275a6bea232cd04fc6f3cbf20d4cb02a3e1
- name: Run pre-commit hooks
run: nix flake check
9 changes: 7 additions & 2 deletions .github/workflows/tagged_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ jobs:
actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install Nix
uses: >- # v7
DeterminateSystems/nix-installer-action@5620eb4af6b562c53e4d4628c0b6e4f9d9ae8612
uses: >- # v9
DeterminateSystems/nix-installer-action@cd46bde16ab981b0a7b2dce0574509104543276e
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
nix-installer-tag: v0.16.1

- 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

0 comments on commit 6de799d

Please sign in to comment.