@@ -14,10 +14,6 @@ permissions:
1414 contents : write
1515 packages : write
1616
17- concurrency :
18- group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
19- cancel-in-progress : ${{ github.event_name == 'pull_request' }}
20-
2117jobs :
2218 nix-eval :
2319 uses : ./.github/workflows/nix-eval.yml
@@ -40,17 +36,31 @@ jobs:
4036 - name : Checkout Repo
4137 if : ${{ matrix.attr != '' }}
4238 uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
39+ - name : Mount sccache disk
40+ if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
41+ uses : useblacksmith/stickydisk@v1
42+ with :
43+ key : ${{ github.repository }}-sccache-${{ runner.os }}-${{ runner.arch }}
44+ path : /nix/var/cache/sccache
4345 - name : Install nix (ephemeral)
4446 if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
4547 uses : ./.github/actions/nix-install-ephemeral
4648 with :
4749 push-to-cache : ' true'
50+ enable-sccache-sandbox-path : ' true'
4851 env :
4952 DEV_AWS_ROLE : ${{ secrets.DEV_AWS_ROLE }}
5053 NIX_SIGN_SECRET_KEY : ${{ secrets.NIX_SIGN_SECRET_KEY }}
5154 - name : Install nix (self-hosted)
5255 if : ${{ matrix.attr != '' && matrix.runs_on.group == 'self-hosted-runners-nix' }}
5356 uses : ./.github/actions/nix-install-self-hosted
57+ - name : Allow sccache cache write access
58+ if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
59+ run : |
60+ sudo chgrp nixbld /nix/var/cache/sccache
61+ sudo chmod 777 /nix/var/cache/sccache
62+ sudo chmod g+s /nix/var/cache/sccache
63+ sudo setfacl -d -m u::rwX,g::rwX,o::rwX /nix/var/cache/sccache
5464 - name : nix build
5565 if : ${{ matrix.attr != '' }}
5666 shell : bash
@@ -71,17 +81,31 @@ jobs:
7181 - name : Checkout Repo
7282 if : ${{ matrix.attr != '' }}
7383 uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
84+ - name : Mount sccache disk
85+ if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
86+ uses : useblacksmith/stickydisk@v1
87+ with :
88+ key : ${{ github.repository }}-sccache-${{ runner.os }}-${{ runner.arch }}
89+ path : /nix/var/cache/sccache
7490 - name : Install nix (ephemeral)
7591 if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
7692 uses : ./.github/actions/nix-install-ephemeral
7793 with :
7894 push-to-cache : ' true'
95+ enable-sccache-sandbox-path : ' true'
7996 env :
8097 DEV_AWS_ROLE : ${{ secrets.DEV_AWS_ROLE }}
8198 NIX_SIGN_SECRET_KEY : ${{ secrets.NIX_SIGN_SECRET_KEY }}
8299 - name : Install nix (self-hosted)
83100 if : ${{ matrix.attr != '' && matrix.runs_on.group == 'self-hosted-runners-nix' }}
84101 uses : ./.github/actions/nix-install-self-hosted
102+ - name : Allow sccache cache write access
103+ if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
104+ run : |
105+ sudo chgrp nixbld /nix/var/cache/sccache
106+ sudo chmod 777 /nix/var/cache/sccache
107+ sudo chmod g+s /nix/var/cache/sccache
108+ sudo setfacl -d -m u::rwX,g::rwX,o::rwX /nix/var/cache/sccache
85109 - name : nix build
86110 if : ${{ matrix.attr != '' }}
87111 shell : bash
@@ -148,14 +172,28 @@ jobs:
148172 - name : Checkout Repo
149173 if : ${{ matrix.attr != '' }}
150174 uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
175+ - name : Mount sccache disk
176+ if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
177+ uses : useblacksmith/stickydisk@v1
178+ with :
179+ key : ${{ github.repository }}-sccache-${{ runner.os }}-${{ runner.arch }}
180+ path : /nix/var/cache/sccache
151181 - name : Install nix
152182 if : ${{ matrix.attr != '' }}
153183 uses : ./.github/actions/nix-install-ephemeral
154184 with :
185+ enable-sccache-sandbox-path : ' true'
155186 push-to-cache : ' true'
156187 env :
157188 DEV_AWS_ROLE : ${{ secrets.DEV_AWS_ROLE }}
158189 NIX_SIGN_SECRET_KEY : ${{ secrets.NIX_SIGN_SECRET_KEY }}
190+ - name : Allow sccache cache write access
191+ if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
192+ run : |
193+ sudo chgrp nixbld /nix/var/cache/sccache
194+ sudo chmod 777 /nix/var/cache/sccache
195+ sudo chmod g+s /nix/var/cache/sccache
196+ sudo setfacl -d -m u::rwX,g::rwX,o::rwX /nix/var/cache/sccache
159197 - name : nix build
160198 if : ${{ matrix.attr != '' }}
161199 shell : bash
@@ -176,14 +214,28 @@ jobs:
176214 - name : Checkout Repo
177215 if : ${{ matrix.attr != '' }}
178216 uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
217+ - name : Mount sccache disk
218+ if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
219+ uses : useblacksmith/stickydisk@v1
220+ with :
221+ key : ${{ github.repository }}-sccache-${{ runner.os }}-${{ runner.arch }}
222+ path : /nix/var/cache/sccache
179223 - name : Install nix
180224 if : ${{ matrix.attr != '' }}
181225 uses : ./.github/actions/nix-install-ephemeral
182226 with :
227+ enable-sccache-sandbox-path : ' true'
183228 push-to-cache : ' true'
184229 env :
185230 DEV_AWS_ROLE : ${{ secrets.DEV_AWS_ROLE }}
186231 NIX_SIGN_SECRET_KEY : ${{ secrets.NIX_SIGN_SECRET_KEY }}
232+ - name : Allow sccache cache write access
233+ if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
234+ run : |
235+ sudo chgrp nixbld /nix/var/cache/sccache
236+ sudo chmod 777 /nix/var/cache/sccache
237+ sudo chmod g+s /nix/var/cache/sccache
238+ sudo setfacl -d -m u::rwX,g::rwX,o::rwX /nix/var/cache/sccache
187239 - name : nix build
188240 if : ${{ matrix.attr != '' }}
189241 shell : bash
@@ -217,15 +269,3 @@ jobs:
217269 (needs.nix-build-packages-x86_64-linux.result == 'skipped' || needs.nix-build-packages-x86_64-linux.result == 'success') &&
218270 (needs.nix-build-checks-x86_64-linux.result == 'skipped' || needs.nix-build-checks-x86_64-linux.result == 'success')
219271 uses : ./.github/workflows/test.yml
220-
221- docker-image-test :
222- needs : [nix-eval, nix-build-packages-aarch64-linux, nix-build-checks-aarch64-linux]
223- if : |
224- !cancelled() &&
225- needs.nix-eval.result == 'success' &&
226- (needs.nix-build-packages-aarch64-linux.result == 'skipped' || needs.nix-build-packages-aarch64-linux.result == 'success') &&
227- (needs.nix-build-checks-aarch64-linux.result == 'skipped' || needs.nix-build-checks-aarch64-linux.result == 'success')
228- uses : ./.github/workflows/docker-image-test.yml
229- secrets :
230- DEV_AWS_ROLE : ${{ secrets.DEV_AWS_ROLE }}
231- NIX_SIGN_SECRET_KEY : ${{ secrets.NIX_SIGN_SECRET_KEY }}
0 commit comments