Skip to content

Commit fb96d9a

Browse files
committed
Initial Commit
0 parents  commit fb96d9a

24 files changed

+1863
-0
lines changed

.github/workflows/build.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
name: Build
10+
runs-on: ubuntu-latest
11+
container: wpilib/roborio-cross-ubuntu
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
- name: Grant execute permission
16+
run: chmod +x gradlew
17+
- name: Build robot code
18+
run: ./gradlew build

.github/workflows/lint-format.yml

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Lint and Format
2+
3+
on:
4+
push:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
validation:
12+
name: "Validation"
13+
runs-on: ubuntu-22.04
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: gradle/actions/wrapper-validation@v4
17+
18+
wpiformat:
19+
name: "wpiformat"
20+
runs-on: ubuntu-22.04
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
- name: Fetch all history and metadata
26+
run: |
27+
git checkout -b pr
28+
git branch -f main origin/main
29+
- name: Set up Python 3.12
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.12'
33+
- name: Install wpiformat
34+
run: |
35+
python -m venv ${{ runner.temp }}/wpiformat
36+
${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2024.51
37+
- name: Run
38+
run: ${{ runner.temp }}/wpiformat/bin/wpiformat
39+
- name: Check output
40+
run: git --no-pager diff --exit-code HEAD
41+
- name: Generate diff
42+
run: git diff HEAD > wpiformat-fixes.patch
43+
if: ${{ failure() }}
44+
- uses: actions/upload-artifact@v4
45+
with:
46+
name: wpiformat fixes
47+
path: wpiformat-fixes.patch
48+
if: ${{ failure() }}
49+
- name: Write to job summary
50+
run: |
51+
echo '```diff' >> $GITHUB_STEP_SUMMARY
52+
cat wpiformat-fixes.patch >> $GITHUB_STEP_SUMMARY
53+
echo '' >> $GITHUB_STEP_SUMMARY
54+
echo '```' >> $GITHUB_STEP_SUMMARY
55+
if: ${{ failure() }}
56+
57+
javaformat:
58+
name: "Java format"
59+
runs-on: ubuntu-22.04
60+
needs: [validation]
61+
container: wpilib/ubuntu-base:22.04
62+
steps:
63+
- uses: actions/checkout@v4
64+
with:
65+
fetch-depth: 0
66+
- name: Fetch all history and metadata
67+
run: |
68+
git config --global --add safe.directory $GITHUB_WORKSPACE
69+
- name: Grant execute permission
70+
run: chmod +x gradlew
71+
- name: Check Java format
72+
run: ./gradlew spotlessApply
73+
- name: Check output
74+
run: git --no-pager diff --exit-code HEAD
75+
- name: Generate diff
76+
run: git diff HEAD > javaformat-fixes.patch
77+
if: ${{ failure() }}
78+
- uses: actions/upload-artifact@v4
79+
with:
80+
name: javaformat fixes
81+
path: javaformat-fixes.patch
82+
if: ${{ failure() }}
83+
- name: Write to job summary
84+
run: |
85+
echo '```diff' >> $GITHUB_STEP_SUMMARY
86+
cat javaformat-fixes.patch >> $GITHUB_STEP_SUMMARY
87+
echo '' >> $GITHUB_STEP_SUMMARY
88+
echo '```' >> $GITHUB_STEP_SUMMARY
89+
if: ${{ failure() }}

.gitignore

+187
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
# This gitignore has been specially created by the WPILib team.
2+
# If you remove items from this file, intellisense might break.
3+
4+
### C++ ###
5+
# Prerequisites
6+
*.d
7+
8+
# Compiled Object files
9+
*.slo
10+
*.lo
11+
*.o
12+
*.obj
13+
14+
# Precompiled Headers
15+
*.gch
16+
*.pch
17+
18+
# Compiled Dynamic libraries
19+
*.so
20+
*.dylib
21+
*.dll
22+
23+
# Fortran module files
24+
*.mod
25+
*.smod
26+
27+
# Compiled Static libraries
28+
*.lai
29+
*.la
30+
*.a
31+
*.lib
32+
33+
# Executables
34+
*.exe
35+
*.out
36+
*.app
37+
38+
### Java ###
39+
# Compiled class file
40+
*.class
41+
42+
# Log file
43+
*.log
44+
45+
# BlueJ files
46+
*.ctxt
47+
48+
# Mobile Tools for Java (J2ME)
49+
.mtj.tmp/
50+
51+
# Package Files #
52+
*.jar
53+
*.war
54+
*.nar
55+
*.ear
56+
*.zip
57+
*.tar.gz
58+
*.rar
59+
60+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
61+
hs_err_pid*
62+
63+
### Linux ###
64+
*~
65+
66+
# temporary files which can be created if a process still has a handle open of a deleted file
67+
.fuse_hidden*
68+
69+
# KDE directory preferences
70+
.directory
71+
72+
# Linux trash folder which might appear on any partition or disk
73+
.Trash-*
74+
75+
# .nfs files are created when an open file is removed but is still being accessed
76+
.nfs*
77+
78+
### macOS ###
79+
# General
80+
.DS_Store
81+
.AppleDouble
82+
.LSOverride
83+
84+
# Icon must end with two \r
85+
Icon
86+
87+
# Thumbnails
88+
._*
89+
90+
# Files that might appear in the root of a volume
91+
.DocumentRevisions-V100
92+
.fseventsd
93+
.Spotlight-V100
94+
.TemporaryItems
95+
.Trashes
96+
.VolumeIcon.icns
97+
.com.apple.timemachine.donotpresent
98+
99+
# Directories potentially created on remote AFP share
100+
.AppleDB
101+
.AppleDesktop
102+
Network Trash Folder
103+
Temporary Items
104+
.apdisk
105+
106+
### VisualStudioCode ###
107+
.vscode/*
108+
!.vscode/settings.json
109+
!.vscode/tasks.json
110+
!.vscode/launch.json
111+
!.vscode/extensions.json
112+
113+
### Windows ###
114+
# Windows thumbnail cache files
115+
Thumbs.db
116+
ehthumbs.db
117+
ehthumbs_vista.db
118+
119+
# Dump file
120+
*.stackdump
121+
122+
# Folder config file
123+
[Dd]esktop.ini
124+
125+
# Recycle Bin used on file shares
126+
$RECYCLE.BIN/
127+
128+
# Windows Installer files
129+
*.cab
130+
*.msi
131+
*.msix
132+
*.msm
133+
*.msp
134+
135+
# Windows shortcuts
136+
*.lnk
137+
138+
### Gradle ###
139+
.gradle
140+
/build/
141+
142+
# Ignore Gradle GUI config
143+
gradle-app.setting
144+
145+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
146+
!gradle-wrapper.jar
147+
148+
# Cache of project
149+
.gradletasknamecache
150+
151+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
152+
# gradle/wrapper/gradle-wrapper.properties
153+
154+
# # VS Code Specific Java Settings
155+
# DO NOT REMOVE .classpath and .project
156+
.classpath
157+
.project
158+
.settings/
159+
bin/
160+
161+
# IntelliJ
162+
*.iml
163+
*.ipr
164+
*.iws
165+
.idea/
166+
out/
167+
168+
# Fleet
169+
.fleet
170+
171+
# Simulation GUI and other tools window save file
172+
networktables.json
173+
simgui*.json
174+
*-window.json
175+
176+
# Simulation data log directory
177+
logs/
178+
179+
# Folder that has CTRE Phoenix Sim device config storage
180+
ctre_sim/
181+
182+
# clangd
183+
/.cache
184+
compile_commands.json
185+
186+
# Version file
187+
src/main/java/frc/generated/BuildConstants.java

.vscode/extensions.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"richardwillis.vscode-spotless-gradle"
4+
]
5+
}

.vscode/launch.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "wpilib",
6+
"name": "WPILib Desktop Debug",
7+
"request": "launch",
8+
"desktop": true
9+
},
10+
{
11+
"type": "wpilib",
12+
"name": "WPILib roboRIO Debug",
13+
"request": "launch",
14+
"desktop": false
15+
}
16+
]
17+
}

.vscode/settings.json

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"java.configuration.updateBuildConfiguration": "automatic",
3+
"java.server.launchMode": "Standard",
4+
"files.exclude": {
5+
"**/.git": true,
6+
"**/.svn": true,
7+
"**/.hg": true,
8+
"**/CVS": true,
9+
"**/.DS_Store": true,
10+
"bin/": true,
11+
"**/.classpath": true,
12+
"**/.project": true,
13+
"**/.settings": true,
14+
"**/.factorypath": true,
15+
"**/*~": true
16+
},
17+
"java.test.config": [
18+
{
19+
"name": "WPIlibUnitTests",
20+
"workingDirectory": "${workspaceFolder}/build/jni/release",
21+
"vmargs": [
22+
"-Djava.library.path=${workspaceFolder}/build/jni/release"
23+
],
24+
"env": {
25+
"LD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release",
26+
"DYLD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release"
27+
}
28+
},
29+
null
30+
],
31+
"java.test.defaultConfig": "WPIlibUnitTests",
32+
"spotlessGradle.format.enable": true,
33+
"spotlessGradle.diagnostics.enable": false,
34+
"java.import.gradle.annotationProcessing.enabled": false,
35+
"java.completion.favoriteStaticMembers": [
36+
"org.junit.Assert.*",
37+
"org.junit.Assume.*",
38+
"org.junit.jupiter.api.Assertions.*",
39+
"org.junit.jupiter.api.Assumptions.*",
40+
"org.junit.jupiter.api.DynamicContainer.*",
41+
"org.junit.jupiter.api.DynamicTest.*",
42+
"org.mockito.Mockito.*",
43+
"org.mockito.ArgumentMatchers.*",
44+
"org.mockito.Answers.*",
45+
"edu.wpi.first.units.Units.*"
46+
],
47+
"java.completion.filteredTypes": [
48+
"java.awt.*",
49+
"com.sun.*",
50+
"sun.*",
51+
"jdk.*",
52+
"org.graalvm.*",
53+
"io.micrometer.shaded.*",
54+
"java.beans.*",
55+
"java.util.Base64.*",
56+
"java.util.Timer",
57+
"java.sql.*",
58+
"javax.swing.*",
59+
"javax.management.*",
60+
"javax.smartcardio.*",
61+
"edu.wpi.first.math.proto.*",
62+
"edu.wpi.first.math.**.proto.*",
63+
"edu.wpi.first.math.**.struct.*"
64+
],
65+
"editor.defaultFormatter": "richardwillis.vscode-spotless-gradle",
66+
"[json]": {
67+
"editor.defaultFormatter": "richardwillis.vscode-spotless-gradle"
68+
},
69+
"[java]": {
70+
"editor.defaultFormatter": "richardwillis.vscode-spotless-gradle"
71+
}
72+
}

0 commit comments

Comments
 (0)