Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream' into coordinate-conversion-cl…
Browse files Browse the repository at this point in the history
…eanup
  • Loading branch information
mcm001 committed Oct 15, 2023
2 parents 0244feb + 760de0f commit 4cbe18c
Show file tree
Hide file tree
Showing 330 changed files with 16,774 additions and 22,751 deletions.
59 changes: 38 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ on:
merge_group:

jobs:
# This job builds the client (web view).
photonclient-build:

# Let all steps run within the photon-client dir.
defaults:
run:
Expand All @@ -33,19 +31,47 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 17

# Run npm
- run: npm update -g npm
- run: npm ci
- run: npm run build --if-present
- name: Install Dependencies
run: npm ci

- name: Build Production Client
run: npm run build

# Upload client artifact.
- uses: actions/upload-artifact@master
with:
name: built-client
path: photon-client/dist/
photonclient-check-lint:
# Let all steps run within the photon-client dir.
defaults:
run:
working-directory: photon-client

# The type of runner that the job will run on.
runs-on: ubuntu-22.04

steps:
# Checkout code.
- uses: actions/checkout@v3

# Setup Node.js
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 17

- name: Install Dependencies
run: npm ci

- name: Check Linting
run: npm run lint-ci

- name: Check Formatting
run: npm run format-ci
photon-build-examples:
runs-on: ubuntu-22.04
name: "Build Examples"
Expand Down Expand Up @@ -80,15 +106,14 @@ jobs:
run: |
chmod +x gradlew
./gradlew copyPhotonlib -x check
./gradlew buildAllExamples -x check --max-workers 2
./gradlew build -x check --max-workers 2
- name: Build C++ examples
working-directory: photonlib-cpp-examples
run: |
chmod +x gradlew
./gradlew copyPhotonlib -x check
./gradlew buildAllExamples -x check --max-workers 2
./gradlew build -x check --max-workers 2
photon-build-all:
# The type of runner that the job will run on.
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -135,7 +160,6 @@ jobs:
uses: codecov/codecov-action@v3
with:
file: ./photon-core/build/reports/jacoco/test/jacocoTestReport.xml

photonserver-build-offline-docs:
runs-on: ubuntu-22.04

Expand Down Expand Up @@ -172,7 +196,6 @@ jobs:
with:
name: built-docs
path: build/html

photonserver-check-lint:
# The type of runner that the job will run on.
runs-on: ubuntu-22.04
Expand All @@ -193,8 +216,6 @@ jobs:
- run: |
chmod +x gradlew
./gradlew spotlessCheck
# Building photonlib
photonlib-build-host:
env:
MACOSX_DEPLOYMENT_TARGET: 10.14
Expand All @@ -204,6 +225,7 @@ jobs:
include:
- os: windows-2022
artifact-name: Win64
architecture: x64
# Mac builds are broken due to opencv class loading issues -- disable for now
# - os: macos-11
# artifact-name: macOS
Expand All @@ -229,13 +251,12 @@ jobs:
env:
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
if: github.event_name == 'push'

photonlib-build-docker:
strategy:
fail-fast: false
matrix:
include:
- container: wpilib/roborio-cross-ubuntu:2023-22.04
- container: wpilib/roborio-cross-ubuntu:2024-22.04
artifact-name: Athena
- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04
artifact-name: Raspbian
Expand Down Expand Up @@ -263,7 +284,6 @@ jobs:
env:
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
if: github.event_name == 'push'

photonlib-wpiformat:
name: "wpiformat"
runs-on: ubuntu-22.04
Expand All @@ -280,6 +300,8 @@ jobs:
python-version: 3.8
- name: Install wpiformat
run: pip3 install wpiformat
- name: Check index.html not changed
run: git --no-pager diff --exit-code origin/master photon-server/src/main/resources/web/index.html
- name: Run
run: wpiformat
- name: Check output
Expand All @@ -292,7 +314,6 @@ jobs:
name: wpiformat fixes
path: wpiformat-fixes.patch
if: ${{ failure() }}

photon-build-package:
needs: [photonclient-build, photon-build-all, photonserver-build-offline-docs]

Expand Down Expand Up @@ -378,8 +399,6 @@ jobs:
with:
name: jar-${{ matrix.artifact-name }}
path: photon-server/build/libs


photon-image-generator:
needs: [photon-build-package]
if: ${{ github.event_name != 'pull_request' }}
Expand Down Expand Up @@ -420,8 +439,6 @@ jobs:
with:
name: image-${{ matrix.image_suffix }}
path: photonvision*.xz


photon-release:
needs: [photon-build-package, photon-image-generator]
runs-on: ubuntu-22.04
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,4 @@ photonlib-cpp-examples/*/vendordeps/*

*/networktables.json
*.sqlite
photon-server/src/main/resources/web/index.html
1 change: 1 addition & 0 deletions .styleguide
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ modifiableFileExclude {
\.so$
\.dll$
\.webp$
\.ico$
gradlew
}

Expand Down
23 changes: 0 additions & 23 deletions LICENSE_MathUtils_orthogonalizeRotationMatrix.txt

This file was deleted.

19 changes: 13 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ plugins {
id "com.diffplug.spotless" version "6.19.0"
id "com.github.johnrengelman.shadow" version "7.1.2"
id "com.github.node-gradle.node" version "3.1.1" apply false
id "edu.wpi.first.GradleJni" version "1.0.0"
id "edu.wpi.first.GradleVsCode" version "1.1.0"
id "edu.wpi.first.NativeUtils" version "2024.1.0" apply false
id "edu.wpi.first.GradleJni" version "1.1.0"
id "edu.wpi.first.GradleVsCode" version "1.3.0"
id "edu.wpi.first.NativeUtils" version "2024.2.0" apply false
id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2020.2"
id "org.hidetake.ssh" version "2.10.1"
id 'edu.wpi.first.WpilibTools' version '1.0.0'
id 'edu.wpi.first.WpilibTools' version '1.1.0'
}

import org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency;
Expand All @@ -26,9 +26,12 @@ allprojects {
apply from: "versioningHelper.gradle"

ext {
wpilibVersion = "2024.0.0-alpha-1"
opencvVersion = "4.6.0-4"
wpilibVersion = "2024.1.1-beta-1"
openCVversion = "4.8.0-1"
joglVersion = "2.4.0-rc-20200307"
javalinVersion = "5.6.2"
frcYear = "2024"

pubVersion = versionString
isDev = pubVersion.startsWith("dev")

Expand Down Expand Up @@ -60,3 +63,7 @@ spotless {
targetExclude("photon-lib/src/main/java/org/photonvision/PhotonVersion.java")
}
}

wrapper {
gradleVersion '8.3'
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services\.gradle\.org/distributions/gradle-8\.3-bin\.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 2 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

APP_NAME="Gradle"
APP_BASE_NAME=${0##*/}
Expand Down
2 changes: 0 additions & 2 deletions photon-client/.browserslistrc

This file was deleted.

17 changes: 0 additions & 17 deletions photon-client/.eslintrc.js

This file was deleted.

20 changes: 20 additions & 0 deletions photon-client/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"root": true,
"extends": [
"plugin:vue/vue3-recommended",
"eslint:recommended",
"@vue/eslint-config-typescript",
"@vue/eslint-config-prettier/skip-formatting"
],
"rules": {
"quotes": ["error", "double"],
"comma-dangle": ["error", "never"],
"comma-spacing": ["error", { "before": false, "after": true }],
"semi": ["error", "always"],
"eol-last": "error",
"object-curly-spacing": ["error", "always"],
"quote-props": ["error", "as-needed"],
"no-case-declarations": "off",
"vue/require-default-prop": "off"
}
}
27 changes: 17 additions & 10 deletions photon-client/.gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
.DS_Store
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.idea
.vscode
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
components.d.ts
1 change: 1 addition & 0 deletions photon-client/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/assets/fonts/PromptRegular.ts
8 changes: 8 additions & 0 deletions photon-client/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": true,
"tabWidth": 2,
"singleQuote": false,
"printWidth": 120,
"trailingComma": "none"
}
37 changes: 0 additions & 37 deletions photon-client/README.md

This file was deleted.

Loading

0 comments on commit 4cbe18c

Please sign in to comment.