Move compression outside of mount script #337
Workflow file for this run
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 driver | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: [ main ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| rubik: | |
| env: | |
| script: "./tmp/build/install_rubikpi3.sh" | |
| base_image: "https://people.canonical.com/~platform/images/qualcomm-iot/rubikpi3/ubuntu-server-24.04/x00/ubuntu-24.04-preinstalled-server-arm64+rubikpi3-20250912-127.yaml" | |
| runs-on: ubuntu-24.04 | |
| name: "Build for RubikPi3" | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| fetch-depth: 0 | |
| - name: Fetch tags | |
| run: git fetch --tags --force | |
| - name: Build rubikpi3 with mounting | |
| run: | | |
| chmod +x ./mount_rubikpi3.sh | |
| ./mount_rubikpi3.sh ${{ env.base_image }} ${{ env.script }} ${{ github.ref_name }} | |
| - name: Compress built image | |
| run: | | |
| tar -I 'xz -T0' -cf photonvision_rubikpi3.tar.xz ${{ env.image_dir }} --checkpoint=10000 --checkpoint-action=echo='%T' | |
| - uses: actions/[email protected] | |
| with: | |
| name: photonvision_rubikpi3.tar.xz | |
| path: photonvision_rubikpi3.tar.xz | |
| if-no-files-found: error | |
| retention-days: 1 | |
| build: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: limelight | |
| script: ./install_limelight.sh | |
| base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-07-04/2024-07-04-raspios-bookworm-arm64-lite.img.xz | |
| - name: limelight3 | |
| script: ./install_limelight3.sh | |
| base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-07-04/2024-07-04-raspios-bookworm-arm64-lite.img.xz | |
| - name: limelight3g | |
| script: ./install_limelight3g.sh | |
| base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-07-04/2024-07-04-raspios-bookworm-arm64-lite.img.xz | |
| - name: limelight4 | |
| script: ./install_limelight4.sh | |
| base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-07-04/2024-07-04-raspios-bookworm-arm64-lite.img.xz | |
| - name: raspi | |
| script: ./install_pi.sh | |
| base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-07-04/2024-07-04-raspios-bookworm-arm64-lite.img.xz | |
| - name: raspi_dev | |
| script: ./install_dev_pi.sh | |
| base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-07-04/2024-07-04-raspios-bookworm-arm64-lite.img.xz | |
| - name: snakeyes | |
| script: ./install_snakeyes.sh | |
| base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-07-04/2024-07-04-raspios-bookworm-arm64-lite.img.xz | |
| - name: opi5 | |
| script: ./install_opi5.sh | |
| base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v2.4.0/ubuntu-24.04-preinstalled-server-arm64-orangepi-5.img.xz | |
| - name: opi5b | |
| script: ./install_opi5.sh | |
| base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v2.4.0/ubuntu-24.04-preinstalled-server-arm64-orangepi-5b.img.xz | |
| - name: opi5plus | |
| script: ./install_opi5.sh | |
| base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v2.4.0/ubuntu-24.04-preinstalled-server-arm64-orangepi-5-plus.img.xz | |
| - name: opi5pro | |
| script: ./install_opi5.sh | |
| base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v2.4.0/ubuntu-24.04-preinstalled-server-arm64-orangepi-5-pro.img.xz | |
| - name: opi5max | |
| script: ./install_opi5.sh | |
| base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v2.4.0/ubuntu-24.04-preinstalled-server-arm64-orangepi-5-max.img.xz | |
| - name: rock5c | |
| script: ./install_opi5.sh | |
| base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v2.4.0/ubuntu-24.04-preinstalled-server-arm64-rock-5c.img.xz | |
| name: "Build for ${{ matrix.name }}" | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| fetch-depth: 0 | |
| - name: Fetch tags | |
| run: git fetch --tags --force | |
| - uses: pguyot/arm-runner-action@HEAD | |
| id: install_deps | |
| with: | |
| image_additional_mb: 1500 | |
| bind_mount_repository: true | |
| base_image: ${{ matrix.base_image }} | |
| commands: | | |
| chmod +x ${{matrix.script}} | |
| ${{ matrix.script }} | |
| chmod +x ./install_common.sh | |
| ./install_common.sh | |
| mkdir -p /opt/photonvision/ | |
| echo "${{ github.ref_name }};${{ matrix.name }}" > /opt/photonvision/image-version | |
| - name: Compress built image | |
| run: | | |
| mv ${{ steps.install_deps.outputs.image }} photonvision_${{ matrix.name }}.img | |
| sudo xz -T 0 -v photonvision_${{ matrix.name }}.img | |
| - uses: actions/[email protected] | |
| with: | |
| name: photonvision_${{ matrix.name }}.img.xz | |
| path: photonvision_${{ matrix.name }}.img.xz | |
| if-no-files-found: error | |
| retention-days: 1 | |
| release: | |
| needs: [build, rubik] | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| # Download literally every single artifact | |
| - uses: actions/[email protected] | |
| - run: find | |
| # Push to dev release and/or to a real release if tagged using semantic versioning | |
| # See https://github.com/pyTooling/Actions/tree/dev/releaser | |
| - uses: pyTooling/Actions/[email protected] | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: 'Dev' | |
| rm: true | |
| files: | | |
| **/*.xz | |
| if: github.event_name == 'push' |