Build images for 2027 and bump libcamera (#2442)

This commit is contained in:
Sam Freund
2026-05-03 13:28:01 -05:00
committed by GitHub
parent dbf71029b7
commit b8e9e4f5c7
2 changed files with 196 additions and 201 deletions

View File

@@ -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')