From 09a93b86dcaf8e20af6b98d3c8d141c7cd9d1726 Mon Sep 17 00:00:00 2001 From: Ryan Blue Date: Fri, 4 Oct 2024 21:22:31 -0400 Subject: [PATCH 1/2] [wpilibc] Add RadioLEDState docs to C++ (NFC) (#7158) Add RadioLEDState docs for consistency with Java. --- wpilibc/src/main/native/include/frc/RobotController.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wpilibc/src/main/native/include/frc/RobotController.h b/wpilibc/src/main/native/include/frc/RobotController.h index 2eca0c1b942..cf17466c13c 100644 --- a/wpilibc/src/main/native/include/frc/RobotController.h +++ b/wpilibc/src/main/native/include/frc/RobotController.h @@ -21,7 +21,13 @@ struct CANStatus { int transmitErrorCount; }; -enum RadioLEDState { kOff = 0, kGreen = 1, kRed = 2, kOrange = 3 }; +/** State for the radio led. */ +enum RadioLEDState { + kOff = 0, ///< Off. + kGreen = 1, ///< Green. + kRed = 2, ///< Red. + kOrange = 3 ///< Orange. +}; class RobotController { public: From f856c05a084562a3360b2872aa78d58b5ed6a62c Mon Sep 17 00:00:00 2001 From: Ryan Blue Date: Fri, 4 Oct 2024 21:24:23 -0400 Subject: [PATCH 2/2] [ci] Add no-cache build workflow to detect potential false-positive cache hits (#7027) Duplicate of gradle.yml without docs, caching, and release configurations. It's set up to run off-peak weekly. --- .github/workflows/sentinel-build.yml | 161 +++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 .github/workflows/sentinel-build.yml diff --git a/.github/workflows/sentinel-build.yml b/.github/workflows/sentinel-build.yml new file mode 100644 index 00000000000..de26ca99384 --- /dev/null +++ b/.github/workflows/sentinel-build.yml @@ -0,0 +1,161 @@ +name: Sentinel Build (No Cache) + +on: + workflow_dispatch: + schedule: + - cron: "15 3 * * Sat" # 11:15PM EST every Friday + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + build-docker: + if: (github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main') || github.event_name != 'schedule' + strategy: + fail-fast: false + matrix: + include: + - container: wpilib/roborio-cross-ubuntu:2024-22.04 + artifact-name: Athena + build-options: "-Ponlylinuxathena" + - container: wpilib/raspbian-cross-ubuntu:bullseye-22.04 + artifact-name: Arm32 + build-options: "-Ponlylinuxarm32" + - container: wpilib/aarch64-cross-ubuntu:bullseye-22.04 + artifact-name: Arm64 + build-options: "-Ponlylinuxarm64" + - container: wpilib/ubuntu-base:22.04 + artifact-name: Linux + build-options: "-Ponlylinuxx86-64" + name: "Build - ${{ matrix.artifact-name }}" + runs-on: ubuntu-22.04 + steps: + - name: Free Disk Space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: true + haskell: true + large-packages: false + docker-images: false + swap-storage: false + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Build with Gradle + uses: addnab/docker-run-action@v3 + with: + image: ${{ matrix.container }} + options: -v ${{ github.workspace }}:/work -w /work -e GITHUB_REF -e CI + run: df . && rm -f semicolon_delimited_script && echo $GITHUB_REF && ./gradlew build -PbuildServer -PskipJavaFormat ${{ matrix.build-options }} + - name: Check free disk space + run: df . + - uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.artifact-name }} + path: build/allOutputs + + build-host: + if: (github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main') || github.event_name != 'schedule' + env: + MACOSX_DEPLOYMENT_TARGET: 13.3 + strategy: + fail-fast: false + matrix: + include: + - os: windows-2022 + artifact-name: Win64Debug + architecture: x64 + task: "build" + build-options: "-PciDebugOnly" + outputs: "build/allOutputs" + - os: windows-2022 + artifact-name: Win64Release + architecture: x64 + build-options: "-PciReleaseOnly" + task: "copyAllOutputs" + outputs: "build/allOutputs" + - os: windows-2022 + artifact-name: WinArm64Debug + architecture: x64 + task: "build" + build-options: "-PciDebugOnly -Pbuildwinarm64 -Ponlywindowsarm64" + outputs: "build/allOutputs" + - os: windows-2022 + artifact-name: WinArm64Release + architecture: x64 + build-options: "-PciReleaseOnly -Pbuildwinarm64 -Ponlywindowsarm64" + task: "copyAllOutputs" + outputs: "build/allOutputs" + - os: macOS-14 + artifact-name: macOS + architecture: aarch64 + task: "build" + outputs: "build/allOutputs" + - os: windows-2022 + artifact-name: Win32 + architecture: x86 + task: ":ntcoreffi:build" + outputs: "ntcoreffi/build/outputs" + name: "Build - ${{ matrix.artifact-name }}" + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 17 + architecture: ${{ matrix.architecture }} + - name: Import Developer ID Certificate + uses: wpilibsuite/import-signing-certificate@v2 + with: + certificate-data: ${{ secrets.APPLE_CERTIFICATE_DATA }} + certificate-passphrase: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} + keychain-password: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} + if: | + matrix.artifact-name == 'macOS' && (github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main') + - name: Set Keychain Lock Timeout + run: security set-keychain-settings -lut 3600 + if: | + matrix.artifact-name == 'macOS' && (github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main') + - name: Set Java Heap Size + run: sed -i 's/-Xmx2g/-Xmx1g/g' gradle.properties + if: matrix.artifact-name == 'Win32' + - name: Check disk free space (Windows) + run: wmic logicaldisk get caption, freespace + if: matrix.os == 'windows-2022' + - name: Check disk free space pre-cleanup (macOS) + run: df -h . + if: matrix.os == 'macOS-14' + - name: Cleanup disk space + # CodeQL: 5G + # go: 748M + # Android: 12G + run: | + rm -rf /Users/runner/hostedtoolcache/CodeQL + rm -rf /Users/runner/hostedtoolcache/go + rm -rf /Users/runner/Library/Android + if: matrix.os == 'macOS-14' + - name: Check disk free space post-cleanup (macOS) + run: df -h . + if: matrix.os == 'macOS-14' + - name: Build with Gradle + run: ./gradlew ${{ matrix.task }} -PbuildServer -PskipJavaFormat ${{ matrix.build-options }} + - name: Sign Libraries with Developer ID + run: ./gradlew copyAllOutputs -PbuildServer -PskipJavaFormat -PdeveloperID=${{ secrets.APPLE_DEVELOPER_ID }} ${{ matrix.build-options }} + if: | + matrix.artifact-name == 'macOS' && (github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main') + - name: Check disk free space (Windows) + run: wmic logicaldisk get caption, freespace + if: matrix.os == 'windows-2022' + - name: Check disk free space (macOS) + run: df -h . + if: matrix.os == 'macOS-14' + - uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.artifact-name }} + path: ${{ matrix.outputs }}