Skip to content

Commit 70b49fd

Browse files
committed
Add support for GitHub caching of Nix builds.
1 parent f72eef6 commit 70b49fd

File tree

10 files changed

+1231
-1
lines changed

10 files changed

+1231
-1
lines changed

.github/workflows/nix-action-8.10.yml

Lines changed: 124 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/nix-action-8.11.yml

Lines changed: 146 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/nix-action-8.12.yml

Lines changed: 156 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/nix-action-8.13.yml

Lines changed: 154 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/nix-action-8.14.yml

Lines changed: 172 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/nix-action-8.15.yml

Lines changed: 174 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/nix-action-8.16.yml

Lines changed: 170 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/nix-action-8.17.yml

Lines changed: 126 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/nix-action-master.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
3737
extraPullNames: coq, math-comp
3838
name: coq-community
39+
- name: GitHub caching
40+
uses: DeterminateSystems/magic-nix-cache-action@v1
3941
- id: stepCheck
4042
name: Checking presence of CI target coq
4143
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
@@ -84,6 +86,8 @@ jobs:
8486
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
8587
extraPullNames: coq, math-comp
8688
name: coq-community
89+
- name: GitHub caching
90+
uses: DeterminateSystems/magic-nix-cache-action@v1
8791
- id: stepCheck
8892
name: Checking presence of CI target coq-shell
8993
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\

action.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ with builtins; with lib; let
7575
else [ (stepCachixUse (head reordered // {
7676
extraPullNames = map (v: v.name) (tail reordered);
7777
})) ];
78-
78+
stepMagicNixCache = {
79+
name = "GitHub caching";
80+
uses = "DeterminateSystems/magic-nix-cache-action@v1";
81+
};
7982
stepCheck = { job, bundles ? [] }:
8083
let bundlestr = if isList bundles then "\${{ matrix.bundle }}" else bundles; in {
8184
name = "Checking presence of CI target ${job}";
@@ -108,6 +111,7 @@ with builtins; with lib; let
108111
steps = [ stepCommitToInitiallyCheckout stepCheckout1
109112
stepCommitToTest stepCheckout2 stepCachixInstall ]
110113
++ (stepCachixUseAll cachix)
114+
++ [ stepMagicNixCache ]
111115
++ [ (stepCheck { inherit job bundles; }) ]
112116
++ (map (job: stepBuild { inherit job bundles; }) jdeps)
113117
++ [ (stepBuild { inherit job bundles; current = true; }) ];

0 commit comments

Comments
 (0)