@@ -36,11 +36,21 @@ jobs:
3636 - name : Checkout Repo
3737 if : ${{ matrix.attr != '' }}
3838 uses : actions/checkout@v4
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 : /var/cache/sccache
45+ - name : Allow sccache cache write access
46+ if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
47+ run : sudo chmod 1777 /var/cache/sccache
3948 - name : Install nix (ephemeral)
4049 if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
4150 uses : ./.github/actions/nix-install-ephemeral
4251 with :
4352 push-to-cache : ' true'
53+ enable-sccache-sandbox-path : ' true'
4454 env :
4555 DEV_AWS_ROLE : ${{ secrets.DEV_AWS_ROLE }}
4656 NIX_SIGN_SECRET_KEY : ${{ secrets.NIX_SIGN_SECRET_KEY }}
@@ -67,11 +77,21 @@ jobs:
6777 - name : Checkout Repo
6878 if : ${{ matrix.attr != '' }}
6979 uses : actions/checkout@v4
80+ - name : Mount sccache disk
81+ if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
82+ uses : useblacksmith/stickydisk@v1
83+ with :
84+ key : ${{ github.repository }}-sccache-${{ runner.os }}-${{ runner.arch }}
85+ path : /var/cache/sccache
86+ - name : Allow sccache cache write access
87+ if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
88+ run : sudo chmod 1777 /var/cache/sccache
7089 - name : Install nix (ephemeral)
7190 if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
7291 uses : ./.github/actions/nix-install-ephemeral
7392 with :
7493 push-to-cache : ' true'
94+ enable-sccache-sandbox-path : ' true'
7595 env :
7696 DEV_AWS_ROLE : ${{ secrets.DEV_AWS_ROLE }}
7797 NIX_SIGN_SECRET_KEY : ${{ secrets.NIX_SIGN_SECRET_KEY }}
@@ -144,10 +164,20 @@ jobs:
144164 - name : Checkout Repo
145165 if : ${{ matrix.attr != '' }}
146166 uses : actions/checkout@v4
167+ - name : Mount sccache disk
168+ if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
169+ uses : useblacksmith/stickydisk@v1
170+ with :
171+ key : ${{ github.repository }}-sccache-${{ runner.os }}-${{ runner.arch }}
172+ path : /var/cache/sccache
173+ - name : Allow sccache cache write access
174+ if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
175+ run : sudo chmod 1777 /var/cache/sccache
147176 - name : Install nix
148177 if : ${{ matrix.attr != '' }}
149178 uses : ./.github/actions/nix-install-ephemeral
150179 with :
180+ enable-sccache-sandbox-path : ' true'
151181 push-to-cache : ' true'
152182 env :
153183 DEV_AWS_ROLE : ${{ secrets.DEV_AWS_ROLE }}
@@ -172,10 +202,20 @@ jobs:
172202 - name : Checkout Repo
173203 if : ${{ matrix.attr != '' }}
174204 uses : actions/checkout@v4
205+ - name : Mount sccache disk
206+ if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
207+ uses : useblacksmith/stickydisk@v1
208+ with :
209+ key : ${{ github.repository }}-sccache-${{ runner.os }}-${{ runner.arch }}
210+ path : /var/cache/sccache
211+ - name : Allow sccache cache write access
212+ if : ${{ matrix.attr != '' && matrix.runs_on.group != 'self-hosted-runners-nix' }}
213+ run : sudo chmod 1777 /var/cache/sccache
175214 - name : Install nix
176215 if : ${{ matrix.attr != '' }}
177216 uses : ./.github/actions/nix-install-ephemeral
178217 with :
218+ enable-sccache-sandbox-path : ' true'
179219 push-to-cache : ' true'
180220 env :
181221 DEV_AWS_ROLE : ${{ secrets.DEV_AWS_ROLE }}
0 commit comments