Build SD images #217
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@v5 | |
| 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 | |
| BOOT_IMG="" | |
| if [[ "${{ matrix.board }}" == "aaw3" ]]; then | |
| BOOT_IMG="boot1.img boot2.img" | |
| fi | |
| tar -cJf "$TAR_NAME" -C "$IMAGE_DIR" download.bin env.img env_r.img idblock.img uboot.img $BOOT_IMG root.img | |
| 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 | |
| UPDATE_IMG="$IMAGE_DIR/update_image.swu" | |
| if [[ -f "$UPDATE_IMG" ]]; then | |
| cp -f "$UPDATE_IMG" images/${{ matrix.board }}.swu | |
| fi | |
| - name: Upload AAW artifact | |
| if: startsWith(matrix.board, 'aaw') | |
| uses: actions/upload-artifact@v7 | |
| 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@v7 | |
| with: | |
| name: ${{ matrix.board }}-sdcard | |
| path: images/${{ matrix.board }}-sdcard.img.xz | |
| - name: Upload SWU artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ matrix.board }}-swu | |
| path: images/${{ matrix.board }}.swu | |
| merge: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/upload-artifact/merge@v7 | |
| with: | |
| name: aa-proxy-rs-merged |