Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for GitHub caching of Nix builds. #154

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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@v2
- 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@v2
- 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@v2";
};
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