@@ -32,20 +32,24 @@ jobs:
3232 uses : actions/cache/restore@v4
3333 with :
3434 path : |
35- distfiles
35+ mirror
36+ mirror-state
3637 key : cache-${{ hashFiles('steps/*/sources') }}
38+ restore-keys : |
39+ cache-
3740 - name : Get sources
3841 if : steps.cache.outputs.cache-hit != 'true'
39- run : ./download-distfiles .sh
42+ run : mkdir -p mirror mirror-state && ./mirror .sh mirror mirror-state
4043 - name : Cache sources
4144 if : steps.cache.outputs.cache-hit != 'true'
4245 uses : actions/cache/save@v4
4346 with :
4447 path : |
45- distfiles
48+ mirror
49+ mirror-state
4650 key : cache-${{ hashFiles('steps/*/sources') }}
4751 - name : Run bootstrap
48- run : ./rootfs.py --bwrap --external-sources --build-kernels --cores 2 --internal-ci pass1
52+ run : ./rootfs.py --bwrap --external-sources --build-kernels --cores 2 --internal-ci pass1 --mirror file://${PWD}/mirror
4953 - name : Archive created packages
5054 if : failure() # archive failed builds progress
5155 uses : actions/upload-artifact@v4
@@ -87,18 +91,12 @@ jobs:
8791 uses : actions/cache/restore@v4
8892 with :
8993 path : |
90- distfiles
91- key : cache-${{ hashFiles('steps/*/sources') }}
92- - name : Get sources
93- if : steps.cache.outputs.cache-hit != 'true'
94- run : ./download-distfiles.sh
95- - name : Cache sources
96- if : steps.cache.outputs.cache-hit != 'true'
97- uses : actions/cache/save@v4
98- with :
99- path : |
100- distfiles
94+ mirror
95+ mirror-state
10196 key : cache-${{ hashFiles('steps/*/sources') }}
97+ fail-on-cache-miss : true
98+ - name : Copy distfiles
99+ run : ./download-distfiles.sh file:///${PWD}/mirror
102100 - name : Run bootstrap
103101 run : ./rootfs.py --bwrap --external-sources --build-kernels --cores 2 --internal-ci pass2
104102 - name : Archive created packages
@@ -142,20 +140,14 @@ jobs:
142140 uses : actions/cache/restore@v4
143141 with :
144142 path : |
145- distfiles
146- key : cache-${{ hashFiles('steps/*/sources') }}
147- - name : Get sources
148- if : steps.cache.outputs.cache-hit != 'true'
149- run : ./download-distfiles.sh
150- - name : Cache sources
151- if : steps.cache.outputs.cache-hit != 'true'
152- uses : actions/cache/save@v4
153- with :
154- path : |
155- distfiles
143+ mirror
144+ mirror-state
156145 key : cache-${{ hashFiles('steps/*/sources') }}
146+ fail-on-cache-miss : true
147+ - name : Copy distfiles
148+ run : ./download-distfiles.sh file:///${PWD}/mirror
157149 - name : Run bootstrap
158- run : ./rootfs.py --bwrap --external-sources --build-kernels --cores 2 --internal-ci pass3
150+ run : ./rootfs.py --bwrap --external-sources --build-kernels --cores 2 --internal-ci pass3 --mirror file://${PWD}/mirror
159151 - name : Archive created packages
160152 if : always() # archive both failed and successful builds
161153 uses : actions/upload-artifact@v4
0 commit comments