From bc1bd33d71601212aa7b01b7011633a66db322e7 Mon Sep 17 00:00:00 2001 From: samfreund Date: Sat, 3 Jan 2026 00:04:53 -0600 Subject: [PATCH 01/14] bump actions for node 24 --- .github/workflows/build.yml | 68 +++++++++++---------- .github/workflows/dependency-submission.yml | 22 +++++++ .github/workflows/labeler.yml | 2 +- .github/workflows/lint-format.yml | 18 +++--- .github/workflows/photon-api-docs.yml | 16 ++--- .github/workflows/photonvision-rtd.yml | 4 +- .github/workflows/python.yml | 6 +- .github/workflows/website.yml | 8 +-- 8 files changed, 84 insertions(+), 60 deletions(-) create mode 100644 .github/workflows/dependency-submission.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e8d7a65269..1cb36f7ea3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,8 +18,8 @@ jobs: name: "Validation" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: gradle/actions/wrapper-validation@v4 + - uses: actions/checkout@v6 + - uses: gradle/actions/wrapper-validation@v5 build-examples: strategy: @@ -41,13 +41,13 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Fetch tags run: git fetch --tags --force - name: Install Java 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: java-version: 17 distribution: temurin @@ -99,13 +99,13 @@ jobs: steps: # Checkout code. - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Fetch tags run: git fetch --tags --force - name: Install Java 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: java-version: 17 distribution: temurin @@ -114,7 +114,7 @@ jobs: with: version: 10 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: 22 - name: Setup tests @@ -127,7 +127,7 @@ jobs: - name: Run Playwright tests working-directory: photon-client run: pnpm test - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 if: ${{ !cancelled() }} with: name: playwright-report @@ -140,13 +140,13 @@ jobs: steps: # Checkout code. - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Fetch tags run: git fetch --tags --force - name: Install Java 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: java-version: 17 distribution: temurin @@ -155,7 +155,7 @@ jobs: with: version: 10 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: 22 - name: Gradle Build @@ -166,8 +166,8 @@ jobs: name: "Build Offline Docs" runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 with: python-version: '3.12' - name: Install graphviz @@ -184,7 +184,7 @@ jobs: working-directory: docs run: | make html - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: built-docs path: docs/build/html @@ -194,12 +194,12 @@ jobs: runs-on: ubuntu-24.04 needs: [validation] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 - name: Install Java 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: java-version: 17 distribution: temurin @@ -214,7 +214,7 @@ jobs: mv photon-lib/build/generated/vendordeps/photonlib.json photon-lib/build/generated/vendordeps/photonlib-$(git describe --tags --match=v*).json # Upload it here so it shows up in releases - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: photonlib-vendor-json path: photon-lib/build/generated/vendordeps/photonlib-*.json @@ -239,11 +239,11 @@ jobs: runs-on: ${{ matrix.os }} needs: [validation] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 - name: Install Java 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: java-version: 17 distribution: temurin @@ -258,7 +258,7 @@ jobs: if: github.event_name == 'push' && github.repository_owner == 'photonvision' # Copy artifacts to build/outputs/maven - run: ./gradlew photon-lib:publish photon-targeting:publish -PcopyOfflineArtifacts - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: maven-${{ matrix.artifact-name }} path: build/outputs @@ -283,7 +283,7 @@ jobs: name: "Photonlib - Build Docker - ${{ matrix.artifact-name }}" needs: [validation] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 - name: Config Git @@ -299,7 +299,7 @@ jobs: if: github.event_name == 'push' && github.repository_owner == 'photonvision' # Copy artifacts to build/outputs/maven - run: ./gradlew photon-lib:publish photon-targeting:publish -PcopyOfflineArtifacts ${{ matrix.build-options }} - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: maven-${{ matrix.artifact-name }} path: build/outputs @@ -309,7 +309,7 @@ jobs: needs: [build-photonlib-docker, build-photonlib-host] runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 - run: git fetch --tags --force @@ -324,7 +324,7 @@ jobs: name: ZIP stuff up working-directory: output - run: ls output - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: photonlib-offline path: output/*.zip @@ -361,11 +361,11 @@ jobs: name: "Build fat JAR - ${{ matrix.artifact-name }}" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 - name: Install Java 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: java-version: 17 distribution: temurin @@ -375,7 +375,7 @@ jobs: with: version: 10 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: 22 cache: pnpm @@ -391,11 +391,11 @@ jobs: if: ${{ (matrix.arch-override != 'none') }} - run: ./gradlew photon-server:shadowJar if: ${{ (matrix.arch-override == 'none') }} - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: jar-${{ matrix.artifact-name }} path: photon-server/build/libs - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: photon-targeting_jar-${{ matrix.artifact-name }} path: photon-targeting/build/libs @@ -420,7 +420,7 @@ jobs: steps: - name: Install Java 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: java-version: 17 distribution: temurin @@ -525,7 +525,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - uses: actions/download-artifact@v7 @@ -566,13 +566,15 @@ jobs: sudo mv ${imagedir}/* ${tardir}/ sudo tar -I 'xz -T0' -cf ${new_image_name}.tar.xz ${tardir} --checkpoint=10000 --checkpoint-action=echo='%T' - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 name: Upload image with: name: image-${{ matrix.image_suffix }} path: photonvision*.xz 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() @@ -621,7 +623,7 @@ jobs: **/photonlib*.zip if: github.event_name == 'push' - name: Create Vendor JSON Repo PR - uses: wpilibsuite/vendor-json-repo/.github/actions/add_vendordep@main + uses: wpilibsuite/vendor-json-repo/.github/actions/add_vendordep@HEAD with: repo: PhotonVision/vendor-json-repo token: ${{ secrets.VENDOR_JSON_REPO_PUSH_TOKEN }} diff --git a/.github/workflows/dependency-submission.yml b/.github/workflows/dependency-submission.yml new file mode 100644 index 0000000000..7a7c477cac --- /dev/null +++ b/.github/workflows/dependency-submission.yml @@ -0,0 +1,22 @@ +name: Dependency Submission + +on: + push: + branches: [ 'main' ] + +permissions: + contents: write + +jobs: + dependency-submission: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v6 + - name: Setup Java + uses: actions/setup-java@v5 + with: + distribution: 'temurin' + java-version: 17 + - name: Generate and submit dependency graph + uses: gradle/actions/dependency-submission@v5 diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 526323cea6..a5c1c251cb 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -9,6 +9,6 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@v5 + - uses: actions/labeler@v6 with: sync-labels: true diff --git a/.github/workflows/lint-format.yml b/.github/workflows/lint-format.yml index 56462d3982..aa9ec28ea1 100644 --- a/.github/workflows/lint-format.yml +++ b/.github/workflows/lint-format.yml @@ -14,20 +14,20 @@ jobs: name: "Validation" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: gradle/actions/wrapper-validation@v4 + - uses: actions/checkout@v6 + - uses: gradle/actions/wrapper-validation@v5 wpiformat: name: "wpiformat" runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Fetch all history and metadata run: | git fetch --prune --unshallow git checkout -b pr git branch -f main origin/main - name: Set up Python 3.12 - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: 3.12 - name: Install wpiformat @@ -46,7 +46,7 @@ jobs: - name: Generate diff run: git diff HEAD > wpiformat-fixes.patch if: ${{ failure() }} - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: wpiformat fixes path: wpiformat-fixes.patch @@ -56,10 +56,10 @@ jobs: needs: [validation] runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 with: java-version: 17 distribution: temurin @@ -79,13 +79,13 @@ jobs: working-directory: photon-client runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install pnpm uses: pnpm/action-setup@v4 with: version: 10 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: 22 cache: pnpm diff --git a/.github/workflows/photon-api-docs.yml b/.github/workflows/photon-api-docs.yml index e31d2d2429..9a98af8694 100644 --- a/.github/workflows/photon-api-docs.yml +++ b/.github/workflows/photon-api-docs.yml @@ -20,8 +20,8 @@ jobs: name: "Validation" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: gradle/actions/wrapper-validation@v4 + - uses: actions/checkout@v6 + - uses: gradle/actions/wrapper-validation@v5 build_demo: name: Build PhotonClient Demo defaults: @@ -29,13 +29,13 @@ jobs: working-directory: photon-client runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install pnpm uses: pnpm/action-setup@v4 with: version: 10 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: 22 cache: pnpm @@ -44,7 +44,7 @@ jobs: run: pnpm i --frozen-lockfile - name: Build Production Client run: pnpm run build-demo - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: built-demo path: photon-client/dist/ @@ -55,13 +55,13 @@ jobs: runs-on: "ubuntu-24.04" steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Fetch tags run: git fetch --tags --force - name: Install Java 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: java-version: 17 distribution: temurin @@ -69,7 +69,7 @@ jobs: run: | chmod +x gradlew ./gradlew photon-docs:generateJavaDocs photon-docs:doxygen - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: docs-java-cpp path: photon-docs/build/docs diff --git a/.github/workflows/photonvision-rtd.yml b/.github/workflows/photonvision-rtd.yml index cafd6b2f96..c4fb5c71c5 100644 --- a/.github/workflows/photonvision-rtd.yml +++ b/.github/workflows/photonvision-rtd.yml @@ -17,9 +17,9 @@ jobs: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: '3.12' diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index bb5618e8d2..b59d25a315 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -17,12 +17,12 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: 3.12 @@ -50,7 +50,7 @@ jobs: mypy --show-column-numbers --config-file photon-lib/py/pyproject.toml photon-lib - name: Upload artifacts - uses: actions/upload-artifact@master + uses: actions/upload-artifact@v6 with: name: dist path: ./photon-lib/py/dist/ diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index d22898140d..e91edab796 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -9,13 +9,13 @@ jobs: name: Build and Sync Files runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install pnpm uses: pnpm/action-setup@v4 with: version: 10 - name: Setup Node - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: 22 cache: pnpm @@ -39,13 +39,13 @@ jobs: name: Check Formatting runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install pnpm uses: pnpm/action-setup@v4 with: version: 10 - name: Setup Node - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: 22 cache: pnpm From fce0384ab969abafdbb6633c57d23f7e0c052a14 Mon Sep 17 00:00:00 2001 From: samfreund Date: Sun, 4 Jan 2026 15:22:58 -0600 Subject: [PATCH 02/14] split packages by OS --- .github/workflows/build.yml | 59 ++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1cb36f7ea3..f1ba4a4f41 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ jobs: architecture: x64 artifact-name: Win64 - os: macos-14 - architecture: aarch64 + architecture: arm64 artifact-name: macOS - os: ubuntu-24.04 artifact-name: Linux @@ -329,25 +329,13 @@ jobs: name: photonlib-offline path: output/*.zip - build-package: + build-package-linux: needs: [build-gradle, build-offline-docs] strategy: fail-fast: false matrix: include: - - os: windows-latest - artifact-name: Win64 - architecture: x64 - arch-override: winx64 - - os: macos-latest - artifact-name: macOS - architecture: x64 - arch-override: macx64 - - os: macos-latest - artifact-name: macOSArm - architecture: x64 - arch-override: macarm64 - os: ubuntu-24.04 artifact-name: Linux architecture: x64 @@ -360,7 +348,7 @@ jobs: runs-on: ${{ matrix.os }} name: "Build fat JAR - ${{ matrix.artifact-name }}" - steps: + steps: &build-package-steps - uses: actions/checkout@v6 with: fetch-depth: 0 @@ -400,8 +388,42 @@ jobs: name: photon-targeting_jar-${{ matrix.artifact-name }} path: photon-targeting/build/libs + build-package-macos: + needs: [build-gradle, build-offline-docs] + + strategy: + fail-fast: false + matrix: + include: + - os: macos-latest + artifact-name: macOS + architecture: arm64 + arch-override: macarm64 + + runs-on: ${{ matrix.os }} + name: "Build fat JAR - ${{ matrix.artifact-name }}" + + steps: *build-package-steps + + build-package-windows: + needs: [build-gradle, build-offline-docs] + + strategy: + fail-fast: false + matrix: + include: + - os: windows-latest + artifact-name: Win64 + architecture: x64 + arch-override: winx64 + + runs-on: ${{ matrix.os }} + name: "Build fat JAR - ${{ matrix.artifact-name }}" + + steps: *build-package-steps + run-smoketest-native: - needs: [build-package] + needs: [build-package-linux, build-package-macos, build-package-windows] strategy: fail-fast: false @@ -433,7 +455,7 @@ jobs: if: ${{ (matrix.os) == 'windows-latest' }} build-image: - needs: [build-package] + needs: [build-package-linux] strategy: fail-fast: false @@ -582,7 +604,8 @@ jobs: - run: ${{!contains(needs.*.result, 'failure')}} release: - needs: [build-photonlib-vendorjson, build-package, build-image, combine] + # 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: From 9b398b6549cf9c3c9e58859425b7d19db4ff3814 Mon Sep 17 00:00:00 2001 From: samfreund Date: Sun, 4 Jan 2026 15:32:16 -0600 Subject: [PATCH 03/14] remove unnecessary needs --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1ba4a4f41..c5b62a21dd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,7 +37,7 @@ jobs: name: "Photonlib - Build Examples - ${{ matrix.os }}" runs-on: ${{ matrix.os }} - needs: [validation, build-photonlib-host, build-photonlib-docker] + needs: [build-photonlib-host, build-photonlib-docker] steps: - name: Checkout code From d3223473dd4448a9ef0896ae3ca84a79239f915c Mon Sep 17 00:00:00 2001 From: samfreund Date: Sun, 4 Jan 2026 15:51:01 -0600 Subject: [PATCH 04/14] rename to match prior checks --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c5b62a21dd..a84b1e31e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -396,7 +396,7 @@ jobs: matrix: include: - os: macos-latest - artifact-name: macOS + artifact-name: macOSArm architecture: arm64 arch-override: macarm64 From ce2479171cd698b479a083a4d31a1e21a155c64d Mon Sep 17 00:00:00 2001 From: samfreund Date: Sun, 4 Jan 2026 16:16:27 -0600 Subject: [PATCH 05/14] add macOS x64 back in --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a84b1e31e3..faadf2cf2a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -399,6 +399,10 @@ jobs: artifact-name: macOSArm architecture: arm64 arch-override: macarm64 + - os: macos-latest + artifact-name: macOS + architecture: x64 + arch-override: macx64 runs-on: ${{ matrix.os }} name: "Build fat JAR - ${{ matrix.artifact-name }}" From f94e3ad19bea29128b1417ddfa6da5685704004e Mon Sep 17 00:00:00 2001 From: samfreund Date: Sun, 4 Jan 2026 17:48:43 -0600 Subject: [PATCH 06/14] bump macOS target --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index faadf2cf2a..06fa4fc1ba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -221,7 +221,7 @@ jobs: build-photonlib-host: env: - MACOSX_DEPLOYMENT_TARGET: 13 + MACOSX_DEPLOYMENT_TARGET: 14 strategy: fail-fast: false matrix: From a376ce7c8c5c404169a721df6afe75b58e554afc Mon Sep 17 00:00:00 2001 From: samfreund Date: Sun, 4 Jan 2026 17:57:33 -0600 Subject: [PATCH 07/14] try building examples w/ photonlib --- .github/workflows/build.yml | 167 +++++++++++++++++++++--------------- 1 file changed, 96 insertions(+), 71 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 06fa4fc1ba..0f1a1ef647 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,78 +20,80 @@ jobs: steps: - uses: actions/checkout@v6 - uses: gradle/actions/wrapper-validation@v5 - build-examples: - strategy: - fail-fast: false - matrix: - include: - - os: windows-2022 - architecture: x64 - artifact-name: Win64 - - os: macos-14 - architecture: arm64 - artifact-name: macOS - - os: ubuntu-24.04 - artifact-name: Linux - - name: "Photonlib - Build Examples - ${{ matrix.os }}" - runs-on: ${{ matrix.os }} - needs: [build-photonlib-host, build-photonlib-docker] + # build-examples: + + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: windows-2022 + # architecture: x64 + # artifact-name: Win64 + # - os: macos-14 + # architecture: arm64 + # artifact-name: macOS + # - os: ubuntu-24.04 + # artifact-name: Linux + + # name: "Photonlib - Build Examples - ${{ matrix.os }}" + # runs-on: ${{ matrix.os }} + # needs: [build-photonlib-host, build-photonlib-docker] + + # steps: + # - name: Checkout code + # uses: actions/checkout@v6 + # with: + # fetch-depth: 0 + # - name: Fetch tags + # run: git fetch --tags --force + # - name: Install Java 17 + # uses: actions/setup-java@v5 + # with: + # java-version: 17 + # distribution: temurin + # - name: Install RoboRIO Toolchain + # run: ./gradlew installRoboRioToolchain + # - name: Delete duplicate toolchains + # run: | + # find ~/.gradle/cache/ -name *roborio-academic* -exec rm -rf {} + + # du -h . | sort -h + # if: matrix.os == 'ubuntu-24.04' + # # Download prebuilt photonlib artifacts + # - uses: actions/download-artifact@v4 + # with: + # name: maven-${{ matrix.artifact-name }} + # - uses: actions/download-artifact@v4 + # with: + # name: maven-Athena + # - name: Move to maven local + # run: | + # mkdir -p ~/.m2/repository/ + # mv maven/org ~/.m2/repository/ + # - name: Copy vendordeps + # shell: bash + # run: | + # for vendordep_folder in photonlib-*-examples/*/; do + # # Remove trailing slash for cross-platform compatibility + # vendordep_folder="${vendordep_folder%/}" + + # # Filter for projects only + # if [ -e "$vendordep_folder/build.gradle" ]; then + # mkdir -p "$vendordep_folder/vendordeps/" + # cp vendordeps/photonlib-json-1.0.json "$vendordep_folder/vendordeps/" + # fi + # done + # - name: Build Java examples + # working-directory: photonlib-java-examples + # run: | + # ./gradlew build + # ./gradlew clean + # - name: Build C++ examples + # working-directory: photonlib-cpp-examples + # run: | + # ./gradlew build + # ./gradlew clean - steps: - - name: Checkout code - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - name: Fetch tags - run: git fetch --tags --force - - name: Install Java 17 - uses: actions/setup-java@v5 - with: - java-version: 17 - distribution: temurin - - name: Install RoboRIO Toolchain - run: ./gradlew installRoboRioToolchain - - name: Delete duplicate toolchains - run: | - find ~/.gradle/cache/ -name *roborio-academic* -exec rm -rf {} + - du -h . | sort -h - if: matrix.os == 'ubuntu-24.04' - # Download prebuilt photonlib artifacts - - uses: actions/download-artifact@v4 - with: - name: maven-${{ matrix.artifact-name }} - - uses: actions/download-artifact@v4 - with: - name: maven-Athena - - name: Move to maven local - run: | - mkdir -p ~/.m2/repository/ - mv maven/org ~/.m2/repository/ - - name: Copy vendordeps - shell: bash - run: | - for vendordep_folder in photonlib-*-examples/*/; do - # Remove trailing slash for cross-platform compatibility - vendordep_folder="${vendordep_folder%/}" - - # Filter for projects only - if [ -e "$vendordep_folder/build.gradle" ]; then - mkdir -p "$vendordep_folder/vendordeps/" - cp vendordeps/photonlib-json-1.0.json "$vendordep_folder/vendordeps/" - fi - done - - name: Build Java examples - working-directory: photonlib-java-examples - run: | - ./gradlew build - ./gradlew clean - - name: Build C++ examples - working-directory: photonlib-cpp-examples - run: | - ./gradlew build - ./gradlew clean playwright-tests: name: "Playwright E2E tests" runs-on: ubuntu-24.04 @@ -257,11 +259,34 @@ jobs: ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} if: github.event_name == 'push' && github.repository_owner == 'photonvision' # Copy artifacts to build/outputs/maven - - run: ./gradlew photon-lib:publish photon-targeting:publish -PcopyOfflineArtifacts + - run: ./gradlew photon-lib:publish photon-targeting:publish -PcopyOfflineArtifacts -x check - uses: actions/upload-artifact@v6 with: name: maven-${{ matrix.artifact-name }} path: build/outputs + - name: Install RoboRIO Toolchain + run: ./gradlew installRoboRioToolchain + - name: Delete duplicate toolchains + if: matrix.os == 'ubuntu-24.04' + run: | + find ~/.gradle/cache/ -name *roborio-academic* -exec rm -rf {} + + du -h . | sort -h + # Need to publish to maven local first, so that C++ sim can pick it up + - name: Publish photonlib to maven local + run: ./gradlew photon-targeting:publishtomavenlocal photon-lib:publishtomavenlocal -x check + - name: Clean so we don't run out of memory + run: ./gradlew clean + - name: Build Java examples + working-directory: photonlib-java-examples + run: | + ./gradlew build + ./gradlew clean + - name: Build C++ examples + working-directory: photonlib-cpp-examples + run: | + ./gradlew build + ./gradlew clean + build-photonlib-docker: strategy: From 7128f7f1f20fee9d79e7e54dbfda6556a7b535c6 Mon Sep 17 00:00:00 2001 From: samfreund Date: Sun, 4 Jan 2026 22:12:03 -0600 Subject: [PATCH 08/14] bump image version to 2026.1.0 --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f1a1ef647..a557268b53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ concurrency: cancel-in-progress: true env: - IMAGE_VERSION: v2026.0.6 + IMAGE_VERSION: v2026.1 jobs: @@ -274,8 +274,8 @@ jobs: # Need to publish to maven local first, so that C++ sim can pick it up - name: Publish photonlib to maven local run: ./gradlew photon-targeting:publishtomavenlocal photon-lib:publishtomavenlocal -x check - - name: Clean so we don't run out of memory - run: ./gradlew clean + # - name: Clean so we don't run out of memory + # run: ./gradlew clean - name: Build Java examples working-directory: photonlib-java-examples run: | From 9a9ffc9335a332490b02116eff9979760377ed4f Mon Sep 17 00:00:00 2001 From: samfreund Date: Sun, 4 Jan 2026 23:29:37 -0600 Subject: [PATCH 09/14] bah CI --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a557268b53..6487592840 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 + IMAGE_VERSION: v2026.1.0 jobs: From c5bd462f06d0045f3e978550d144a20b47833b97 Mon Sep 17 00:00:00 2001 From: samfreund Date: Tue, 6 Jan 2026 22:58:39 -0600 Subject: [PATCH 10/14] remove third-party action --- .github/workflows/python.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index b59d25a315..cb4b8c3011 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -43,11 +43,8 @@ jobs: pytest - name: Run mypy type checking - uses: liskin/gh-problem-matcher-wrap@v3 - with: - linters: mypy - run: | - mypy --show-column-numbers --config-file photon-lib/py/pyproject.toml photon-lib + run: | + mypy --show-column-numbers --config-file photon-lib/py/pyproject.toml photon-lib - name: Upload artifacts uses: actions/upload-artifact@v6 From 7c9152418cd4e1d39c929153ad5f8ead8b2f8308 Mon Sep 17 00:00:00 2001 From: samfreund Date: Tue, 6 Jan 2026 23:22:34 -0600 Subject: [PATCH 11/14] undo combining photonlib example builds --- .github/workflows/build.yml | 167 ++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 95 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6487592840..e956e975c5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,78 +21,78 @@ jobs: - uses: actions/checkout@v6 - uses: gradle/actions/wrapper-validation@v5 - # build-examples: - - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: windows-2022 - # architecture: x64 - # artifact-name: Win64 - # - os: macos-14 - # architecture: arm64 - # artifact-name: macOS - # - os: ubuntu-24.04 - # artifact-name: Linux - - # name: "Photonlib - Build Examples - ${{ matrix.os }}" - # runs-on: ${{ matrix.os }} - # needs: [build-photonlib-host, build-photonlib-docker] - - # steps: - # - name: Checkout code - # uses: actions/checkout@v6 - # with: - # fetch-depth: 0 - # - name: Fetch tags - # run: git fetch --tags --force - # - name: Install Java 17 - # uses: actions/setup-java@v5 - # with: - # java-version: 17 - # distribution: temurin - # - name: Install RoboRIO Toolchain - # run: ./gradlew installRoboRioToolchain - # - name: Delete duplicate toolchains - # run: | - # find ~/.gradle/cache/ -name *roborio-academic* -exec rm -rf {} + - # du -h . | sort -h - # if: matrix.os == 'ubuntu-24.04' - # # Download prebuilt photonlib artifacts - # - uses: actions/download-artifact@v4 - # with: - # name: maven-${{ matrix.artifact-name }} - # - uses: actions/download-artifact@v4 - # with: - # name: maven-Athena - # - name: Move to maven local - # run: | - # mkdir -p ~/.m2/repository/ - # mv maven/org ~/.m2/repository/ - # - name: Copy vendordeps - # shell: bash - # run: | - # for vendordep_folder in photonlib-*-examples/*/; do - # # Remove trailing slash for cross-platform compatibility - # vendordep_folder="${vendordep_folder%/}" - - # # Filter for projects only - # if [ -e "$vendordep_folder/build.gradle" ]; then - # mkdir -p "$vendordep_folder/vendordeps/" - # cp vendordeps/photonlib-json-1.0.json "$vendordep_folder/vendordeps/" - # fi - # done - # - name: Build Java examples - # working-directory: photonlib-java-examples - # run: | - # ./gradlew build - # ./gradlew clean - # - name: Build C++ examples - # working-directory: photonlib-cpp-examples - # run: | - # ./gradlew build - # ./gradlew clean + build-examples: + + strategy: + fail-fast: false + matrix: + include: + - os: windows-2022 + architecture: x64 + artifact-name: Win64 + - os: macos-14 + architecture: arm64 + artifact-name: macOS + - os: ubuntu-24.04 + artifact-name: Linux + + name: "Photonlib - Build Examples - ${{ matrix.os }}" + runs-on: ${{ matrix.os }} + needs: [build-photonlib-host, build-photonlib-docker] + + steps: + - name: Checkout code + uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: Fetch tags + run: git fetch --tags --force + - name: Install Java 17 + uses: actions/setup-java@v5 + with: + java-version: 17 + distribution: temurin + - name: Install RoboRIO Toolchain + run: ./gradlew installRoboRioToolchain + - name: Delete duplicate toolchains + run: | + find ~/.gradle/cache/ -name *roborio-academic* -exec rm -rf {} + + du -h . | sort -h + if: matrix.os == 'ubuntu-24.04' + # Download prebuilt photonlib artifacts + - uses: actions/download-artifact@v4 + with: + name: maven-${{ matrix.artifact-name }} + - uses: actions/download-artifact@v4 + with: + name: maven-Athena + - name: Move to maven local + run: | + mkdir -p ~/.m2/repository/ + mv maven/org ~/.m2/repository/ + - name: Copy vendordeps + shell: bash + run: | + for vendordep_folder in photonlib-*-examples/*/; do + # Remove trailing slash for cross-platform compatibility + vendordep_folder="${vendordep_folder%/}" + + # Filter for projects only + if [ -e "$vendordep_folder/build.gradle" ]; then + mkdir -p "$vendordep_folder/vendordeps/" + cp vendordeps/photonlib-json-1.0.json "$vendordep_folder/vendordeps/" + fi + done + - name: Build Java examples + working-directory: photonlib-java-examples + run: | + ./gradlew build + ./gradlew clean + - name: Build C++ examples + working-directory: photonlib-cpp-examples + run: | + ./gradlew build + ./gradlew clean playwright-tests: name: "Playwright E2E tests" @@ -264,29 +264,6 @@ jobs: with: name: maven-${{ matrix.artifact-name }} path: build/outputs - - name: Install RoboRIO Toolchain - run: ./gradlew installRoboRioToolchain - - name: Delete duplicate toolchains - if: matrix.os == 'ubuntu-24.04' - run: | - find ~/.gradle/cache/ -name *roborio-academic* -exec rm -rf {} + - du -h . | sort -h - # Need to publish to maven local first, so that C++ sim can pick it up - - name: Publish photonlib to maven local - run: ./gradlew photon-targeting:publishtomavenlocal photon-lib:publishtomavenlocal -x check - # - name: Clean so we don't run out of memory - # run: ./gradlew clean - - name: Build Java examples - working-directory: photonlib-java-examples - run: | - ./gradlew build - ./gradlew clean - - name: Build C++ examples - working-directory: photonlib-cpp-examples - run: | - ./gradlew build - ./gradlew clean - build-photonlib-docker: strategy: From 600fb997456807d8b80b87be2d579e6f068ba412 Mon Sep 17 00:00:00 2001 From: samfreund Date: Wed, 7 Jan 2026 00:35:32 -0600 Subject: [PATCH 12/14] cleanup photonlib build --- .github/workflows/build.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e956e975c5..849df8836d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -222,18 +222,14 @@ jobs: path: photon-lib/build/generated/vendordeps/photonlib-*.json build-photonlib-host: - env: - MACOSX_DEPLOYMENT_TARGET: 14 strategy: fail-fast: false matrix: include: - os: windows-2022 artifact-name: Win64 - architecture: x64 - - os: macos-14 + - os: macos-26 artifact-name: macOS - architecture: aarch64 - os: ubuntu-24.04 artifact-name: Linux @@ -249,7 +245,6 @@ jobs: with: java-version: 17 distribution: temurin - architecture: ${{ matrix.architecture }} - run: git fetch --tags --force - run: ./gradlew photon-targeting:build photon-lib:build name: Build with Gradle From ea7ed7f9c2240815ed4cad0b1547303952cc43ee Mon Sep 17 00:00:00 2001 From: samfreund Date: Wed, 7 Jan 2026 00:41:15 -0600 Subject: [PATCH 13/14] kill it with hammers (architecture field) --- .github/workflows/build.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 849df8836d..03075ebfbf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,10 +28,8 @@ jobs: matrix: include: - os: windows-2022 - architecture: x64 artifact-name: Win64 - os: macos-14 - architecture: arm64 artifact-name: macOS - os: ubuntu-24.04 artifact-name: Linux @@ -60,10 +58,10 @@ jobs: du -h . | sort -h if: matrix.os == 'ubuntu-24.04' # Download prebuilt photonlib artifacts - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v7 with: name: maven-${{ matrix.artifact-name }} - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v7 with: name: maven-Athena - name: Move to maven local @@ -335,11 +333,9 @@ jobs: include: - os: ubuntu-24.04 artifact-name: Linux - architecture: x64 arch-override: linuxx64 - os: ubuntu-24.04 artifact-name: LinuxArm64 - architecture: x64 arch-override: linuxarm64 runs-on: ${{ matrix.os }} @@ -354,7 +350,6 @@ jobs: with: java-version: 17 distribution: temurin - architecture: ${{ matrix.architecture }} - name: Install pnpm uses: pnpm/action-setup@v4 with: @@ -394,11 +389,9 @@ jobs: include: - os: macos-latest artifact-name: macOSArm - architecture: arm64 arch-override: macarm64 - os: macos-latest artifact-name: macOS - architecture: x64 arch-override: macx64 runs-on: ${{ matrix.os }} @@ -415,7 +408,6 @@ jobs: include: - os: windows-latest artifact-name: Win64 - architecture: x64 arch-override: winx64 runs-on: ${{ matrix.os }} @@ -437,7 +429,6 @@ jobs: artifact-name: jar-Win64 - os: macos-latest artifact-name: jar-macOS - architecture: x64 runs-on: ${{ matrix.os }} From bc31c5bc3bc6c10853c24b091d59c9e8995ff8e9 Mon Sep 17 00:00:00 2001 From: samfreund Date: Wed, 7 Jan 2026 15:31:28 -0600 Subject: [PATCH 14/14] resolve comments --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 03075ebfbf..14a162b68e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -220,6 +220,8 @@ jobs: path: photon-lib/build/generated/vendordeps/photonlib-*.json build-photonlib-host: + env: + MACOSX_DEPLOYMENT_TARGET: 14 strategy: fail-fast: false matrix: @@ -252,7 +254,7 @@ jobs: ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} if: github.event_name == 'push' && github.repository_owner == 'photonvision' # Copy artifacts to build/outputs/maven - - run: ./gradlew photon-lib:publish photon-targeting:publish -PcopyOfflineArtifacts -x check + - run: ./gradlew photon-lib:publish photon-targeting:publish -PcopyOfflineArtifacts - uses: actions/upload-artifact@v6 with: name: maven-${{ matrix.artifact-name }}