@@ -71,50 +71,59 @@ jobs:
7171 make check-unit
7272
7373 e2e-images :
74- name : " prepare: ${{ matrix.name }}"
74+ name : " prepare: ${{ matrix.vendor }}"
7575 runs-on : ubuntu-latest
7676 needs : [ verify ]
7777 strategy :
7878 matrix :
79- name : [
79+ vendor : [
8080 " altlinux" ,
8181 " fedora" ,
8282 " gentoo" ,
8383 " ubuntu" ,
8484 ]
8585 fail-fast : true
8686 steps :
87+ - name : " Get Date"
88+ id : date
89+ run : |
90+ echo "date=$(date +'%Y-%V')" > "$GITHUB_OUTPUT"
91+
92+ - name : " Get Cache"
93+ uses : actions/cache@v4
94+ id : cache
95+ with :
96+ path : ~/.images/${{ matrix.vendor }}
97+ key : vendor-${{ matrix.vendor }}-${{ steps.date.outputs.date }}
98+
8799 - name : " Checkout Repository"
100+ if : steps.cache.outputs.cache-hit != 'true'
88101 uses : actions/checkout@v4
89102
90103 - name : " Create images"
91- run : testing/testing-${{ matrix.name }}-local create-images
104+ if : steps.cache.outputs.cache-hit != 'true'
105+ run : testing/testing-${{ matrix.vendor }}-local create-images
92106
93107 - name : " Check image existence"
108+ if : steps.cache.outputs.cache-hit != 'true'
94109 run : |
95- test -n "$(podman images -an --format='1' -f reference=localhost/image-${{ matrix.name }}:sysimage)"
96- test -n "$(podman images -an --format='1' -f reference=localhost/image-${{ matrix.name }}:devel)"
110+ test -n "$(podman images -an --format='1' -f reference=localhost/image-${{ matrix.vendor }}:sysimage)"
111+ test -n "$(podman images -an --format='1' -f reference=localhost/image-${{ matrix.vendor }}:devel)"
97112
98113 - name : " Save podman images"
114+ if : steps.cache.outputs.cache-hit != 'true'
99115 run : |
100- podman image save "localhost/image-${{ matrix.name }}:sysimage" | gzip -c > "/tmp/image-${{ matrix.name }}-sysimage.tar.gz"
101- podman image save "localhost/image-${{ matrix.name }}:devel" | gzip -c > "/tmp/image-${{ matrix.name }}-devel.tar.gz"
102-
103- - uses : actions/upload-artifact@v4
104- with :
105- name : image-${{ matrix.name }}
106- path : /tmp/image-${{ matrix.name }}-*.tar.gz
107- overwrite : true
108- compression-level : 0
109- retention-days : 1
116+ mkdir -p -- ~/.images/${{ matrix.vendor }}
117+ podman image save "localhost/image-${{ matrix.vendor }}:sysimage" | gzip -c > ~/.images/${{ matrix.vendor }}/image-sysimage.tar.gz
118+ podman image save "localhost/image-${{ matrix.vendor }}:devel" | gzip -c > ~/.images/${{ matrix.vendor }}/image-devel.tar.gz
110119
111120 e2e-local :
112- name : " check: ${{ matrix.name }} ${{ matrix.testcase }}"
121+ name : " check: ${{ matrix.vendor }} ${{ matrix.testcase }}"
113122 needs : [ e2e-images ]
114123 runs-on : ubuntu-latest
115124 strategy :
116125 matrix :
117- name : [
126+ vendor : [
118127 " altlinux" ,
119128 " fedora" ,
120129 " gentoo" ,
@@ -146,17 +155,35 @@ jobs:
146155 " zfs-partition" ,
147156 ]
148157 exclude :
149- - name : fedora
158+ - vendor : fedora
150159 testcase : zfs-partition
151160
152- - name : altlinux
161+ - vendor : altlinux
153162 testcase : zfs-partition
154163
155- - name : gentoo
164+ - vendor : gentoo
156165 testcase : zfs-partition
157166
158167 fail-fast : false
159168 steps :
169+ - name : " Get Date"
170+ id : date
171+ run : |
172+ echo "date=$(date +'%Y-%V')" > "$GITHUB_OUTPUT"
173+
174+ - name : " Get Cache"
175+ uses : actions/cache@v4
176+ id : cache
177+ with :
178+ path : ~/.images/${{ matrix.vendor }}
179+ key : vendor-${{ matrix.vendor }}-${{ steps.date.outputs.date }}
180+ fail-on-cache-miss : true
181+
182+ - name : " Load podman images"
183+ run : |
184+ podman image load -i=$HOME/.images/${{ matrix.vendor }}/image-sysimage.tar.gz
185+ podman image load -i=$HOME/.images/${{ matrix.vendor }}/image-devel.tar.gz
186+
160187 - name : " Prepare Node"
161188 run : |
162189 for m in kvm kvm-amd kvm-intel; do sudo modprobe -v "$m" ||:; done
@@ -175,43 +202,33 @@ jobs:
175202 git submodule set-url external/busybox/upstream https://github.com/mirror/busybox
176203 git submodule update --init --recursive
177204
178- - uses : actions/download-artifact@v4
179- with :
180- name : image-${{ matrix.name }}
181- path : /tmp/artifacts
182-
183- - name : " Load podman images"
184- run : |
185- podman image load -i="/tmp/artifacts/image-${{ matrix.name }}-sysimage.tar.gz"
186- podman image load -i="/tmp/artifacts/image-${{ matrix.name }}-devel.tar.gz"
187-
188205 - name : " Build Sources"
189- run : testing/testing-${{ matrix.name }}-local test-root-${{ matrix.testcase }} build-sources
206+ run : testing/testing-${{ matrix.vendor }}-local test-root-${{ matrix.testcase }} build-sources
190207
191208 - name : " Build Sysimage"
192- run : testing/testing-${{ matrix.name }}-local test-root-${{ matrix.testcase }} build-sysimage
209+ run : testing/testing-${{ matrix.vendor }}-local test-root-${{ matrix.testcase }} build-sysimage
193210
194211 - name : " Build Kickstart"
195- run : testing/testing-${{ matrix.name }}-local test-root-${{ matrix.testcase }} build-kickstart
212+ run : testing/testing-${{ matrix.vendor }}-local test-root-${{ matrix.testcase }} build-kickstart
196213
197214 - name : " Run Kickstart"
198215 env :
199216 QEMU_TIMEOUT : 40m
200217 QEMU_MEMORY : 1G
201218 QEMU_DISK_FORMAT : qcow2
202- run : testing/testing-${{ matrix.name }}-local test-root-${{ matrix.testcase }} run-kickstart
219+ run : testing/testing-${{ matrix.vendor }}-local test-root-${{ matrix.testcase }} run-kickstart
203220
204221 - name : " Boot System"
205222 env :
206223 QEMU_TIMEOUT : 10m
207224 QEMU_MEMORY : 1G
208225 QEMU_DISK_FORMAT : qcow2
209- run : testing/testing-${{ matrix.name }}-local test-root-${{ matrix.testcase }} run-boot
226+ run : testing/testing-${{ matrix.vendor }}-local test-root-${{ matrix.testcase }} run-boot
210227
211228 - name : " Archive Metrics"
212229 uses : actions/upload-artifact@v4
213230 with :
214- name : " metrics-${{ matrix.name }}-local-${{ matrix.testcase }}"
231+ name : " metrics-${{ matrix.vendor }}-local-${{ matrix.testcase }}"
215232 path : testing/status/artifact-*.txt
216233 if-no-files-found : ignore
217234 retention-days : 1
0 commit comments