Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bryceroethel committed Oct 16, 2024
1 parent 28fa607 commit 49449b6
Show file tree
Hide file tree
Showing 165 changed files with 9,860 additions and 10,269 deletions.
111 changes: 99 additions & 12 deletions .github/workflows/dashboard.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Dashboard
on: [pull_request, push]

env:
NODE_VERSION: 20

jobs:
format:
name: Format
name: Check Format
runs-on: ubuntu-latest

steps:
Expand All @@ -15,7 +18,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/

- name: Install Node Modules
Expand All @@ -27,13 +30,34 @@ jobs:
working-directory: dashboard

build:
name: Build
env:
MACOSX_DEPLOYMENT_TARGET: 13.3

strategy:
fail-fast: false
matrix:
node: [20]
platform: [windows-latest, macos-latest, ubuntu-latest]
include:
- artifact: Windows-x86_64
platform: windows-2022
build-flags: --target=x86_64-pc-windows-msvc

- artifact: Windows-arm64
platform: windows-2022
build-flags: --target=aarch64-pc-windows-msvc

- artifact: macOS-x86_64
platform: macOS-14
build-flags: --target=x86_64-apple-darwin

- artifact: macOS-arm64
platform: macOS-14
build-flags: --target=aarch64-apple-darwin

- artifact: Linux-x86_64
platform: ubuntu-22.04
build-flags: --target=x86_64-unknown-linux-gnu

name: "Build ${{ matrix.artifact }}"
runs-on: ${{ matrix.platform }}

steps:
Expand All @@ -45,22 +69,85 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Install System Dependencies (Ubuntu Only)
if: matrix.platform == 'ubuntu-latest'
if: startsWith(matrix.platform, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
sudo apt-get update -q
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- name: Install Node Modules
run: npm i --include=dev
working-directory: dashboard

- name: Run Build
run: npm run build:tauri
working-directory: dashboard
- name: Install Windows aarch64 Rust compiler (Windows-arm64 Only)
if: matrix.artifact == 'Windows-arm64'
run: rustup target install aarch64-pc-windows-msvc

- name: Install macOS x86_64 Rust compiler (macOS-x86_64 Only)
if: matrix.artifact == 'macOS-x86_64'
run: rustup target add x86_64-apple-darwin

- name: Setup Xcode (macOS Only)
if: startsWith(matrix.platform, 'macOS')
run: sudo xcode-select -switch /Applications/Xcode_15.3.app

- name: Run Tauri Build
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: dashboard
args: ${{ matrix.build-flags }}

- name: Upload bundle (Windows-x86_54)
if: matrix.artifact == 'Windows-x86_64'
uses: actions/upload-artifact@v4
with:
name: GRRDashboard-${{ matrix.artifact }}
path: dashboard/src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe

- name: Upload bundle (Windows-arm64)
if: matrix.artifact == 'Windows-arm64'
uses: actions/upload-artifact@v4
with:
name: GRRDashboard-${{ matrix.artifact }}
path: dashboard/src-tauri/target/aarch64-pc-windows-msvc/release/bundle/nsis/*.exe

- name: Upload bundle (macOS-x86_64)
if: matrix.artifact == 'macOS-x86_64'
uses: actions/upload-artifact@v4
with:
name: GRRDashboard-${{ matrix.artifact }}
path: dashboard/src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg

- name: Upload bundle (macOS-arm64)
if: matrix.artifact == 'macOS-arm64'
uses: actions/upload-artifact@v4
with:
name: GRRDashboard-${{ matrix.artifact }}
path: dashboard/src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg

- name: Upload bundle (Linux-x86_64)
if: matrix.artifact == 'Linux-x86_64'
uses: actions/upload-artifact@v4
with:
name: GRRDashboard-${{ matrix.artifact }}
path: |
dashboard/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage
dashboard/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb
dashboard/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/rpm/*.rpm
9 changes: 6 additions & 3 deletions .github/workflows/robot-code.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Robot Code
on: [pull_request, push]

env:
NODE_VERSION: 20

jobs:
format:
name: Format
name: Check Format
runs-on: ubuntu-latest
container: wpilib/ubuntu-base:22.04

Expand All @@ -19,7 +22,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/

- name: Grant execute permission for gradlew
Expand All @@ -45,7 +48,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/

- name: Grant execute permission for gradlew
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@ logs/
ctre_sim/

# Dashboard
dashboard/dist/
dashboard/build/
dashboard/node_modules/
dashboard/src-tauri/target/
dashboard/src-tauri/gen/schemas/
dashboard/src-tauri/Cargo.lock
dashboard/package-lock.json
3 changes: 1 addition & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"vscjava.vscode-java-test",
"wpilibsuite.vscode-wpilib",
"asciidoctor.asciidoctor-vscode",
"eamodio.gitlens",
"GitHub.vscode-pull-request-github"
"tauri-apps.tauri-vscode"
]
}
55 changes: 35 additions & 20 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
{
"java.configuration.updateBuildConfiguration": "automatic",
"java.debug.settings.onBuildFailureProceed": true,
"java.inlayHints.parameterNames.enabled": "literals",
"java.inlayHints.parameterNames.exclusions": [
"edu.wpi.first.math.util.Units.*",
"(key, value)",
"(initialValue)",
"(magnitude)",
"(value)"
],
"java.server.launchMode": "Standard",
"java.test.config": [
{
"name": "WPIlibUnitTests",
"workingDirectory": "${workspaceFolder}/build/jni/release",
"vmargs": [ "-Djava.library.path=${workspaceFolder}/build/jni/release" ],
"env": {
"LD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release" ,
"DYLD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release"
}
},
],
"java.test.defaultConfig": "WPIlibUnitTests",
"svelte.enable-ts-plugin": true,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
Expand All @@ -15,61 +36,52 @@
"**/.factorypath": true,
"**/*~": true
},
"java.test.config": [
{
"name": "WPIlibUnitTests",
"workingDirectory": "${workspaceFolder}/build/jni/release",
"vmargs": [ "-Djava.library.path=${workspaceFolder}/build/jni/release" ],
"env": {
"LD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release" ,
"DYLD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release"
}
},
],
"java.test.defaultConfig": "WPIlibUnitTests",
"cSpell.words": [
"Accl",
"Accum",
"ADIS",
"Bezier",
"Botpose",
"Blacklight",
"Blacklights",
"Brushless",
"CANandCoder",
"Canbus",
"CANcoder",
"Checkstyle",
"Choreo",
"ChoreoLib",
"Cnfg",
"CTRE",
"Deadband",
"Deadbands",
"Deadzone",
"Decel",
"DeltAng",
"DeltVel",
"Desaturate",
"Desaturated",
"Desaturating",
"Desaturation",
"Devs",
"Discretization",
"Discretize",
"Dont",
"Discretizing",
"DTheta",
"Falsi",
"Feedforward",
"Fullscreen",
"Gradlew",
"Grav",
"GRRDashboard",
"GSON",
"Holonomic",
"Intaking",
"Integ",
"Interp",
"Interpolatable",
"Itor",
"JoystickProfiles",
"Keepalive",
"Lerp",
"Motorcontrol",
"Msgpack",
"Mult",
"NetworkTables",
"NTURI",
"Odometry",
Expand All @@ -79,6 +91,8 @@
"Protobuf",
"Pubuid",
"Quasistatic",
"Ratelimit",
"Ratelimited",
"Ratelimiter",
"Ratelimits",
"Regula",
Expand All @@ -87,21 +101,22 @@
"RoboRIO",
"Sendables",
"Setpoint",
"setpoints",
"Subuid",
"TalonFX",
"TalonSRX",
"Tauri",
"Teleop",
"Timesync",
"Topicsonly",
"Traj",
"Trajs",
"Tunables",
"Unannounce",
"Unsub",
"Unsubscriber",
"Unsubscribers",
"URCL",
"Vbat",
"Vmax",
"WPIBlue",
"WPILib",
"WPILibJ",
Expand Down
Loading

0 comments on commit 49449b6

Please sign in to comment.