Skip to content

Commit a991680

Browse files
authored
Merge branch 'main' into no-systemcore
2 parents 9519bba + 5d39ef5 commit a991680

File tree

180 files changed

+9562
-10625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+9562
-10625
lines changed

.github/labeler.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"backend":
2+
- changed-files:
3+
- any-glob-to-any-file: [photon-core/**, photon-server/**]
4+
"documentation":
5+
- changed-files:
6+
- any-glob-to-any-file: [docs/**, photon-docs/**]
7+
"frontend":
8+
- changed-files:
9+
- any-glob-to-any-file: photon-client/**
10+
"photonlib":
11+
- changed-files:
12+
- any-glob-to-any-file: photon-lib*/**
13+
"website":
14+
- changed-files:
15+
- any-glob-to-any-file: website/**

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ Merge checklist:
1313
- [ ] The description documents the _what_ and _why_
1414
- [ ] If this PR changes behavior or adds a feature, user documentation is updated
1515
- [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly
16-
- [ ] If this PR touches configuration, this is backwards compatible with settings back to v2024.3.1
16+
- [ ] If this PR touches configuration, this is backwards compatible with settings back to v2025.3.2
1717
- [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated
1818
- [ ] If this PR addresses a bug, a regression test for it is added

.github/workflows/build.yml

Lines changed: 100 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ concurrency:
99
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
1010
cancel-in-progress: true
1111

12+
env:
13+
IMAGE_VERSION: v2026.0.4
14+
1215
jobs:
1316

1417
validation:
@@ -17,27 +20,6 @@ jobs:
1720
steps:
1821
- uses: actions/checkout@v4
1922
- uses: gradle/actions/wrapper-validation@v4
20-
21-
build-client:
22-
name: "PhotonClient Build"
23-
defaults:
24-
run:
25-
working-directory: photon-client
26-
runs-on: ubuntu-22.04
27-
steps:
28-
- uses: actions/checkout@v4
29-
- name: Setup Node.js
30-
uses: actions/setup-node@v4
31-
with:
32-
node-version: 22
33-
- name: Install Dependencies
34-
run: npm ci
35-
- name: Build Production Client
36-
run: npm run build
37-
- uses: actions/upload-artifact@v4
38-
with:
39-
name: built-client
40-
path: photon-client/dist/
4123
build-examples:
4224

4325
strategy:
@@ -94,6 +76,14 @@ jobs:
9476
with:
9577
java-version: 17
9678
distribution: temurin
79+
- name: Install pnpm
80+
uses: pnpm/action-setup@v4
81+
with:
82+
version: 10
83+
- name: Setup Node.js
84+
uses: actions/setup-node@v4
85+
with:
86+
node-version: 22
9787
- name: Install mrcal deps
9888
run: sudo apt-get update && sudo apt-get install -y libcholmod3 liblapack3 libsuitesparseconfig5
9989
- name: Gradle Build
@@ -102,14 +92,6 @@ jobs:
10292
run: ./gradlew testHeadless --stacktrace
10393
- name: Gradle Coverage
10494
run: ./gradlew jacocoTestReport
105-
- name: Publish Coverage Report
106-
uses: codecov/codecov-action@v4
107-
with:
108-
file: ./photon-server/build/reports/jacoco/test/jacocoTestReport.xml
109-
- name: Publish Core Coverage Report
110-
uses: codecov/codecov-action@v4
111-
with:
112-
file: ./photon-core/build/reports/jacoco/test/jacocoTestReport.xml
11395
build-offline-docs:
11496
name: "Build Offline Docs"
11597
runs-on: ubuntu-22.04
@@ -278,7 +260,7 @@ jobs:
278260
path: output/*.zip
279261

280262
build-package:
281-
needs: [build-client, build-gradle, build-offline-docs]
263+
needs: [build-gradle, build-offline-docs]
282264

283265
strategy:
284266
fail-fast: false
@@ -318,21 +300,19 @@ jobs:
318300
java-version: 17
319301
distribution: temurin
320302
architecture: ${{ matrix.architecture }}
303+
- name: Install pnpm
304+
uses: pnpm/action-setup@v4
305+
with:
306+
version: 10
307+
- name: Setup Node.js
308+
uses: actions/setup-node@v4
309+
with:
310+
node-version: 22
311+
cache: pnpm
312+
cache-dependency-path: photon-client/pnpm-lock.yaml
321313
- name: Install Arm64 Toolchain
322314
run: ./gradlew installArm64Toolchain
323315
if: ${{ (matrix.artifact-name) == 'LinuxArm64' }}
324-
- run: |
325-
rm -rf photon-server/src/main/resources/web/*
326-
mkdir -p photon-server/src/main/resources/web/docs
327-
if: ${{ (matrix.os) != 'windows-latest' }}
328-
- run: |
329-
del photon-server\src\main\resources\web\*.*
330-
mkdir photon-server\src\main\resources\web\docs
331-
if: ${{ (matrix.os) == 'windows-latest' }}
332-
- uses: actions/download-artifact@v4
333-
with:
334-
name: built-client
335-
path: photon-server/src/main/resources/web/
336316
- uses: actions/download-artifact@v4
337317
with:
338318
name: built-docs
@@ -382,7 +362,7 @@ jobs:
382362
- run: |
383363
sudo apt-get update
384364
sudo apt-get install --yes libcholmod3 liblapack3 libsuitesparseconfig5
385-
if: ${{ (matrix.os) == 'ubuntu-22.04' }}
365+
if: ${{ (matrix.os) == 'ubuntu-24.04' }}
386366
# and actually run the jar
387367
- run: java -jar ${{ matrix.extraOpts }} *.jar --smoketest
388368
if: ${{ (matrix.os) != 'windows-latest' }}
@@ -396,10 +376,10 @@ jobs:
396376
fail-fast: false
397377
matrix:
398378
include:
399-
- os: ubuntu-22.04
379+
- os: ubuntu-24.04
400380
artifact-name: LinuxArm64
401381
image_suffix: RaspberryPi
402-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_raspi.img.xz
382+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_raspi.img.xz
403383
cpu: cortex-a7
404384
image_additional_mb: 0
405385
extraOpts: -Djdk.lang.Process.launchMechanism=vfork
@@ -435,69 +415,81 @@ jobs:
435415
fail-fast: false
436416
matrix:
437417
include:
438-
- os: ubuntu-22.04
418+
- os: ubuntu-24.04
439419
artifact-name: LinuxArm64
440420
image_suffix: RaspberryPi
441-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_raspi.img.xz
421+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_raspi.img.xz
442422
cpu: cortex-a7
443423
image_additional_mb: 0
444-
- os: ubuntu-22.04
424+
- os: ubuntu-24.04
445425
artifact-name: LinuxArm64
446426
image_suffix: limelight2
447-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_limelight.img.xz
427+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_limelight.img.xz
448428
cpu: cortex-a7
449429
image_additional_mb: 0
450-
- os: ubuntu-22.04
430+
- os: ubuntu-24.04
451431
artifact-name: LinuxArm64
452432
image_suffix: limelight3
453-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_limelight3.img.xz
433+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_limelight3.img.xz
454434
cpu: cortex-a7
455435
image_additional_mb: 0
456-
- os: ubuntu-22.04
436+
- os: ubuntu-24.04
457437
artifact-name: LinuxArm64
458438
image_suffix: limelight3G
459-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_limelight3g.img.xz
439+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_limelight3g.img.xz
460440
cpu: cortex-a7
461441
image_additional_mb: 0
462-
- os: ubuntu-22.04
442+
- os: ubuntu-24.04
443+
artifact-name: LinuxArm64
444+
image_suffix: limelight4
445+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_limelight4.img.xz
446+
cpu: cortex-a76
447+
image_additional_mb: 0
448+
- os: ubuntu-24.04
449+
artifact-name: LinuxArm64
450+
image_suffix: luma_p1
451+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_luma_p1.img.xz
452+
cpu: cortex-a76
453+
image_additional_mb: 0
454+
- os: ubuntu-24.04
463455
artifact-name: LinuxArm64
464456
image_suffix: orangepi5
465-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_opi5.img.xz
457+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_opi5.img.xz
466458
cpu: cortex-a8
467459
image_additional_mb: 1024
468-
- os: ubuntu-22.04
460+
- os: ubuntu-24.04
469461
artifact-name: LinuxArm64
470462
image_suffix: orangepi5b
471-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_opi5b.img.xz
463+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_opi5b.img.xz
472464
cpu: cortex-a8
473465
image_additional_mb: 1024
474-
- os: ubuntu-22.04
466+
- os: ubuntu-24.04
475467
artifact-name: LinuxArm64
476468
image_suffix: orangepi5plus
477-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_opi5plus.img.xz
469+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_opi5plus.img.xz
478470
cpu: cortex-a8
479471
image_additional_mb: 1024
480-
- os: ubuntu-22.04
472+
- os: ubuntu-24.04
481473
artifact-name: LinuxArm64
482474
image_suffix: orangepi5pro
483-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_opi5pro.img.xz
475+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_opi5pro.img.xz
484476
cpu: cortex-a8
485477
image_additional_mb: 1024
486-
- os: ubuntu-22.04
478+
- os: ubuntu-24.04
487479
artifact-name: LinuxArm64
488480
image_suffix: orangepi5max
489-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_opi5max.img.xz
481+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_opi5max.img.xz
490482
cpu: cortex-a8
491483
image_additional_mb: 1024
492-
- os: ubuntu-22.04
484+
- os: ubuntu-24.04
493485
artifact-name: LinuxArm64
494486
image_suffix: rock5c
495-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_rock5c.img.xz
487+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_rock5c.img.xz
496488
cpu: cortex-a8
497489
image_additional_mb: 1024
498490

499491
runs-on: ${{ matrix.os }}
500-
name: "Build image - ${{ matrix.image_url }}"
492+
name: "Build image - ${{ matrix.image_suffix }}"
501493

502494
steps:
503495
- name: Checkout code
@@ -531,8 +523,40 @@ jobs:
531523
with:
532524
name: image-${{ matrix.image_suffix }}
533525
path: photonvision*.xz
526+
build-rubik-image:
527+
needs: [build-package]
528+
529+
if: ${{ github.event_name != 'pull_request' }}
530+
531+
runs-on: ubuntu-24.04
532+
name: "Build image - Rubik Pi 3"
533+
534+
steps:
535+
- name: Checkout code
536+
uses: actions/checkout@v4
537+
with:
538+
fetch-depth: 0
539+
- uses: actions/download-artifact@v4
540+
with:
541+
name: jar-LinuxArm64
542+
- name: Generate image
543+
run: |
544+
wget https://raw.githubusercontent.com/PhotonVision/photon-image-modifier/refs/tags/$IMAGE_VERSION/mount_rubikpi3.sh
545+
chmod +x mount_rubikpi3.sh
546+
./mount_rubikpi3.sh https://github.com/PhotonVision/photon-image-modifier/releases/download/$IMAGE_VERSION/photonvision_rubikpi3.tar.xz /tmp/build/scripts/armrunner.sh
547+
- name: Compress image
548+
run: |
549+
new_jar=$(realpath $(find . -name photonvision\*-linuxarm64.jar))
550+
new_image_name=$(basename "${new_jar/.jar/_rubikpi3.img}")
551+
mv photonvision_rubikpi3 $new_image_name
552+
tar -I 'xz -T0' -cf ${new_image_name}.tar.xz $new_image_name --checkpoint=10000 --checkpoint-action=echo='%T'
553+
- uses: actions/upload-artifact@v4
554+
name: Upload image
555+
with:
556+
name: image-rubikpi3
557+
path: photonvision*.xz
534558
release:
535-
needs: [build-package, build-image, combine]
559+
needs: [build-photonlib-vendorjson, build-package, build-image, build-rubik-image, combine]
536560
runs-on: ubuntu-22.04
537561
steps:
538562
# Download all fat JARs
@@ -558,50 +582,25 @@ jobs:
558582

559583
- run: find
560584
# Push to dev release
561-
- uses: pyTooling/Actions/releaser@r0
585+
- uses: pyTooling/Actions/releaser@r6
562586
with:
563587
token: ${{ secrets.GITHUB_TOKEN }}
564588
tag: 'Dev'
565589
rm: true
590+
snapshots: false
566591
files: |
567592
**/*.xz
568593
**/*linux*.jar
569594
**/*win*.jar
570595
**/photonlib*.json
571596
**/photonlib*.zip
572597
if: github.event_name == 'push'
573-
# Upload all jars and xz archives
574-
# Split into two uploads to work around max size limits in action-gh-releases
575-
# https://github.com/softprops/action-gh-release/issues/353
576-
- uses: softprops/action-gh-release@v2.0.9
577-
with:
578-
files: |
579-
**/@(*orangepi5*|*rock5*).xz
580-
if: startsWith(github.ref, 'refs/tags/v')
581-
env:
582-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
583-
- uses: softprops/action-gh-release@v2.0.9
584-
with:
585-
files: |
586-
**/!(*orangepi5*|*rock5*).xz
587-
**/*.jar
588-
**/photonlib*.json
589-
**/photonlib*.zip
590-
if: startsWith(github.ref, 'refs/tags/v')
591-
env:
592-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
593-
594-
dispatch:
595-
name: dispatch
596-
needs: [build-photonlib-vendorjson, release]
597-
runs-on: ubuntu-22.04
598-
steps:
599-
- uses: peter-evans/repository-dispatch@v3
600-
if: |
601-
github.repository == 'PhotonVision/photonvision' &&
602-
startsWith(github.ref, 'refs/tags/v')
598+
- name: Create Vendor JSON Repo PR
599+
uses: wpilibsuite/vendor-json-repo/.github/actions/add_vendordep@main
603600
with:
601+
repo: PhotonVision/vendor-json-repo
604602
token: ${{ secrets.VENDOR_JSON_REPO_PUSH_TOKEN }}
605-
repository: PhotonVision/vendor-json-repo
606-
event-type: tag
607-
client-payload: '{"run_id": "${{ github.run_id }}", "package_version": "${{ github.ref_name }}"}'
603+
vendordep_file: ${{ github.workspace }}/photonlib-${{ github.ref_name }}.json
604+
pr_title: Update photonlib to ${{ github.ref_name }}
605+
pr_branch: photonlib-${{ github.ref_name }}
606+
if: github.repository == 'PhotonVision/photonvision' && startsWith(github.ref, 'refs/tags/v')

.github/workflows/labeler.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: "Pull Request Labeler"
2+
on:
3+
- pull_request_target
4+
5+
jobs:
6+
labeler:
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/labeler@v5
13+
with:
14+
sync-labels: true

0 commit comments

Comments
 (0)