forked from adafruit/tinyuf2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move ghostfat to its own callable workflow
- Loading branch information
Showing
2 changed files
with
54 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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@v3 | ||
with: | ||
name: ghostfat_selftest_images | ||
path: ./ports/test_ghostfat/_build/${{ matrix.board }}/ghostfat_${{ matrix.board }}.img.gz.gz |