Skip to content

Commit 1ed1c7e

Browse files
committed
Add test download
1 parent 756b6bc commit 1ed1c7e

1 file changed

Lines changed: 52 additions & 12 deletions

File tree

.github/workflows/zzz-reuse-build.yml

Lines changed: 52 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ jobs:
190190
uses: cytopia/[email protected]
191191
with:
192192
command: |
193-
make save VERSION=${{ matrix.version }} FLAVOUR=base ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.base }}
193+
make save VERSION=${{ matrix.version }} FLAVOUR=base ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.base }} \
194+
&& make load INFILE=${{ steps.set-artifact-name.outputs.base }}
194195
if: ${{ inputs.flavour == 'base' }}
195196

196197
###
@@ -203,17 +204,18 @@ jobs:
203204
with: |
204205
name: ${{ steps.set-artifact-name.outputs.base }}
205206
path: ${{ steps.set-artifact-name.outputs.base }}
207+
if-no-files-found: error
206208
attempt_limit: 20
207209
attempt_delay: 10000
208210
if: ${{ inputs.flavour == 'base' }}
209211

210-
- name: "[Artifact Save] Upload base (verify)"
212+
- name: "[Artifact Save] Download base (verify)"
211213
continue-on-error: true
212214
id: download-base-1
213215
uses: actions/download-artifact@v3
214216
with:
215217
name: ${{ steps.set-artifact-name.outputs.base }}
216-
path: ${{ steps.set-artifact-name.outputs.base }}
218+
path: ${{ steps.set-artifact-name.outputs.base }}.tmp
217219
if: ${{ inputs.flavour == 'base' }}
218220

219221
###
@@ -226,10 +228,18 @@ jobs:
226228
with: |
227229
name: ${{ steps.set-artifact-name.outputs.base }}
228230
path: ${{ steps.set-artifact-name.outputs.base }}
231+
if-no-files-found: error
229232
attempt_limit: 20
230233
attempt_delay: 10000
231234
if: ${{ inputs.flavour == 'base' && steps.download-base-1.outcome == 'failure'}}
232235

236+
- name: "[Artifact Save] Download base (verify 2)"
237+
uses: actions/download-artifact@v3
238+
with:
239+
name: ${{ steps.set-artifact-name.outputs.base }}
240+
path: ${{ steps.set-artifact-name.outputs.base }}.tmp
241+
if: ${{ inputs.flavour == 'base' && steps.download-base-1.outcome == 'failure'}}
242+
233243

234244
# ------------------------------------------------------------
235245
# Artifact Expot (mods)
@@ -242,7 +252,8 @@ jobs:
242252
uses: cytopia/[email protected]
243253
with:
244254
command: |
245-
make save VERSION=${{ matrix.version }} FLAVOUR=mods ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.mods }}
255+
make save VERSION=${{ matrix.version }} FLAVOUR=mods ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.mods }} \
256+
&& make load INFILE=${{ steps.set-artifact-name.outputs.mods }}
246257
if: ${{ inputs.flavour == 'mods' }}
247258

248259
###
@@ -255,17 +266,18 @@ jobs:
255266
with: |
256267
name: ${{ steps.set-artifact-name.outputs.mods }}
257268
path: ${{ steps.set-artifact-name.outputs.mods }}
269+
if-no-files-found: error
258270
attempt_limit: 20
259271
attempt_delay: 10000
260272
if: ${{ inputs.flavour == 'mods' }}
261273

262-
- name: "[Artifact Save] Upload mods (verify)"
274+
- name: "[Artifact Save] Download mods (verify)"
263275
continue-on-error: true
264276
id: download-mods-1
265277
uses: actions/download-artifact@v3
266278
with:
267279
name: ${{ steps.set-artifact-name.outputs.mods }}
268-
path: ${{ steps.set-artifact-name.outputs.mods }}
280+
path: ${{ steps.set-artifact-name.outputs.mods }}.tmp
269281
if: ${{ inputs.flavour == 'mods' }}
270282

271283
###
@@ -278,10 +290,18 @@ jobs:
278290
with: |
279291
name: ${{ steps.set-artifact-name.outputs.mods }}
280292
path: ${{ steps.set-artifact-name.outputs.mods }}
293+
if-no-files-found: error
281294
attempt_limit: 20
282295
attempt_delay: 10000
283296
if: ${{ inputs.flavour == 'mods' && steps.download-mods-1.outcome == 'failure'}}
284297

298+
- name: "[Artifact Save] Download mods (verify 2)"
299+
uses: actions/download-artifact@v3
300+
with:
301+
name: ${{ steps.set-artifact-name.outputs.mods }}
302+
path: ${{ steps.set-artifact-name.outputs.mods }}.tmp
303+
if: ${{ inputs.flavour == 'mods' && steps.download-mods-1.outcome == 'failure'}}
304+
285305

286306
# ------------------------------------------------------------
287307
# Artifact Expot (prod)
@@ -294,7 +314,8 @@ jobs:
294314
uses: cytopia/[email protected]
295315
with:
296316
command: |
297-
make save VERSION=${{ matrix.version }} FLAVOUR=prod ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.prod }}
317+
make save VERSION=${{ matrix.version }} FLAVOUR=prod ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.prod }} \
318+
&& make load INFILE=${{ steps.set-artifact-name.outputs.prod }}
298319
if: ${{ inputs.flavour == 'prod' }}
299320

300321
###
@@ -307,17 +328,18 @@ jobs:
307328
with: |
308329
name: ${{ steps.set-artifact-name.outputs.prod }}
309330
path: ${{ steps.set-artifact-name.outputs.prod }}
331+
if-no-files-found: error
310332
attempt_limit: 20
311333
attempt_delay: 10000
312334
if: ${{ inputs.flavour == 'prod' }}
313335

314-
- name: "[Artifact Save] Upload prod (verify)"
336+
- name: "[Artifact Save] Download prod (verify)"
315337
continue-on-error: true
316338
id: download-prod-1
317339
uses: actions/download-artifact@v3
318340
with:
319341
name: ${{ steps.set-artifact-name.outputs.prod }}
320-
path: ${{ steps.set-artifact-name.outputs.prod }}
342+
path: ${{ steps.set-artifact-name.outputs.prod }}.tmp
321343
if: ${{ inputs.flavour == 'prod' }}
322344

323345
###
@@ -330,10 +352,18 @@ jobs:
330352
with: |
331353
name: ${{ steps.set-artifact-name.outputs.prod }}
332354
path: ${{ steps.set-artifact-name.outputs.prod }}
355+
if-no-files-found: error
333356
attempt_limit: 20
334357
attempt_delay: 10000
335358
if: ${{ inputs.flavour == 'prod' && steps.download-prod-1.outcome == 'failure'}}
336359

360+
- name: "[Artifact Save] Download prod (verify 2)"
361+
uses: actions/download-artifact@v3
362+
with:
363+
name: ${{ steps.set-artifact-name.outputs.prod }}
364+
path: ${{ steps.set-artifact-name.outputs.prod }}.tmp
365+
if: ${{ inputs.flavour == 'prod' && steps.download-prod-1.outcome == 'failure'}}
366+
337367

338368
# ------------------------------------------------------------
339369
# Artifact Expot (work)
@@ -346,7 +376,8 @@ jobs:
346376
uses: cytopia/[email protected]
347377
with:
348378
command: |
349-
make save VERSION=${{ matrix.version }} FLAVOUR=work ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.work }}
379+
make save VERSION=${{ matrix.version }} FLAVOUR=work ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.work }} \
380+
&& make load INFILE=${{ steps.set-artifact-name.outputs.work }}
350381
if: ${{ inputs.flavour == 'work' }}
351382

352383
###
@@ -359,17 +390,18 @@ jobs:
359390
with: |
360391
name: ${{ steps.set-artifact-name.outputs.work }}
361392
path: ${{ steps.set-artifact-name.outputs.work }}
393+
if-no-files-found: error
362394
attempt_limit: 20
363395
attempt_delay: 10000
364396
if: ${{ inputs.flavour == 'work' }}
365397

366-
- name: "[Artifact Save] Upload work (verify)"
398+
- name: "[Artifact Save] Download work (verify)"
367399
continue-on-error: true
368400
id: download-work-1
369401
uses: actions/download-artifact@v3
370402
with:
371403
name: ${{ steps.set-artifact-name.outputs.work }}
372-
path: ${{ steps.set-artifact-name.outputs.work }}
404+
path: ${{ steps.set-artifact-name.outputs.work }}.tmp
373405
if: ${{ inputs.flavour == 'work' }}
374406

375407
###
@@ -382,6 +414,14 @@ jobs:
382414
with: |
383415
name: ${{ steps.set-artifact-name.outputs.work }}
384416
path: ${{ steps.set-artifact-name.outputs.work }}
417+
if-no-files-found: error
385418
attempt_limit: 20
386419
attempt_delay: 10000
387420
if: ${{ inputs.flavour == 'work' && steps.download-work-1.outcome == 'failure'}}
421+
422+
- name: "[Artifact Save] Download work (verify 2)"
423+
uses: actions/download-artifact@v3
424+
with:
425+
name: ${{ steps.set-artifact-name.outputs.work }}
426+
path: ${{ steps.set-artifact-name.outputs.work }}.tmp
427+
if: ${{ inputs.flavour == 'work' && steps.download-work-1.outcome == 'failure'}}

0 commit comments

Comments
 (0)