From b8e9e4f5c70877005a08b9841bbeaa74c0ccef0e Mon Sep 17 00:00:00 2001 From: Sam Freund Date: Sun, 3 May 2026 13:28:01 -0500 Subject: [PATCH] Build images for 2027 and bump libcamera (#2442) --- .github/workflows/build.yml | 395 ++++++++++++++++++------------------ build.gradle | 2 +- 2 files changed, 196 insertions(+), 201 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a401ff542..5f12354b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ concurrency: cancel-in-progress: true env: - IMAGE_VERSION: v2026.1.4 + IMAGE_VERSION: v2027.0.0 jobs: @@ -467,203 +467,198 @@ jobs: ls *.jar | %{ Write-Host "Running $($_.Name)"; Start-Process "java" -ArgumentList "-jar `"$($_.FullName)`" --smoketest" -NoNewWindow -Wait; break } if: ${{ (matrix.os) == 'windows-latest' }} -# build-image: -# needs: [build-package-linux] -# -# strategy: -# fail-fast: false -# matrix: -# include: -# - os: ubuntu-24.04-arm -# image_suffix: RaspberryPi -# plat_override: LINUX_RASPBIAN64 -# image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_raspi.img.xz -# minimum_free_mb: 100 -# - os: ubuntu-24.04-arm -# image_suffix: limelight2 -# plat_override: LINUX_RASPBIAN64 -# image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_limelight.img.xz -# minimum_free_mb: 100 -# - os: ubuntu-24.04-arm -# image_suffix: limelight3 -# plat_override: LINUX_RASPBIAN64 -# image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_limelight3.img.xz -# minimum_free_mb: 100 -# - os: ubuntu-24.04-arm -# image_suffix: limelight3G -# plat_override: LINUX_RASPBIAN64 -# image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_limelight3g.img.xz -# minimum_free_mb: 100 -# - os: ubuntu-24.04-arm -# image_suffix: limelight4 -# plat_override: LINUX_RASPBIAN64 -# image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_limelight4.img.xz -# minimum_free_mb: 100 -# - os: ubuntu-24.04-arm -# image_suffix: luma_p1 -# plat_override: LINUX_RASPBIAN64 -# image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_luma_p1.img.xz -# minimum_free_mb: 100 -# - os: ubuntu-24.04-arm -# image_suffix: orangepi5 -# plat_override: LINUX_RK3588_64 -# image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_opi5.img.xz -# minimum_free_mb: 1024 -# - os: ubuntu-24.04-arm -# image_suffix: orangepi5b -# plat_override: LINUX_RK3588_64 -# image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_opi5b.img.xz -# minimum_free_mb: 1024 -# - os: ubuntu-24.04-arm -# image_suffix: orangepi5plus -# plat_override: LINUX_RK3588_64 -# image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_opi5plus.img.xz -# minimum_free_mb: 1024 -# - os: ubuntu-24.04-arm -# image_suffix: orangepi5pro -# plat_override: LINUX_RK3588_64 -# image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_opi5pro.img.xz -# minimum_free_mb: 1024 -# - os: ubuntu-24.04-arm -# image_suffix: orangepi5max -# plat_override: LINUX_RK3588_64 -# image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_opi5max.img.xz -# minimum_free_mb: 1024 -# - os: ubuntu-24.04-arm -# image_suffix: rock5c -# plat_override: LINUX_RK3588_64 -# image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_rock5c.img.xz -# minimum_free_mb: 1024 -# - os: ubuntu-24.04-arm -# image_suffix: orangepi6plus -# plat_override: LINUX_AARCH64 -# image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_opi6plus.img.xz -# minimum_free_mb: 1024 -# - os: ubuntu-24.04-arm -# image_suffix: rubikpi3 -# plat_override: LINUX_QCS6490 -# image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_rubikpi3.tar.xz -# minimum_free_mb: 1024 -# root_location: 'offset=569376768' -# shrink_image: 'no' -# -# runs-on: ${{ matrix.os }} -# name: "Build image - ${{ matrix.image_suffix }}" -# -# steps: -# - name: Checkout code -# uses: actions/checkout@v6 -# with: -# fetch-depth: 0 -# - uses: actions/download-artifact@v8 -# with: -# pattern: photonvision-*-linuxarm64.jar -# - uses: photonvision/photon-image-runner@HEAD -# name: Generate image -# id: generate_image -# with: -# image_url: ${{ matrix.image_url }} -# minimum_free_mb: ${{ matrix.minimum_free_mb }} -# root_location: ${{ matrix.root_location || 'partition=2' }} -# shrink_image: ${{ matrix.shrink_image || 'yes' }} -# commands: ./scripts/armrunner.sh -# -# - name: Compress image -# # Compress the standard images -# if: ${{ ! startsWith(matrix.image_suffix, 'rubik') }} -# run: | -# set -ex -# new_jar=$(realpath $(find . -name photonvision\*-linuxarm64.jar)) -# new_image_name=$(basename "${new_jar/.jar/_${{ matrix.image_suffix }}.img}") -# sudo mv ${{ steps.generate_image.outputs.image }} $new_image_name -# sudo xz -T 0 -kv $new_image_name -# echo "smoketest_image_loc=${new_image_name}" >> $GITHUB_ENV -# -# - name: Tar built image (Rubik) -# # Build the RubikPi3-specific tar file -# if: ${{ startsWith(matrix.image_suffix, 'rubik') }} -# run: | -# set -ex -# new_jar=$(realpath $(find . -name photonvision\*-linuxarm64.jar)) -# tardir=$(basename "${new_jar/.jar/_${{ matrix.image_suffix }}.img}") -# imagedir=$(dirname ${{ steps.generate_image.outputs.image }}) -# sudo mkdir --parents ${tardir} -# sudo cp ${imagedir}/* ${tardir}/ -# sudo tar -I 'xz -T0' -cf ${tardir}.tar.xz ${tardir} --checkpoint=10000 --checkpoint-action=echo='%T' -# # Point smoketest to the old image -# echo "smoketest_image_loc=${{ steps.generate_image.outputs.image }}" >> $GITHUB_ENV -# -# - uses: actions/upload-artifact@v7 -# with: -# archive: false -# path: photonvision*.xz -# -# # This is done after uploading the image to avoid contaminating the image with logs, caches, etc. -# - uses: photonvision/photon-image-runner@HEAD -# name: Smoketest Image -# with: -# image_url: file://${{ env.smoketest_image_loc }} -# minimum_free_mb: ${{ matrix.minimum_free_mb }} -# root_location: ${{ matrix.root_location || 'partition=2' }} -# shrink_image: ${{ matrix.shrink_image || 'yes' }} -# commands: java -jar *.jar --smoketest --platform=${{ matrix.plat_override }} -# -# matrix-checker: -# # This job always runs last to set the overall result based on the matrix jobs. If any matrix job failed, this job will fail. -# # This makes it so that we don't need to add each matrix job individually to CI checks. -# runs-on: ubuntu-latest -# needs: [build-image] -# if: always() -# steps: -# - run: ${{!contains(needs.*.result, 'failure')}} + build-image: + needs: [build-package-linux] -# release: -# # Require smoketest-native so that if those fail, we don't release broken artifacts -# needs: [build-photonlib-vendorjson, build-image, combine, build-package-linux, build-package-macos, build-package-windows, run-smoketest-native] -# if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && github.repository == 'PhotonVision/photonvision' -# runs-on: ubuntu-24.04 -# steps: -# # Download all fat JARs -# - uses: actions/download-artifact@v8 -# with: -# merge-multiple: true -# pattern: photonvision-*.jar -# # Download offline photonlib -# - uses: actions/download-artifact@v8 -# with: -# merge-multiple: true -# pattern: photonlib-offline -# # Download vendor json -# - uses: actions/download-artifact@v8 -# with: -# pattern: photonlib-*.json -# # Download all images -# - uses: actions/download-artifact@v8 -# with: -# merge-multiple: true -# pattern: photonvision-*.xz -# -# - run: find -# # Push to dev release -# - uses: pyTooling/Actions/releaser@r6 -# with: -# token: ${{ secrets.GITHUB_TOKEN }} -# tag: 'Dev' -# rm: true -# snapshots: false -# files: | -# **/*.xz -# **/*linux*.jar -# **/*win*.jar -# **/photonlib*.json -# **/photonlib*.zip -# if: github.event_name == 'push' -# - name: Create Vendor JSON Repo PR -# uses: wpilibsuite/vendor-json-repo/.github/actions/add_vendordep@HEAD -# with: -# repo: PhotonVision/vendor-json-repo -# token: ${{ secrets.VENDOR_JSON_REPO_PUSH_TOKEN }} -# vendordep_file: ${{ github.workspace }}/photonlib-${{ github.ref_name }}.json -# pr_title: Update photonlib to ${{ github.ref_name }} -# pr_branch: photonlib-${{ github.ref_name }} -# if: github.repository == 'PhotonVision/photonvision' && startsWith(github.ref, 'refs/tags/v') + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-24.04-arm + image_suffix: RaspberryPi + plat_override: LINUX_RASPBIAN64 + image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_raspi.img.xz + minimum_free_mb: 100 + - os: ubuntu-24.04-arm + image_suffix: limelight2 + plat_override: LINUX_RASPBIAN64 + image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_limelight.img.xz + minimum_free_mb: 100 + - os: ubuntu-24.04-arm + image_suffix: limelight3 + plat_override: LINUX_RASPBIAN64 + image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_limelight3.img.xz + minimum_free_mb: 100 + - os: ubuntu-24.04-arm + image_suffix: limelight3G + plat_override: LINUX_RASPBIAN64 + image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_limelight3g.img.xz + minimum_free_mb: 100 + - os: ubuntu-24.04-arm + image_suffix: limelight4 + plat_override: LINUX_RASPBIAN64 + image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_limelight4.img.xz + minimum_free_mb: 100 + - os: ubuntu-24.04-arm + image_suffix: luma_p1 + plat_override: LINUX_RASPBIAN64 + image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_luma_p1.img.xz + minimum_free_mb: 100 + - os: ubuntu-24.04-arm + image_suffix: orangepi5 + plat_override: LINUX_RK3588_64 + image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_opi5.img.xz + minimum_free_mb: 1024 + - os: ubuntu-24.04-arm + image_suffix: orangepi5b + plat_override: LINUX_RK3588_64 + image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_opi5b.img.xz + minimum_free_mb: 1024 + - os: ubuntu-24.04-arm + image_suffix: orangepi5plus + plat_override: LINUX_RK3588_64 + image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_opi5plus.img.xz + minimum_free_mb: 1024 + - os: ubuntu-24.04-arm + image_suffix: orangepi5pro + plat_override: LINUX_RK3588_64 + image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_opi5pro.img.xz + minimum_free_mb: 1024 + - os: ubuntu-24.04-arm + image_suffix: orangepi5max + plat_override: LINUX_RK3588_64 + image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_opi5max.img.xz + minimum_free_mb: 1024 + - os: ubuntu-24.04-arm + image_suffix: rock5c + plat_override: LINUX_RK3588_64 + image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_rock5c.img.xz + minimum_free_mb: 1024 + - os: ubuntu-24.04-arm + image_suffix: rubikpi3 + plat_override: LINUX_QCS6490 + image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_rubikpi3.tar.xz + minimum_free_mb: 1024 + root_location: 'offset=569376768' + shrink_image: 'no' + + runs-on: ${{ matrix.os }} + name: "Build image - ${{ matrix.image_suffix }}" + + steps: + - name: Checkout code + uses: actions/checkout@v6 + with: + fetch-depth: 0 + - uses: actions/download-artifact@v8 + with: + pattern: photonvision-*-linuxarm64.jar + - uses: photonvision/photon-image-runner@HEAD + name: Generate image + id: generate_image + with: + image_url: ${{ matrix.image_url }} + minimum_free_mb: ${{ matrix.minimum_free_mb }} + root_location: ${{ matrix.root_location || 'partition=2' }} + shrink_image: ${{ matrix.shrink_image || 'yes' }} + commands: ./scripts/armrunner.sh + + - name: Compress image + # Compress the standard images + if: ${{ ! startsWith(matrix.image_suffix, 'rubik') }} + run: | + set -ex + new_jar=$(realpath $(find . -name photonvision\*-linuxarm64.jar)) + new_image_name=$(basename "${new_jar/.jar/_${{ matrix.image_suffix }}.img}") + sudo mv ${{ steps.generate_image.outputs.image }} $new_image_name + sudo xz -T 0 -kv $new_image_name + echo "smoketest_image_loc=${new_image_name}" >> $GITHUB_ENV + + - name: Tar built image (Rubik) + # Build the RubikPi3-specific tar file + if: ${{ startsWith(matrix.image_suffix, 'rubik') }} + run: | + set -ex + new_jar=$(realpath $(find . -name photonvision\*-linuxarm64.jar)) + tardir=$(basename "${new_jar/.jar/_${{ matrix.image_suffix }}.img}") + imagedir=$(dirname ${{ steps.generate_image.outputs.image }}) + sudo mkdir --parents ${tardir} + sudo cp ${imagedir}/* ${tardir}/ + sudo tar -I 'xz -T0' -cf ${tardir}.tar.xz ${tardir} --checkpoint=10000 --checkpoint-action=echo='%T' + # Point smoketest to the old image + echo "smoketest_image_loc=${{ steps.generate_image.outputs.image }}" >> $GITHUB_ENV + + - uses: actions/upload-artifact@v7 + with: + archive: false + path: photonvision*.xz + + # This is done after uploading the image to avoid contaminating the image with logs, caches, etc. + - uses: photonvision/photon-image-runner@HEAD + name: Smoketest Image + with: + image_url: file://${{ env.smoketest_image_loc }} + minimum_free_mb: ${{ matrix.minimum_free_mb }} + root_location: ${{ matrix.root_location || 'partition=2' }} + shrink_image: ${{ matrix.shrink_image || 'yes' }} + commands: java -jar *.jar --smoketest --platform=${{ matrix.plat_override }} + + matrix-checker: + # This job always runs last to set the overall result based on the matrix jobs. If any matrix job failed, this job will fail. + # This makes it so that we don't need to add each matrix job individually to CI checks. + runs-on: ubuntu-latest + needs: [build-image] + if: always() + steps: + - run: ${{!contains(needs.*.result, 'failure')}} + + release: + # Require smoketest-native so that if those fail, we don't release broken artifacts + needs: [build-photonlib-vendorjson, build-image, combine, build-package-linux, build-package-macos, build-package-windows, run-smoketest-native] + if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && github.repository == 'PhotonVision/photonvision' + runs-on: ubuntu-24.04 + steps: + # Download all fat JARs + - uses: actions/download-artifact@v8 + with: + merge-multiple: true + pattern: photonvision-*.jar + # Download offline photonlib + - uses: actions/download-artifact@v8 + with: + merge-multiple: true + pattern: photonlib-offline + # Download vendor json + - uses: actions/download-artifact@v8 + with: + pattern: photonlib-*.json + # Download all images + - uses: actions/download-artifact@v8 + with: + merge-multiple: true + pattern: photonvision-*.xz + + - run: find + # Push to dev release + - uses: pyTooling/Actions/releaser@r6 + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag: 'Dev' + rm: true + snapshots: false + files: | + **/*.xz + **/*linux*.jar + **/*win*.jar + **/photonlib*.json + **/photonlib*.zip + if: github.event_name == 'push' + - name: Create Vendor JSON Repo PR + uses: wpilibsuite/vendor-json-repo/.github/actions/add_vendordep@HEAD + with: + repo: PhotonVision/vendor-json-repo + token: ${{ secrets.VENDOR_JSON_REPO_PUSH_TOKEN }} + vendordep_file: ${{ github.workspace }}/photonlib-${{ github.ref_name }}.json + pr_title: Update photonlib to ${{ github.ref_name }} + pr_branch: photonlib-${{ github.ref_name }} + if: github.repository == 'PhotonVision/photonvision' && startsWith(github.ref, 'refs/tags/v') diff --git a/build.gradle b/build.gradle index 1e3178137..9d4725369 100644 --- a/build.gradle +++ b/build.gradle @@ -44,7 +44,7 @@ ext { jacocoVersion = "0.8.14"; javalinVersion = "6.7.0" - libcameraDriverVersion = "v2026.0.0" + libcameraDriverVersion = "dev-v2026.0.0-2-gef3d7a0" rknnVersion = "dev-v2026.0.1-1-g89b2888" rubikVersion = "dev-v2026.0.1-4-g13d6279" frcYear = "2027_alpha4"