Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"backend":
- all:
- changed-files:
- any-glob-to-any-file: [photon-core/**, photon-server/**]
- all-globs-to-all-files: "!photon-server/src/main/resources/web/index.html"
- changed-files:
- any-glob-to-any-file: [photon-core/**, photon-server/**]
"documentation":
- changed-files:
- any-glob-to-any-file: [docs/**, photon-docs/**]
Expand Down
59 changes: 19 additions & 40 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v4

build-client:
name: "PhotonClient Build"
defaults:
run:
working-directory: photon-client
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: photon-client/pnpm-lock.yaml
- name: Install Dependencies
run: pnpm i --frozen-lockfile
- name: Build Production Client
run: pnpm run build
- uses: actions/upload-artifact@v4
with:
name: built-client
path: photon-client/dist/
build-examples:

strategy:
Expand Down Expand Up @@ -100,6 +73,14 @@ jobs:
with:
java-version: 17
distribution: temurin
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install mrcal deps
run: sudo apt-get update && sudo apt-get install -y libcholmod3 liblapack3 libsuitesparseconfig5
- name: Gradle Build
Expand Down Expand Up @@ -276,7 +257,7 @@ jobs:
path: output/*.zip

build-package:
needs: [build-client, build-gradle, build-offline-docs]
needs: [build-gradle, build-offline-docs]

strategy:
fail-fast: false
Expand Down Expand Up @@ -316,21 +297,19 @@ jobs:
java-version: 17
distribution: temurin
architecture: ${{ matrix.architecture }}
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: photon-client/pnpm-lock.yaml
- name: Install Arm64 Toolchain
run: ./gradlew installArm64Toolchain
if: ${{ (matrix.artifact-name) == 'LinuxArm64' }}
- run: |
rm -rf photon-server/src/main/resources/web/*
mkdir -p photon-server/src/main/resources/web/docs
if: ${{ (matrix.os) != 'windows-latest' }}
- run: |
del photon-server\src\main\resources\web\*.*
mkdir photon-server\src\main\resources\web\docs
if: ${{ (matrix.os) == 'windows-latest' }}
- uses: actions/download-artifact@v4
with:
name: built-client
path: photon-server/src/main/resources/web/
- uses: actions/download-artifact@v4
with:
name: built-docs
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/lint-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,3 @@ jobs:
run: pnpm run lint-ci
- name: Check Formatting
run: pnpm run format-ci
server-index:
name: "Check server index.html not changed"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Fetch all history and metadata
run: |
git fetch --prune --unshallow
git checkout -b pr
git branch -f main origin/main
- name: Check index.html not changed
run: git --no-pager diff --exit-code origin/main photon-server/src/main/resources/web/index.html
20 changes: 0 additions & 20 deletions docs/source/docs/contributing/building-photon.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,6 @@ In the photon-client directory:
pnpm install
```

### Build and Copy UI to Java Source

In the root directory:

```{eval-rst}
.. tab-set::

.. tab-item:: Linux

``./gradlew buildAndCopyUI``

.. tab-item:: macOS

``./gradlew buildAndCopyUI``

.. tab-item:: Windows (cmd)

``gradlew buildAndCopyUI``
```

### Using hot reload on the UI

In the photon-client directory:
Expand Down
8 changes: 8 additions & 0 deletions photon-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jar {
}

shadowJar {
dependsOn 'buildAndCopyUI'

archiveBaseName = "photonvision"
archiveVersion = project.version as String
archiveClassifier.set(wpilibTools.currentPlatform.platformName)
Expand All @@ -44,6 +46,8 @@ tasks.register('copyClientUIToResources', Copy) {
}

tasks.register('buildClient', PnpmTask) {
inputs.dir fileTree(dir: "${projectDir}/../photon-client", exclude: "dist/")
outputs.dir file("${projectDir}/../photon-client/dist")
args = ["build"]
dependsOn "pnpmInstall"
}
Expand All @@ -53,6 +57,10 @@ tasks.register('buildAndCopyUI') {
finalizedBy "copyClientUIToResources"
}

processResources {
dependsOn copyClientUIToResources
}

run {
environment "PATH_PREFIX", "../"

Expand Down
1 change: 0 additions & 1 deletion photon-server/src/main/resources/web/index.html

This file was deleted.

Loading