Upgrade to java 25 (#2441)

This commit is contained in:
Sam Freund
2026-04-23 00:10:38 -05:00
committed by GitHub
parent d1a02a542c
commit 803bdb222c
12 changed files with 358 additions and 357 deletions

View File

@@ -47,7 +47,7 @@ jobs:
# run: git fetch --tags --force
# - uses: actions/setup-java@v5
# with:
# java-version: 21
# java-version: 25
# distribution: temurin
# - name: Install SystemCore Toolchain
# run: ./gradlew installSystemCoreToolchain
@@ -105,7 +105,7 @@ jobs:
run: git fetch --tags --force
- uses: actions/setup-java@v5
with:
java-version: 21
java-version: 25
distribution: temurin
- name: Install pnpm
uses: pnpm/action-setup@v5
@@ -145,7 +145,7 @@ jobs:
run: git fetch --tags --force
- uses: actions/setup-java@v5
with:
java-version: 21
java-version: 25
distribution: temurin
- name: Install pnpm
uses: pnpm/action-setup@v5
@@ -197,7 +197,7 @@ jobs:
- uses: actions/setup-java@v5
with:
java-version: 21
java-version: 25
distribution: temurin
# grab all tags
@@ -222,8 +222,8 @@ jobs:
fail-fast: false
matrix:
include:
- os: windows-2022
artifact-name: Win64
# - os: windows-2022
# artifact-name: Win64
- os: macos-26
artifact-name: macOS
- os: ubuntu-24.04
@@ -238,7 +238,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-java@v5
with:
java-version: 21
java-version: 25
distribution: temurin
- run: git fetch --tags --force
- run: ./gradlew photon-targeting:build photon-lib:build
@@ -344,7 +344,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-java@v5
with:
java-version: 21
java-version: 25
distribution: temurin
- name: Install pnpm
uses: pnpm/action-setup@v5
@@ -434,7 +434,7 @@ jobs:
steps:
- uses: actions/setup-java@v5
with:
java-version: 21
java-version: 25
distribution: temurin
- uses: actions/download-artifact@v8
with:
@@ -467,203 +467,203 @@ 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]
# 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')}}
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')}}
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')
# 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')

View File

@@ -16,6 +16,6 @@ jobs:
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
java-version: 25
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v5

View File

@@ -61,7 +61,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-java@v5
with:
java-version: 21
java-version: 25
distribution: temurin
- run: |
set +e

View File

@@ -62,7 +62,7 @@ jobs:
run: git fetch --tags --force
- uses: actions/setup-java@v5
with:
java-version: 21
java-version: 25
distribution: temurin
- name: Build javadocs/doxygen
run: |

View File

@@ -12,134 +12,134 @@ concurrency:
cancel-in-progress: true
jobs:
build-py:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.14
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build wheel
working-directory: ./photon-lib/py
run: python setup.py sdist bdist_wheel
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: dist
path: ./photon-lib/py/dist/
test-py:
needs: build-py
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.14
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest mypy
- name: Download artifacts
uses: actions/download-artifact@v8
with:
name: dist
path: dist/
- name: Install package
shell: bash
run: pip install --no-cache-dir dist/*.whl
- name: Run Unit Tests
shell: bash
run: pytest --import-mode=importlib photon-lib/py/test/
- name: Run mypy type checking
run: mypy --show-column-numbers --config-file photon-lib/py/pyproject.toml photon-lib
build-python-examples:
needs: build-py
strategy:
matrix:
os: [ubuntu-24.04, windows-2022, macos-14]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.14
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Download artifacts
uses: actions/download-artifact@v8
with:
name: dist
path: ./photon-lib/py/dist/
- name: Install PhotonLibPy package
working-directory: ./photon-lib/py
shell: bash
run: |
pip install --no-cache-dir dist/*.whl
- name: Build Python examples
working-directory: photonlib-python-examples
shell: bash
run: |
for folder in */;
do
echo $folder
./run.sh $folder
done
deploy:
needs: [test-py, build-python-examples]
runs-on: ubuntu-24.04
# Only upload on tags
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download artifacts
uses: actions/download-artifact@v8
with:
name: dist
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ./dist/
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
# build-py:
# runs-on: ubuntu-24.04
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v6
# with:
# fetch-depth: 0
#
# - name: Set up Python
# uses: actions/setup-python@v6
# with:
# python-version: 3.14
#
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install setuptools wheel
#
# - name: Build wheel
# working-directory: ./photon-lib/py
# run: python setup.py sdist bdist_wheel
#
# - name: Upload artifacts
# uses: actions/upload-artifact@v7
# with:
# name: dist
# path: ./photon-lib/py/dist/
#
# test-py:
# needs: build-py
# runs-on: ubuntu-24.04
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v6
# with:
# fetch-depth: 0
#
# - name: Set up Python
# uses: actions/setup-python@v6
# with:
# python-version: 3.14
#
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install pytest mypy
#
# - name: Download artifacts
# uses: actions/download-artifact@v8
# with:
# name: dist
# path: dist/
#
# - name: Install package
# shell: bash
# run: pip install --no-cache-dir dist/*.whl
#
# - name: Run Unit Tests
# shell: bash
# run: pytest --import-mode=importlib photon-lib/py/test/
#
# - name: Run mypy type checking
# run: mypy --show-column-numbers --config-file photon-lib/py/pyproject.toml photon-lib
#
# build-python-examples:
# needs: build-py
# strategy:
# matrix:
# os: [ubuntu-24.04, windows-2022, macos-14]
# runs-on: ${{ matrix.os }}
#
# steps:
#
# - name: Checkout code
# uses: actions/checkout@v6
# with:
# fetch-depth: 0
#
# - name: Set up Python
# uses: actions/setup-python@v6
# with:
# python-version: 3.14
#
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
#
# - name: Download artifacts
# uses: actions/download-artifact@v8
# with:
# name: dist
# path: ./photon-lib/py/dist/
#
# - name: Install PhotonLibPy package
# working-directory: ./photon-lib/py
# shell: bash
# run: |
# pip install --no-cache-dir dist/*.whl
#
# - name: Build Python examples
# working-directory: photonlib-python-examples
# shell: bash
# run: |
# for folder in */;
# do
# echo $folder
# ./run.sh $folder
# done
#
# deploy:
# needs: [test-py, build-python-examples]
# runs-on: ubuntu-24.04
# # Only upload on tags
# if: startsWith(github.ref, 'refs/tags/v')
#
# steps:
# - name: Download artifacts
# uses: actions/download-artifact@v8
# with:
# name: dist
# path: dist/
#
# - name: Publish package distributions to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# packages-dir: ./dist/
#
# permissions:
# id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

View File

@@ -41,6 +41,7 @@ ext {
ejmlVersion = "0.43.1";
jacksonVersion = "2.15.2";
quickbufVersion = "1.3.3";
jacocoVersion = "0.8.14";
javalinVersion = "6.7.0"
libcameraDriverVersion = "v2026.0.0"

View File

@@ -8,7 +8,7 @@ This section contains the build instructions from the source code available at [
**Java Development Kit:**
This project requires Java Development Kit (JDK) 17 to be compiled. This is the same Java version that comes with WPILib for 2026+. **Windows Users must use the JDK that ships with WPILib.** For other platforms, you can follow the instructions to install JDK 17 for your platform [here](https://bell-sw.com/pages/downloads/#jdk-17-lts).
This project requires Java Development Kit (JDK) 25 to be compiled. This is the same Java version that comes with WPILib for 2027. **Windows Users must use the JDK that ships with WPILib.** For other platforms, you can follow the instructions to install JDK 25 for your platform [here](https://bell-sw.com/pages/downloads/#jdk-25-lts).
**Node JS:**

View File

@@ -4,8 +4,8 @@ plugins {
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
}
def ROBOT_MAIN_CLASS = "frc.robot.Main"

View File

@@ -4,8 +4,8 @@ plugins {
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
}
def ROBOT_MAIN_CLASS = "frc.robot.Main"

View File

@@ -4,8 +4,8 @@ plugins {
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
}
def ROBOT_MAIN_CLASS = "frc.robot.Main"

View File

@@ -4,10 +4,10 @@ apply plugin: "jacoco"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
languageVersion = JavaLanguageVersion.of(25)
}
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
}
wpilibTools.deps.wpilibVersion = wpilibVersion
@@ -63,7 +63,7 @@ test {
}
jacoco {
toolVersion = "0.8.14"
toolVersion = jacocoVersion
reportsDirectory = layout.buildDirectory.dir('customJacocoReportDir')
}

View File

@@ -5,10 +5,10 @@ apply plugin: 'com.google.protobuf'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
languageVersion = JavaLanguageVersion.of(25)
}
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
}
def baseArtifactId = nativeName
@@ -164,7 +164,7 @@ dependencies {
}
jacoco {
toolVersion = "0.8.10"
toolVersion = jacocoVersion
}
jacocoTestReport {