forked from adafruit/tinyuf2
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.77 KB
/
build_ghostfat.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Testing ghostfat
on:
workflow_call:
inputs:
boards:
required: true
type: string
jobs:
board:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board: ${{ fromJSON(inputs.boards) }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
make -C ports/test_ghostfat/ BOARD=${{ matrix.board }} all
- name: Decompress known good filesystem image
run: |
# NOTE: test_huge's knowngood.img file starts as 1.5 GiB
# Compressing once with GZip results gives 85 MiB
# Compressing it a second time gives 10 MiB ...
# Therefore, store known good images double-compressed...
cp ./boards/${{ matrix.board }}/knowngood.img.gz.gz ./_build/${{ matrix.board }}/
gzip --decompress ./_build/${{ matrix.board }}/knowngood.img.gz.gz
gzip --decompress ./_build/${{ matrix.board }}/knowngood.img.gz
working-directory: ports/test_ghostfat
- name: Execute native self-test
run: |
chmod +x ./tinyuf2-${{ matrix.board }}.elf
./tinyuf2-${{ matrix.board }}.elf
# Compress (double) newly generated self-test images
mv ghostfat.img ghostfat_${{ matrix.board }}.img
gzip --keep ghostfat_${{ matrix.board }}.img
gzip --keep --force --best ghostfat_${{ matrix.board }}.img.gz
working-directory: ports/test_ghostfat/_build/${{ matrix.board }}
- name: Save newly generated self-test images as CI artifacts
uses: actions/upload-artifact@v4
with:
name: ghostfat_${{ matrix.board }}_image
path: ./ports/test_ghostfat/_build/${{ matrix.board }}/ghostfat_${{ matrix.board }}.img.gz.gz