Skip to content

Commit 78fa48d

Browse files
committed
Merge remote-tracking branch 'upstream/main' into merge-official
2 parents b3d1fd7 + 354f4e9 commit 78fa48d

File tree

509 files changed

+316305
-12035
lines changed

Some content is hidden

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

509 files changed

+316305
-12035
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@
3535
*.so binary
3636
*.dll binary
3737
*.webp binary
38+
39+
# autogenerated constrained solve pnp code
40+
photon-targeting/src/main/native/cpp/photon/constrained_solvepnp/generate/**/* linguist-generated

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ If applicable, add screenshots to help explain your problem. Additionally, provi
2222

2323
**Platform:**
2424
- Hardware Platform (ex. Raspberry Pi 4, Windows x64):
25+
- How is it powered? (ex. Zinc-V, Pololu Buck Converter, Battery Bank):
2526
- Network Configuration (Connection between the Radio and any devices in between, such as a Network Switch):
2627
- PhotonVision Version:
2728
- Browser (with Version) (Chrome, Edge, Firefox, etc.):

.github/ISSUE_TEMPLATE/docs_issue.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Documentation Request
3+
about: Something needs to be documented/updated in the documentation
4+
title: ''
5+
labels: documentation
6+
assignees: ''
7+
8+
---
9+
10+
**Are you requesting documentation for a new feature, or updated documentation for an old feature?**
11+
Put the feature you are requesting documentation for here, along with whether the documentation is stale and needs to be updated, or whether the documentation does not exist, and needs to be created.
12+
13+
**Where is it?**
14+
Put the location of the documentation that needs to be updated here. If you're requesting documenation for a new feature, put where you think it should go.
15+
16+
**Additional context**
17+
Add any other context or screenshots about the feature request here.

.github/labeler.yml

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

.github/pull_request_template.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Description
2+
3+
<!-- What changed? Why? (the code + comments should speak for itself on the "how") -->
4+
5+
<!-- Fun screenshots or a cool video or something are super helpful as well. If this touches platform-specific behavior, this is where test evidence should be collected. -->
6+
7+
<!-- Any issues this pull request closes or pull requests this supersedes should be linked with `Closes #issuenumber`. -->
8+
9+
## Meta
10+
11+
Merge checklist:
12+
- [ ] Pull Request title is [short, imperative summary](https://cbea.ms/git-commit/) of proposed changes
13+
- [ ] The description documents the _what_ and _why_
14+
- [ ] If this PR changes behavior or adds a feature, user documentation is updated
15+
- [ ] 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
17+
- [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated
18+
- [ ] If this PR addresses a bug, a regression test for it is added

.github/workflows/build.yml

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@ name: Build
33
on:
44
# Run on pushes to main and pushed tags, and on pull requests against main, but ignore the docs folder
55
push:
6-
branches: [ main ]
7-
tags:
8-
- 'v*'
96
pull_request:
10-
branches: [ main ]
11-
merge_group:
127

138
concurrency:
149
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
1510
cancel-in-progress: true
1611

1712
jobs:
13+
14+
validation:
15+
name: "Validation"
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: gradle/actions/wrapper-validation@v4
20+
1821
build-client:
1922
name: "PhotonClient Build"
2023
defaults:
@@ -23,14 +26,20 @@ jobs:
2326
runs-on: ubuntu-22.04
2427
steps:
2528
- uses: actions/checkout@v4
29+
- name: Install pnpm
30+
uses: pnpm/action-setup@v4
31+
with:
32+
version: 10
2633
- name: Setup Node.js
2734
uses: actions/setup-node@v4
2835
with:
29-
node-version: 18
36+
node-version: 22
37+
cache: pnpm
38+
cache-dependency-path: photon-client/pnpm-lock.yaml
3039
- name: Install Dependencies
31-
run: npm ci
40+
run: pnpm i --frozen-lockfile
3241
- name: Build Production Client
33-
run: npm run build
42+
run: pnpm run build
3443
- uses: actions/upload-artifact@v4
3544
with:
3645
name: built-client
@@ -49,6 +58,7 @@ jobs:
4958

5059
name: "Photonlib - Build Examples - ${{ matrix.os }}"
5160
runs-on: ${{ matrix.os }}
61+
needs: [validation]
5262

5363
steps:
5464
- name: Checkout code
@@ -76,6 +86,7 @@ jobs:
7686
build-gradle:
7787
name: "Gradle Build"
7888
runs-on: ubuntu-22.04
89+
needs: [validation]
7990
steps:
8091
# Checkout code.
8192
- name: Checkout code
@@ -94,17 +105,9 @@ jobs:
94105
- name: Gradle Build
95106
run: ./gradlew photon-targeting:build photon-core:build photon-server:build -x check
96107
- name: Gradle Tests
97-
run: ./gradlew testHeadless -i --stacktrace
108+
run: ./gradlew testHeadless --stacktrace
98109
- name: Gradle Coverage
99110
run: ./gradlew jacocoTestReport
100-
- name: Publish Coverage Report
101-
uses: codecov/codecov-action@v4
102-
with:
103-
file: ./photon-server/build/reports/jacoco/test/jacocoTestReport.xml
104-
- name: Publish Core Coverage Report
105-
uses: codecov/codecov-action@v4
106-
with:
107-
file: ./photon-core/build/reports/jacoco/test/jacocoTestReport.xml
108111
build-offline-docs:
109112
name: "Build Offline Docs"
110113
runs-on: ubuntu-22.04
@@ -135,6 +138,7 @@ jobs:
135138
build-photonlib-vendorjson:
136139
name: "Build Vendor JSON"
137140
runs-on: ubuntu-22.04
141+
needs: [validation]
138142
steps:
139143
- uses: actions/checkout@v4
140144
with:
@@ -179,6 +183,7 @@ jobs:
179183

180184
name: "Photonlib - Build Host - ${{ matrix.artifact-name }}"
181185
runs-on: ${{ matrix.os }}
186+
needs: [validation]
182187
steps:
183188
- uses: actions/checkout@v4
184189
with:
@@ -190,7 +195,7 @@ jobs:
190195
distribution: temurin
191196
architecture: ${{ matrix.architecture }}
192197
- run: git fetch --tags --force
193-
- run: ./gradlew photon-targeting:build photon-lib:build -i
198+
- run: ./gradlew photon-targeting:build photon-lib:build
194199
name: Build with Gradle
195200
- run: ./gradlew photon-lib:publish photon-targeting:publish
196201
name: Publish
@@ -222,6 +227,7 @@ jobs:
222227
runs-on: ubuntu-22.04
223228
container: ${{ matrix.container }}
224229
name: "Photonlib - Build Docker - ${{ matrix.artifact-name }}"
230+
needs: [validation]
225231
steps:
226232
- uses: actions/checkout@v4
227233
with:
@@ -231,7 +237,7 @@ jobs:
231237
git config --global --add safe.directory /__w/photonvision/photonvision
232238
- name: Build PhotonLib
233239
# We don't need to run tests, since we specify only non-native platforms
234-
run: ./gradlew photon-targeting:build photon-lib:build ${{ matrix.build-options }} -i -x test
240+
run: ./gradlew photon-targeting:build photon-lib:build ${{ matrix.build-options }} -x test
235241
- name: Publish
236242
run: ./gradlew photon-lib:publish photon-targeting:publish ${{ matrix.build-options }}
237243
env:
@@ -524,7 +530,7 @@ jobs:
524530
name: image-${{ matrix.image_suffix }}
525531
path: photonvision*.xz
526532
release:
527-
needs: [build-package, build-image, combine]
533+
needs: [build-photonlib-vendorjson, build-package, build-image, combine]
528534
runs-on: ubuntu-22.04
529535
steps:
530536
# Download all fat JARs
@@ -557,7 +563,8 @@ jobs:
557563
rm: true
558564
files: |
559565
**/*.xz
560-
**/*.jar
566+
**/*linux*.jar
567+
**/*win*.jar
561568
**/photonlib*.json
562569
**/photonlib*.zip
563570
if: github.event_name == 'push'
@@ -581,18 +588,12 @@ jobs:
581588
if: startsWith(github.ref, 'refs/tags/v')
582589
env:
583590
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')
591+
- name: Create Vendor JSON Repo PR
592+
uses: wpilibsuite/vendor-json-repo/.github/actions/add_vendordep@main
594593
with:
594+
repo: PhotonVision/vendor-json-repo
595595
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 }}"}'
596+
vendordep_file: ${{ github.workspace }}/photonlib-${{ github.ref_name }}.json
597+
pr_title: Update photonlib to ${{ github.ref_name }}
598+
pr_branch: photonlib-${{ github.ref_name }}
599+
if: github.repository == 'PhotonVision/photonvision' && startsWith(github.ref, 'refs/tags/v')

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

Lines changed: 0 additions & 17 deletions
This file was deleted.

.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

.github/workflows/lint-format.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@ name: Lint and Format
33
on:
44
# Run on pushes to main and pushed tags, and on pull requests against main, but ignore the docs folder
55
push:
6-
branches: [ main ]
7-
tags:
8-
- 'v*'
96
pull_request:
10-
branches: [ main ]
11-
merge_group:
127

138
concurrency:
149
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
1510
cancel-in-progress: true
1611

1712
jobs:
13+
validation:
14+
name: "Validation"
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: gradle/actions/wrapper-validation@v4
1819
wpiformat:
1920
name: "wpiformat"
2021
runs-on: ubuntu-22.04
@@ -30,7 +31,7 @@ jobs:
3031
with:
3132
python-version: 3.11
3233
- name: Install wpiformat
33-
run: pip3 install wpiformat==2024.45
34+
run: pip3 install wpiformat==2025.34
3435
- name: Run
3536
run: wpiformat
3637
- name: Check output
@@ -45,6 +46,7 @@ jobs:
4546
if: ${{ failure() }}
4647
javaformat:
4748
name: "Java Formatting"
49+
needs: [validation]
4850
runs-on: ubuntu-22.04
4951
steps:
5052
- uses: actions/checkout@v4
@@ -65,16 +67,22 @@ jobs:
6567
runs-on: ubuntu-22.04
6668
steps:
6769
- uses: actions/checkout@v4
70+
- name: Install pnpm
71+
uses: pnpm/action-setup@v4
72+
with:
73+
version: 10
6874
- name: Setup Node.js
6975
uses: actions/setup-node@v4
7076
with:
71-
node-version: 18
77+
node-version: 22
78+
cache: pnpm
79+
cache-dependency-path: photon-client/pnpm-lock.yaml
7280
- name: Install Dependencies
73-
run: npm ci
81+
run: pnpm i --frozen-lockfile
7482
- name: Check Linting
75-
run: npm run lint-ci
83+
run: pnpm run lint-ci
7684
- name: Check Formatting
77-
run: npm run format-ci
85+
run: pnpm run format-ci
7886
server-index:
7987
name: "Check server index.html not changed"
8088
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)