Skip to content

Commit

Permalink
Add support for GitHub caching of Nix builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zimmi48 committed Jul 13, 2023
1 parent f72eef6 commit 70b49fd
Show file tree
Hide file tree
Showing 10 changed files with 1,231 additions and 1 deletion.
124 changes: 124 additions & 0 deletions .github/workflows/nix-action-8.10.yml

Large diffs are not rendered by default.

146 changes: 146 additions & 0 deletions .github/workflows/nix-action-8.11.yml

Large diffs are not rendered by default.

156 changes: 156 additions & 0 deletions .github/workflows/nix-action-8.12.yml

Large diffs are not rendered by default.

154 changes: 154 additions & 0 deletions .github/workflows/nix-action-8.13.yml

Large diffs are not rendered by default.

172 changes: 172 additions & 0 deletions .github/workflows/nix-action-8.14.yml

Large diffs are not rendered by default.

174 changes: 174 additions & 0 deletions .github/workflows/nix-action-8.15.yml

Large diffs are not rendered by default.

170 changes: 170 additions & 0 deletions .github/workflows/nix-action-8.16.yml

Large diffs are not rendered by default.

126 changes: 126 additions & 0 deletions .github/workflows/nix-action-8.17.yml

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .github/workflows/nix-action-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, math-comp
name: coq-community
- name: GitHub caching
uses: DeterminateSystems/magic-nix-cache-action@v1
- id: stepCheck
name: Checking presence of CI target coq
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
Expand Down Expand Up @@ -84,6 +86,8 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, math-comp
name: coq-community
- name: GitHub caching
uses: DeterminateSystems/magic-nix-cache-action@v1
- id: stepCheck
name: Checking presence of CI target coq-shell
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
Expand Down
6 changes: 5 additions & 1 deletion action.nix
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ with builtins; with lib; let
else [ (stepCachixUse (head reordered // {
extraPullNames = map (v: v.name) (tail reordered);
})) ];

stepMagicNixCache = {
name = "GitHub caching";
uses = "DeterminateSystems/magic-nix-cache-action@v1";
};
stepCheck = { job, bundles ? [] }:
let bundlestr = if isList bundles then "\${{ matrix.bundle }}" else bundles; in {
name = "Checking presence of CI target ${job}";
Expand Down Expand Up @@ -108,6 +111,7 @@ with builtins; with lib; let
steps = [ stepCommitToInitiallyCheckout stepCheckout1
stepCommitToTest stepCheckout2 stepCachixInstall ]
++ (stepCachixUseAll cachix)
++ [ stepMagicNixCache ]
++ [ (stepCheck { inherit job bundles; }) ]
++ (map (job: stepBuild { inherit job bundles; }) jdeps)
++ [ (stepBuild { inherit job bundles; current = true; }) ];
Expand Down

0 comments on commit 70b49fd

Please sign in to comment.