on master help sign in
Fix caching?
a1368a2iko
.github/actions/nix_cache/action.yaml+5−6
@@ -4,6 +4,10 @@ inputs:
4 key:
4 key:
5 description: "Caching key"
5 description: "Caching key"
6 required: true
6 required: true
7+ restore-keys:
8+ description: "Restore keys"
9+ required: false
10+ default: ""
7runs:
11runs:
8 using: "composite"
12 using: "composite"
9 steps:
13 steps:
@@ -14,6 +18,7 @@ runs:
14 path: |
18 path: |
15 ~/nix
19 ~/nix
16 key: ${{ inputs.key }}
20 key: ${{ inputs.key }}
21+ restore-keys: ${{ inputs.restore-keys }}
17 - name: Move nix store
22 - name: Move nix store
18 shell: bash
23 shell: bash
19 env:
24 env:
@@ -23,9 +28,3 @@ runs:
23 sudo mkdir -p /nix
28 sudo mkdir -p /nix
24 sudo mv -f ~/nix/* /nix/
29 sudo mv -f ~/nix/* /nix/
25 fi
30 fi
26− - name: Move nix store post
27− uses: ilyakooo0/github-composite-action-pre-post@1.0.0
28− with:
29− post: |
30− mkdir -p ~/nix
31− sudo mv -f /nix/* ~/nix/
.github/actions/nix_cache_post/actions.yamlnew file+10
@@ -0,0 +1,10 @@
1+name: "Nix cache post"
2+description: "Cache nix build post"
3+runs:
4+ using: "composite"
5+ steps:
6+ - name: Move nix store
7+ shell: bash
8+ run: |
9+ mkdir -p ~/nix
10+ sudo mv -f /nix/* ~/nix/
.github/workflows/github-actions-image.yaml+9
@@ -113,6 +113,9 @@ jobs:
113 asset_name: compaREST binary – Linux – x86
113 asset_name: compaREST binary – Linux – x86
114 tag: ${{ github.ref }}
114 tag: ${{ github.ref }}
115
115
116+ - name: Cache Nix post
117+ uses: ./.github/actions/nix_cache_post
118+
116 macOS:
119 macOS:
117 runs-on: macos-latest
120 runs-on: macos-latest
118 steps:
121 steps:
@@ -148,6 +151,9 @@ jobs:
148 asset_name: compaREST binary – macOS – x86
151 asset_name: compaREST binary – macOS – x86
149 tag: ${{ github.ref }}
152 tag: ${{ github.ref }}
150
153
154+ - name: Cache Nix post
155+ uses: ./.github/actions/nix_cache_post
156+
151 Linux-Windows:
157 Linux-Windows:
152 runs-on: ubuntu-latest
158 runs-on: ubuntu-latest
153 steps:
159 steps:
@@ -194,3 +200,6 @@ jobs:
194 file: compaREST
200 file: compaREST
195 asset_name: compaREST binary – Windows
201 asset_name: compaREST binary – Windows
196 tag: ${{ github.ref }}
202 tag: ${{ github.ref }}
203+
204+ - name: Cache Nix post
205+ uses: ./.github/actions/nix_cache_post
default.nix+1
@@ -107,6 +107,7 @@ builtins.trace
107 compaRESTStaticBin
107 compaRESTStaticBin
108 compaRESTBin
108 compaRESTBin
109 hsPkgs
109 hsPkgs
110+
110 macOSCompaRESTBundle
111 macOSCompaRESTBundle
111 WindowsCompaRESTBin
112 WindowsCompaRESTBin
112 ;
113 ;