From 0011c7df873a29625a5cd36a389ecc9ba2c63694 Mon Sep 17 00:00:00 2001 From: jfabellera Date: Tue, 9 Jan 2024 14:56:57 -0600 Subject: [PATCH] Add build CI --- .github/workflows/build.yml | 76 ++++++++++++++++++ .../.gitignore | 0 .../.vscode/launch.json | 0 .../.vscode/settings.json | 0 .../.wpilib/wpilib_preferences.json | 0 .../README.md | 0 .../WPILib-License.md | 0 .../build.gradle | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradlew | 0 .../gradlew.bat | 0 .../settings.gradle | 0 .../src/main/cpp/Robot.cpp | 0 .../src/main/deploy/example.txt | 0 .../src/test/cpp/main.cpp | 0 .../vendordeps/REVLib.json | 0 .../vendordeps/WPILibNewCommands.json | 0 .../.gitignore | 0 .../.vscode/launch.json | 0 .../.vscode/settings.json | 0 .../.wpilib/wpilib_preferences.json | 0 .../README.md | 0 .../WPILib-License.md | 0 .../build.gradle | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradlew | 0 .../gradlew.bat | 0 .../settings.gradle | 0 .../src/main/cpp/Robot.cpp | 0 .../src/main/deploy/example.txt | 0 .../src/test/cpp/main.cpp | 0 .../vendordeps/REVLib.json | 0 .../vendordeps/WPILibNewCommands.json | 0 35 files changed, 76 insertions(+) create mode 100644 .github/workflows/build.yml rename C++/{Position PID Control => Position Closed Loop Control}/.gitignore (100%) rename C++/{Position PID Control => Position Closed Loop Control}/.vscode/launch.json (100%) rename C++/{Position PID Control => Position Closed Loop Control}/.vscode/settings.json (100%) rename C++/{Position PID Control => Position Closed Loop Control}/.wpilib/wpilib_preferences.json (100%) rename C++/{Position PID Control => Position Closed Loop Control}/README.md (100%) rename C++/{Position PID Control => Position Closed Loop Control}/WPILib-License.md (100%) rename C++/{Position PID Control => Position Closed Loop Control}/build.gradle (100%) rename C++/{Position PID Control => Position Closed Loop Control}/gradle/wrapper/gradle-wrapper.jar (100%) rename C++/{Position PID Control => Position Closed Loop Control}/gradle/wrapper/gradle-wrapper.properties (100%) rename C++/{Position PID Control => Position Closed Loop Control}/gradlew (100%) rename C++/{Position PID Control => Position Closed Loop Control}/gradlew.bat (100%) rename C++/{Position PID Control => Position Closed Loop Control}/settings.gradle (100%) rename C++/{Position PID Control => Position Closed Loop Control}/src/main/cpp/Robot.cpp (100%) rename C++/{Position PID Control => Position Closed Loop Control}/src/main/deploy/example.txt (100%) rename C++/{Position PID Control => Position Closed Loop Control}/src/test/cpp/main.cpp (100%) rename C++/{Position PID Control => Position Closed Loop Control}/vendordeps/REVLib.json (100%) rename C++/{Position PID Control => Position Closed Loop Control}/vendordeps/WPILibNewCommands.json (100%) rename C++/{Velocity PID Control => Velocity Closed Loop Control}/.gitignore (100%) rename C++/{Velocity PID Control => Velocity Closed Loop Control}/.vscode/launch.json (100%) rename C++/{Velocity PID Control => Velocity Closed Loop Control}/.vscode/settings.json (100%) rename C++/{Velocity PID Control => Velocity Closed Loop Control}/.wpilib/wpilib_preferences.json (100%) rename C++/{Velocity PID Control => Velocity Closed Loop Control}/README.md (100%) rename C++/{Velocity PID Control => Velocity Closed Loop Control}/WPILib-License.md (100%) rename C++/{Velocity PID Control => Velocity Closed Loop Control}/build.gradle (100%) rename C++/{Velocity PID Control => Velocity Closed Loop Control}/gradle/wrapper/gradle-wrapper.jar (100%) rename C++/{Velocity PID Control => Velocity Closed Loop Control}/gradle/wrapper/gradle-wrapper.properties (100%) rename C++/{Velocity PID Control => Velocity Closed Loop Control}/gradlew (100%) rename C++/{Velocity PID Control => Velocity Closed Loop Control}/gradlew.bat (100%) rename C++/{Velocity PID Control => Velocity Closed Loop Control}/settings.gradle (100%) rename C++/{Velocity PID Control => Velocity Closed Loop Control}/src/main/cpp/Robot.cpp (100%) rename C++/{Velocity PID Control => Velocity Closed Loop Control}/src/main/deploy/example.txt (100%) rename C++/{Velocity PID Control => Velocity Closed Loop Control}/src/test/cpp/main.cpp (100%) rename C++/{Velocity PID Control => Velocity Closed Loop Control}/vendordeps/REVLib.json (100%) rename C++/{Velocity PID Control => Velocity Closed Loop Control}/vendordeps/WPILibNewCommands.json (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..8b1f3a5 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,76 @@ +name: Build + +on: + push: + branches: + - 'master' + tags-ignore: + - '*' + pull_request: + branches: + - '*' + +defaults: + run: + shell: bash + +jobs: + build: + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + language: [Java, C++] + example: [ + Alternate Encoder, + Analog Feedback Device, + Arcade Drive With CAN, + Arcade Drive with PWM, + Bus Measurements, + Encoder Feedback Device, + Get and Set Parameters, + Limit Switch, + Motor Follower, + Position Closed Loop Control, + Read Encoder Values, + Smart Motion Example, + Soft Limits, + Tank Drive With CAN, + Velocity Closed Loop Control, + ] + include: + - example: Arcade Drive With CAN + skip-java: true + - example: Arcade Drive with PWM + skip-java: true + - example: Motor Follower + skip-cpp: true + - example: Tank Drive With CAN + skip-cpp: true + name: Build ${{ matrix.example }} - ${{ matrix.language }} + runs-on: ubuntu-latest + container: wpilib/roborio-cross-ubuntu:2024-22.04 + steps: + - name: Checkout + if: (matrix.language == 'Java' && !matrix.skip-java) || (matrix.language == 'C++' && !matrix.skip-cpp) + uses: actions/checkout@v3 + + - name: Cache + if: (matrix.language == 'Java' && !matrix.skip-java) || (matrix.language == 'C++' && !matrix.skip-cpp) + uses: actions/cache@v3 + with: + path: | + ${{ matrix.language }}/${{ matrix.example }}/.gradle + ${{ matrix.language }}/${{ matrix.example }}/bin + ${{ matrix.language }}/${{ matrix.example }}/build + key: ${{ matrix.example }}-${{ matrix.language }}-build-${{ github.sha }} + restore-keys: | + ${{ matrix.example }}-${{ matrix.language }}-build- + + - name: Build + if: (matrix.language == 'Java' && !matrix.skip-java) || (matrix.language == 'C++' && !matrix.skip-cpp) + run: | + cd "${{ matrix.language }}" + cd "${{ matrix.example }}" + chmod +x gradlew + ./gradlew build diff --git a/C++/Position PID Control/.gitignore b/C++/Position Closed Loop Control/.gitignore similarity index 100% rename from C++/Position PID Control/.gitignore rename to C++/Position Closed Loop Control/.gitignore diff --git a/C++/Position PID Control/.vscode/launch.json b/C++/Position Closed Loop Control/.vscode/launch.json similarity index 100% rename from C++/Position PID Control/.vscode/launch.json rename to C++/Position Closed Loop Control/.vscode/launch.json diff --git a/C++/Position PID Control/.vscode/settings.json b/C++/Position Closed Loop Control/.vscode/settings.json similarity index 100% rename from C++/Position PID Control/.vscode/settings.json rename to C++/Position Closed Loop Control/.vscode/settings.json diff --git a/C++/Position PID Control/.wpilib/wpilib_preferences.json b/C++/Position Closed Loop Control/.wpilib/wpilib_preferences.json similarity index 100% rename from C++/Position PID Control/.wpilib/wpilib_preferences.json rename to C++/Position Closed Loop Control/.wpilib/wpilib_preferences.json diff --git a/C++/Position PID Control/README.md b/C++/Position Closed Loop Control/README.md similarity index 100% rename from C++/Position PID Control/README.md rename to C++/Position Closed Loop Control/README.md diff --git a/C++/Position PID Control/WPILib-License.md b/C++/Position Closed Loop Control/WPILib-License.md similarity index 100% rename from C++/Position PID Control/WPILib-License.md rename to C++/Position Closed Loop Control/WPILib-License.md diff --git a/C++/Position PID Control/build.gradle b/C++/Position Closed Loop Control/build.gradle similarity index 100% rename from C++/Position PID Control/build.gradle rename to C++/Position Closed Loop Control/build.gradle diff --git a/C++/Position PID Control/gradle/wrapper/gradle-wrapper.jar b/C++/Position Closed Loop Control/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from C++/Position PID Control/gradle/wrapper/gradle-wrapper.jar rename to C++/Position Closed Loop Control/gradle/wrapper/gradle-wrapper.jar diff --git a/C++/Position PID Control/gradle/wrapper/gradle-wrapper.properties b/C++/Position Closed Loop Control/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from C++/Position PID Control/gradle/wrapper/gradle-wrapper.properties rename to C++/Position Closed Loop Control/gradle/wrapper/gradle-wrapper.properties diff --git a/C++/Position PID Control/gradlew b/C++/Position Closed Loop Control/gradlew similarity index 100% rename from C++/Position PID Control/gradlew rename to C++/Position Closed Loop Control/gradlew diff --git a/C++/Position PID Control/gradlew.bat b/C++/Position Closed Loop Control/gradlew.bat similarity index 100% rename from C++/Position PID Control/gradlew.bat rename to C++/Position Closed Loop Control/gradlew.bat diff --git a/C++/Position PID Control/settings.gradle b/C++/Position Closed Loop Control/settings.gradle similarity index 100% rename from C++/Position PID Control/settings.gradle rename to C++/Position Closed Loop Control/settings.gradle diff --git a/C++/Position PID Control/src/main/cpp/Robot.cpp b/C++/Position Closed Loop Control/src/main/cpp/Robot.cpp similarity index 100% rename from C++/Position PID Control/src/main/cpp/Robot.cpp rename to C++/Position Closed Loop Control/src/main/cpp/Robot.cpp diff --git a/C++/Position PID Control/src/main/deploy/example.txt b/C++/Position Closed Loop Control/src/main/deploy/example.txt similarity index 100% rename from C++/Position PID Control/src/main/deploy/example.txt rename to C++/Position Closed Loop Control/src/main/deploy/example.txt diff --git a/C++/Position PID Control/src/test/cpp/main.cpp b/C++/Position Closed Loop Control/src/test/cpp/main.cpp similarity index 100% rename from C++/Position PID Control/src/test/cpp/main.cpp rename to C++/Position Closed Loop Control/src/test/cpp/main.cpp diff --git a/C++/Position PID Control/vendordeps/REVLib.json b/C++/Position Closed Loop Control/vendordeps/REVLib.json similarity index 100% rename from C++/Position PID Control/vendordeps/REVLib.json rename to C++/Position Closed Loop Control/vendordeps/REVLib.json diff --git a/C++/Position PID Control/vendordeps/WPILibNewCommands.json b/C++/Position Closed Loop Control/vendordeps/WPILibNewCommands.json similarity index 100% rename from C++/Position PID Control/vendordeps/WPILibNewCommands.json rename to C++/Position Closed Loop Control/vendordeps/WPILibNewCommands.json diff --git a/C++/Velocity PID Control/.gitignore b/C++/Velocity Closed Loop Control/.gitignore similarity index 100% rename from C++/Velocity PID Control/.gitignore rename to C++/Velocity Closed Loop Control/.gitignore diff --git a/C++/Velocity PID Control/.vscode/launch.json b/C++/Velocity Closed Loop Control/.vscode/launch.json similarity index 100% rename from C++/Velocity PID Control/.vscode/launch.json rename to C++/Velocity Closed Loop Control/.vscode/launch.json diff --git a/C++/Velocity PID Control/.vscode/settings.json b/C++/Velocity Closed Loop Control/.vscode/settings.json similarity index 100% rename from C++/Velocity PID Control/.vscode/settings.json rename to C++/Velocity Closed Loop Control/.vscode/settings.json diff --git a/C++/Velocity PID Control/.wpilib/wpilib_preferences.json b/C++/Velocity Closed Loop Control/.wpilib/wpilib_preferences.json similarity index 100% rename from C++/Velocity PID Control/.wpilib/wpilib_preferences.json rename to C++/Velocity Closed Loop Control/.wpilib/wpilib_preferences.json diff --git a/C++/Velocity PID Control/README.md b/C++/Velocity Closed Loop Control/README.md similarity index 100% rename from C++/Velocity PID Control/README.md rename to C++/Velocity Closed Loop Control/README.md diff --git a/C++/Velocity PID Control/WPILib-License.md b/C++/Velocity Closed Loop Control/WPILib-License.md similarity index 100% rename from C++/Velocity PID Control/WPILib-License.md rename to C++/Velocity Closed Loop Control/WPILib-License.md diff --git a/C++/Velocity PID Control/build.gradle b/C++/Velocity Closed Loop Control/build.gradle similarity index 100% rename from C++/Velocity PID Control/build.gradle rename to C++/Velocity Closed Loop Control/build.gradle diff --git a/C++/Velocity PID Control/gradle/wrapper/gradle-wrapper.jar b/C++/Velocity Closed Loop Control/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from C++/Velocity PID Control/gradle/wrapper/gradle-wrapper.jar rename to C++/Velocity Closed Loop Control/gradle/wrapper/gradle-wrapper.jar diff --git a/C++/Velocity PID Control/gradle/wrapper/gradle-wrapper.properties b/C++/Velocity Closed Loop Control/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from C++/Velocity PID Control/gradle/wrapper/gradle-wrapper.properties rename to C++/Velocity Closed Loop Control/gradle/wrapper/gradle-wrapper.properties diff --git a/C++/Velocity PID Control/gradlew b/C++/Velocity Closed Loop Control/gradlew similarity index 100% rename from C++/Velocity PID Control/gradlew rename to C++/Velocity Closed Loop Control/gradlew diff --git a/C++/Velocity PID Control/gradlew.bat b/C++/Velocity Closed Loop Control/gradlew.bat similarity index 100% rename from C++/Velocity PID Control/gradlew.bat rename to C++/Velocity Closed Loop Control/gradlew.bat diff --git a/C++/Velocity PID Control/settings.gradle b/C++/Velocity Closed Loop Control/settings.gradle similarity index 100% rename from C++/Velocity PID Control/settings.gradle rename to C++/Velocity Closed Loop Control/settings.gradle diff --git a/C++/Velocity PID Control/src/main/cpp/Robot.cpp b/C++/Velocity Closed Loop Control/src/main/cpp/Robot.cpp similarity index 100% rename from C++/Velocity PID Control/src/main/cpp/Robot.cpp rename to C++/Velocity Closed Loop Control/src/main/cpp/Robot.cpp diff --git a/C++/Velocity PID Control/src/main/deploy/example.txt b/C++/Velocity Closed Loop Control/src/main/deploy/example.txt similarity index 100% rename from C++/Velocity PID Control/src/main/deploy/example.txt rename to C++/Velocity Closed Loop Control/src/main/deploy/example.txt diff --git a/C++/Velocity PID Control/src/test/cpp/main.cpp b/C++/Velocity Closed Loop Control/src/test/cpp/main.cpp similarity index 100% rename from C++/Velocity PID Control/src/test/cpp/main.cpp rename to C++/Velocity Closed Loop Control/src/test/cpp/main.cpp diff --git a/C++/Velocity PID Control/vendordeps/REVLib.json b/C++/Velocity Closed Loop Control/vendordeps/REVLib.json similarity index 100% rename from C++/Velocity PID Control/vendordeps/REVLib.json rename to C++/Velocity Closed Loop Control/vendordeps/REVLib.json diff --git a/C++/Velocity PID Control/vendordeps/WPILibNewCommands.json b/C++/Velocity Closed Loop Control/vendordeps/WPILibNewCommands.json similarity index 100% rename from C++/Velocity PID Control/vendordeps/WPILibNewCommands.json rename to C++/Velocity Closed Loop Control/vendordeps/WPILibNewCommands.json