Skip to content

Commit 4c5a6d9

Browse files
authored
Merge branch 'jetson-orin' into cuda
2 parents 2a429ed + 0179615 commit 4c5a6d9

File tree

407 files changed

+14611
-6896
lines changed

Some content is hidden

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

407 files changed

+14611
-6896
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
# These owners will be the default owners for everything in the repo.
22
* @PhotonVision/program-devs
3+
docs/* @PhotonVision/doc-maintainers
4+
photonlib-java-examples/* @PhotonVision/doc-maintainers
5+
photonlib-cpp-examples/* @PhotonVision/doc-maintainers
6+
photonlib-python-examples/* @PhotonVision/doc-maintainers

.github/workflows/build.yml

Lines changed: 109 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
name: Build
22

33
on:
4-
# Run on pushes to master and pushed tags, and on pull requests against master, but ignore the docs folder
4+
# Run on pushes to main and pushed tags, and on pull requests against main, but ignore the docs folder
55
push:
6-
branches: [ master ]
6+
branches: [ main ]
77
tags:
88
- 'v*'
9-
paths:
10-
- '**'
11-
- '!docs/**'
12-
- '.github/**'
139
pull_request:
14-
branches: [ master ]
15-
paths:
16-
- '**'
17-
- '!docs/**'
18-
- '.github/**'
10+
branches: [ main ]
11+
merge_group:
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
15+
cancel-in-progress: true
1916

2017
jobs:
2118
build-client:
@@ -39,8 +36,20 @@ jobs:
3936
name: built-client
4037
path: photon-client/dist/
4138
build-examples:
42-
name: "Build Examples"
43-
runs-on: ubuntu-22.04
39+
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
include:
44+
- os: windows-2022
45+
architecture: x64
46+
- os: macos-14
47+
architecture: aarch64
48+
- os: ubuntu-22.04
49+
50+
name: "Photonlib - Build Examples - ${{ matrix.os }}"
51+
runs-on: ${{ matrix.os }}
52+
4453
steps:
4554
- name: Checkout code
4655
uses: actions/checkout@v4
@@ -56,23 +65,14 @@ jobs:
5665
- name: Install RoboRIO Toolchain
5766
run: ./gradlew installRoboRioToolchain
5867
# Need to publish to maven local first, so that C++ sim can pick it up
59-
# Still haven't figured out how to make the vendordep file be copied before trying to build examples
6068
- name: Publish photonlib to maven local
61-
run: |
62-
chmod +x gradlew
63-
./gradlew publishtomavenlocal -x check
69+
run: ./gradlew photon-targeting:publishtomavenlocal photon-lib:publishtomavenlocal -x check
6470
- name: Build Java examples
6571
working-directory: photonlib-java-examples
66-
run: |
67-
chmod +x gradlew
68-
./gradlew copyPhotonlib -x check
69-
./gradlew build -x check
72+
run: ./gradlew build
7073
- name: Build C++ examples
7174
working-directory: photonlib-cpp-examples
72-
run: |
73-
chmod +x gradlew
74-
./gradlew copyPhotonlib -x check
75-
./gradlew build -x check
75+
run: ./gradlew build
7676
build-gradle:
7777
name: "Gradle Build"
7878
runs-on: ubuntu-22.04
@@ -92,19 +92,17 @@ jobs:
9292
- name: Install mrcal deps
9393
run: sudo apt-get update && sudo apt-get install -y libcholmod3 liblapack3 libsuitesparseconfig5
9494
- name: Gradle Build
95-
run: |
96-
chmod +x gradlew
97-
./gradlew photon-targeting:build photon-core:build photon-server:build -x check
95+
run: ./gradlew photon-targeting:build photon-core:build photon-server:build -x check
9896
- name: Gradle Tests
9997
run: ./gradlew testHeadless -i --stacktrace
10098
- name: Gradle Coverage
10199
run: ./gradlew jacocoTestReport
102100
- name: Publish Coverage Report
103-
uses: codecov/codecov-action@v3
101+
uses: codecov/codecov-action@v4
104102
with:
105103
file: ./photon-server/build/reports/jacoco/test/jacocoTestReport.xml
106104
- name: Publish Core Coverage Report
107-
uses: codecov/codecov-action@v3
105+
uses: codecov/codecov-action@v4
108106
with:
109107
file: ./photon-core/build/reports/jacoco/test/jacocoTestReport.xml
110108
build-offline-docs:
@@ -133,6 +131,36 @@ jobs:
133131
with:
134132
name: built-docs
135133
path: docs/build/html
134+
135+
build-photonlib-vendorjson:
136+
name: "Build Vendor JSON"
137+
runs-on: ubuntu-22.04
138+
steps:
139+
- uses: actions/checkout@v4
140+
with:
141+
fetch-depth: 0
142+
143+
- name: Install Java 17
144+
uses: actions/setup-java@v4
145+
with:
146+
java-version: 17
147+
distribution: temurin
148+
149+
# grab all tags
150+
- run: git fetch --tags --force
151+
152+
# Generate the JSON and give it the ""standard""" name maven gives it
153+
- run: |
154+
./gradlew photon-lib:generateVendorJson
155+
export VERSION=$(git describe --tags --match=v*)
156+
mv photon-lib/build/generated/vendordeps/photonlib.json photon-lib/build/generated/vendordeps/photonlib-$(git describe --tags --match=v*).json
157+
158+
# Upload it here so it shows up in releases
159+
- uses: actions/upload-artifact@v4
160+
with:
161+
name: photonlib-vendor-json
162+
path: photon-lib/build/generated/vendordeps/photonlib-*.json
163+
136164
build-photonlib-host:
137165
env:
138166
MACOSX_DEPLOYMENT_TARGET: 13
@@ -162,9 +190,7 @@ jobs:
162190
distribution: temurin
163191
architecture: ${{ matrix.architecture }}
164192
- run: git fetch --tags --force
165-
- run: |
166-
chmod +x gradlew
167-
./gradlew photon-targeting:build photon-lib:build -i
193+
- run: ./gradlew photon-targeting:build photon-lib:build -i
168194
name: Build with Gradle
169195
- run: ./gradlew photon-lib:publish photon-targeting:publish
170196
name: Publish
@@ -183,7 +209,7 @@ jobs:
183209
fail-fast: false
184210
matrix:
185211
include:
186-
- container: wpilib/roborio-cross-ubuntu:2024-22.04
212+
- container: wpilib/roborio-cross-ubuntu:2025-24.04
187213
artifact-name: Athena
188214
build-options: "-Ponlylinuxathena"
189215
- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04
@@ -205,13 +231,9 @@ jobs:
205231
git config --global --add safe.directory /__w/photonvision/photonvision
206232
- name: Build PhotonLib
207233
# We don't need to run tests, since we specify only non-native platforms
208-
run: |
209-
chmod +x gradlew
210-
./gradlew photon-targeting:build photon-lib:build ${{ matrix.build-options }} -i -x test
234+
run: ./gradlew photon-targeting:build photon-lib:build ${{ matrix.build-options }} -i -x test
211235
- name: Publish
212-
run: |
213-
chmod +x gradlew
214-
./gradlew photon-lib:publish photon-targeting:publish ${{ matrix.build-options }}
236+
run: ./gradlew photon-lib:publish photon-targeting:publish ${{ matrix.build-options }}
215237
env:
216238
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
217239
if: github.event_name == 'push' && github.repository_owner == 'photonvision'
@@ -307,13 +329,9 @@ jobs:
307329
with:
308330
name: built-docs
309331
path: photon-server/src/main/resources/web/docs
310-
- run: |
311-
chmod +x gradlew
312-
./gradlew photon-targeting:jar photon-server:shadowJar -PArchOverride=${{ matrix.arch-override }}
332+
- run: ./gradlew photon-targeting:jar photon-server:shadowJar -PArchOverride=${{ matrix.arch-override }}
313333
if: ${{ (matrix.arch-override != 'none') }}
314-
- run: |
315-
chmod +x gradlew
316-
./gradlew photon-server:shadowJar
334+
- run: ./gradlew photon-server:shadowJar
317335
if: ${{ (matrix.arch-override == 'none') }}
318336
- uses: actions/upload-artifact@v4
319337
with:
@@ -373,7 +391,7 @@ jobs:
373391
- os: ubuntu-22.04
374392
artifact-name: LinuxArm64
375393
image_suffix: RaspberryPi
376-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.0-beta-4/photonvision_raspi.img.xz
394+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_raspi.img.xz
377395
cpu: cortex-a7
378396
image_additional_mb: 0
379397
extraOpts: -Djdk.lang.Process.launchMechanism=vfork
@@ -412,49 +430,61 @@ jobs:
412430
- os: ubuntu-22.04
413431
artifact-name: LinuxArm64
414432
image_suffix: RaspberryPi
415-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.0-beta-6/photonvision_raspi.img.xz
433+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_raspi.img.xz
416434
cpu: cortex-a7
417435
image_additional_mb: 0
418436
- os: ubuntu-22.04
419437
artifact-name: LinuxArm64
420438
image_suffix: limelight2
421-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.0-beta-6/photonvision_limelight.img.xz
439+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_limelight.img.xz
422440
cpu: cortex-a7
423441
image_additional_mb: 0
424442
- os: ubuntu-22.04
425443
artifact-name: LinuxArm64
426444
image_suffix: limelight3
427-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.0-beta-6/photonvision_limelight3.img.xz
445+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_limelight3.img.xz
446+
cpu: cortex-a7
447+
image_additional_mb: 0
448+
- os: ubuntu-22.04
449+
artifact-name: LinuxArm64
450+
image_suffix: limelight3G
451+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_limelight3g.img.xz
428452
cpu: cortex-a7
429453
image_additional_mb: 0
430454
- os: ubuntu-22.04
431455
artifact-name: LinuxArm64
432456
image_suffix: orangepi5
433-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.0-beta-6/photonvision_opi5.img.xz
457+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_opi5.img.xz
434458
cpu: cortex-a8
435459
image_additional_mb: 1024
436460
- os: ubuntu-22.04
437461
artifact-name: LinuxArm64
438462
image_suffix: orangepi5b
439-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.0-beta-6/photonvision_opi5b.img.xz
463+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_opi5b.img.xz
440464
cpu: cortex-a8
441465
image_additional_mb: 1024
442466
- os: ubuntu-22.04
443467
artifact-name: LinuxArm64
444468
image_suffix: orangepi5plus
445-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.0-beta-6/photonvision_opi5plus.img.xz
469+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_opi5plus.img.xz
446470
cpu: cortex-a8
447471
image_additional_mb: 1024
448472
- os: ubuntu-22.04
449473
artifact-name: LinuxArm64
450474
image_suffix: orangepi5pro
451-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.0-beta-6/photonvision_opi5pro.img.xz
475+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_opi5pro.img.xz
452476
cpu: cortex-a8
453477
image_additional_mb: 1024
454478
- os: ubuntu-22.04
455479
artifact-name: LinuxArm64
456480
image_suffix: orangepi5max
457-
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.0-beta-6/photonvision_opi5max.img.xz
481+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_opi5max.img.xz
482+
cpu: cortex-a8
483+
image_additional_mb: 1024
484+
- os: ubuntu-22.04
485+
artifact-name: LinuxArm64
486+
image_suffix: rock5c
487+
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.3/photonvision_rock5c.img.xz
458488
cpu: cortex-a8
459489
image_additional_mb: 1024
460490

@@ -507,6 +537,11 @@ jobs:
507537
with:
508538
merge-multiple: true
509539
pattern: photonlib-offline
540+
# Download vendor json
541+
- uses: actions/download-artifact@v4
542+
with:
543+
merge-multiple: true
544+
pattern: photonlib-vendor-json
510545
# Download all images
511546
- uses: actions/download-artifact@v4
512547
with:
@@ -529,20 +564,35 @@ jobs:
529564
# Upload all jars and xz archives
530565
# Split into two uploads to work around max size limits in action-gh-releases
531566
# https://github.com/softprops/action-gh-release/issues/353
532-
- uses: softprops/[email protected].8
567+
- uses: softprops/[email protected].9
533568
with:
534569
files: |
535-
**/*orangepi5*.xz
570+
**/@(*orangepi5*|*rock5*).xz
536571
if: startsWith(github.ref, 'refs/tags/v')
537572
env:
538573
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
539-
- uses: softprops/[email protected].8
574+
- uses: softprops/[email protected].9
540575
with:
541576
files: |
542-
**/!(*orangepi5*).xz
577+
**/!(*orangepi5*|*rock5*).xz
543578
**/*.jar
544579
**/photonlib*.json
545580
**/photonlib*.zip
546581
if: startsWith(github.ref, 'refs/tags/v')
547582
env:
548583
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
584+
585+
dispatch:
586+
name: dispatch
587+
needs: [build-photonlib-vendorjson, release]
588+
runs-on: ubuntu-22.04
589+
steps:
590+
- uses: peter-evans/repository-dispatch@v3
591+
if: |
592+
github.repository == 'PhotonVision/photonvision' &&
593+
startsWith(github.ref, 'refs/tags/v')
594+
with:
595+
token: ${{ secrets.VENDOR_JSON_REPO_PUSH_TOKEN }}
596+
repository: PhotonVision/vendor-json-repo
597+
event-type: tag
598+
client-payload: '{"run_id": "${{ github.run_id }}", "package_version": "${{ github.ref_name }}"}'

.github/workflows/cut-new-tag.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Cut a new tag
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag_name:
7+
type: string
8+
description: The full name of the new tag to push to the latest commit to main
9+
10+
jobs:
11+
push_tag:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
- run: git tag ${{ github.event.inputs.tag_name }}
17+
- run: git push origin ${{ github.event.inputs.tag_name }}

0 commit comments

Comments
 (0)