Browse code
feat(ci): nix caching, try 1
Showing 1 changed files
... | ... |
@@ -20,7 +20,30 @@ jobs: |
20 | 20 |
# The type of runner that the job will run on |
21 | 21 |
runs-on: ubuntu-latest |
22 | 22 |
|
23 |
- # Steps represent a sequence of tasks that will be executed as part of the job |
|
23 |
+ ## attempt to cache nix store |
|
24 |
+ - run: | |
|
25 |
+ # Create with liberal rights, otherwise cache action will complain |
|
26 |
+ # about permission errors. |
|
27 |
+ sudo mkdir -p /nix/store |
|
28 |
+ sudo chmod -R 777 /nix |
|
29 |
+ |
|
30 |
+ - name: Cache nix env take N+1 |
|
31 |
+ uses: actions/cache@v2 |
|
32 |
+ with: |
|
33 |
+ path: | |
|
34 |
+ # See https://github.com/actions/cache/pull/726 |
|
35 |
+ /nix/store/** |
|
36 |
+ # Missing something? |
|
37 |
+ /nix/var/nix/*/* |
|
38 |
+ /nix/var/nix/db/* |
|
39 |
+ /nix/var/nix/db/*/** |
|
40 |
+ !/nix/var/nix/daemon-socket/socket |
|
41 |
+ !/nix/var/nix/userpool/* |
|
42 |
+ !/nix/var/nix/gc.lock |
|
43 |
+ !/nix/var/nix/db/big-lock |
|
44 |
+ !/nix/var/nix/db/reserved |
|
45 |
+ key: ${{ runner.os }}-nix-store |
|
46 |
+ |
|
24 | 47 |
steps: |
25 | 48 |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
26 | 49 |
- uses: actions/checkout@v2 |