Build SD images #114
This file contains hidden or 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
| name: Build SD images | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| board: [aaw2b, aaw3, rpi02w, rpi0w, rpi3a, rpi4, rpi5, radxa03w, milkv-duos] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Build Docker image | |
| run: CONTAINER_ENGINE=docker ./docker-dev.sh build | |
| - name: Build image for ${{ matrix.board }} | |
| run: | | |
| set -e | |
| mkdir images | |
| echo "Building board: ${{ matrix.board }}" | |
| CONTAINER_ENGINE=docker ./docker-dev.sh "${{ matrix.board }}" | |
| IMAGE_DIR=buildroot/output/${{ matrix.board }}/images | |
| if [[ "${{ matrix.board }}" == aaw* ]]; then | |
| TAR_NAME=images/${{ matrix.board }}-images.tar.xz | |
| echo "Compressing entire images directory for aaw..." | |
| tar -cJf "$TAR_NAME" -C "$IMAGE_DIR" . | |
| else | |
| IMG="$IMAGE_DIR/sdcard.img" | |
| if [[ -f "$IMG" ]]; then | |
| xz -c "$IMG" > images/${{ matrix.board }}-sdcard.img.xz | |
| else | |
| echo "WARNING: Image $IMG not found!" | |
| #exit 1 | |
| fi | |
| fi | |
| - name: Upload AAW artifact | |
| if: startsWith(matrix.board, 'aaw') | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.board }}-images | |
| path: images/${{ matrix.board }}-images.tar.xz | |
| - name: Upload SD-card artifact | |
| if: ${{ !startsWith(matrix.board, 'aaw') }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.board }}-sdcard | |
| path: images/${{ matrix.board }}-sdcard.img.xz | |
| merge: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/upload-artifact/merge@v4 | |
| with: | |
| name: aa-proxy-rs-merged |