on master help sign in
Fix caching?
commita1368a29e288505409ab13572ea944b2b14531b0 authoriko <ilyakooo0@gmail.com> dateWed 22 Dec 2021, 06:56 (5 years ago) parent6916751
4 files changed+25−6
.github/actions/nix_cache/action.yaml+5−6 .github/actions/nix_cache_post/actions.yaml+10 .github/workflows/github-actions-image.yaml+9 default.nix+1
.github/actions/nix_cache/action.yaml+5−6
@@ -4,6 +4,10 @@ inputs:
44 key:
55 description: "Caching key"
66 required: true
7+ restore-keys:
8+ description: "Restore keys"
9+ required: false
10+ default: ""
711runs:
812 using: "composite"
913 steps:
@@ -14,6 +18,7 @@ runs:
1418 path: |
1519 ~/nix
1620 key: ${{ inputs.key }}
21+ restore-keys: ${{ inputs.restore-keys }}
1722 - name: Move nix store
1823 shell: bash
1924 env:
@@ -23,9 +28,3 @@ runs:
2328 sudo mkdir -p /nix
2429 sudo mv -f ~/nix/* /nix/
2530 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:
113113 asset_name: compaREST binary – Linux – x86
114114 tag: ${{ github.ref }}
115115
116+ - name: Cache Nix post
117+ uses: ./.github/actions/nix_cache_post
118+
116119 macOS:
117120 runs-on: macos-latest
118121 steps:
@@ -148,6 +151,9 @@ jobs:
148151 asset_name: compaREST binary – macOS – x86
149152 tag: ${{ github.ref }}
150153
154+ - name: Cache Nix post
155+ uses: ./.github/actions/nix_cache_post
156+
151157 Linux-Windows:
152158 runs-on: ubuntu-latest
153159 steps:
@@ -194,3 +200,6 @@ jobs:
194200 file: compaREST
195201 asset_name: compaREST binary – Windows
196202 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
107107 compaRESTStaticBin
108108 compaRESTBin
109109 hsPkgs
110+
110111 macOSCompaRESTBundle
111112 WindowsCompaRESTBin
112113 ;