[wpilibj] Remove useless AutoCloseable implementations (#9344) #23838
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CMake | |
| on: [merge_group, pull_request, push] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| SCCACHE_WEBDAV_ENDPOINT: "https://frcmaven.wpi.edu/artifactory/wpilib-generic-cache-cmake-local" | |
| SCCACHE_WEBDAV_KEY_PREFIX: "sccache" | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| name: Linux | |
| container: wpilib/systemcore-cross-debian:trixie | |
| flags: "--preset with-sccache -DCMAKE_BUILD_TYPE=Release -DWPILIB_WITH_EXAMPLES=ON" | |
| - os: macOS-15 | |
| name: macOS | |
| container: "" | |
| flags: "--preset with-sccache -DCMAKE_BUILD_TYPE=Release -DWPILIB_WITH_EXAMPLES=ON -DWPILIB_WITH_GUI=ON -DWPILIB_WITH_WPICAL=ON -DWPILIB_USE_SYSTEM_EIGEN=ON" | |
| - os: windows-2025 | |
| name: Windows | |
| container: "" | |
| flags: '--preset with-sccache -DCMAKE_BUILD_TYPE=Release -DWPILIB_WITH_EXAMPLES=ON -DWPILIB_USE_SYSTEM_LIBUV=ON -DWPILIB_USE_SYSTEM_EIGEN=OFF -DCMAKE_TOOLCHAIN_FILE="$Env:RUNNER_WORKSPACE/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_INSTALL_OPTIONS=--clean-after-build -DVCPKG_TARGET_TRIPLET=x64-windows-release -DVCPKG_HOST_TRIPLET=x64-windows-release' | |
| name: "Build - ${{ matrix.name }}" | |
| runs-on: ${{ matrix.os }} | |
| container: ${{ matrix.container }} | |
| steps: | |
| - name: Install dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y libopencv-dev ninja-build | |
| - name: Setup avahi-daemon | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo service dbus start | |
| sudo avahi-daemon -D | |
| - name: Install dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: brew install ceres-solver eigen opencv sdl3 suite-sparse ninja && brew link --force libomp | |
| - uses: TheMrMilchmann/setup-msvc-dev@v4 | |
| if: runner.os == 'Windows' | |
| with: | |
| arch: x64 | |
| - name: Install CMake (Windows only) | |
| if: runner.os == 'Windows' | |
| uses: lukka/get-cmake@v4.4.0 | |
| - name: Install sccache | |
| uses: mozilla-actions/sccache-action@v0.0.10 | |
| - uses: actions/checkout@v7 | |
| - name: Run vcpkg (Windows only) | |
| if: runner.os == 'Windows' | |
| uses: lukka/run-vcpkg@v11.6 | |
| with: | |
| vcpkgDirectory: ${{ runner.workspace }}/vcpkg | |
| vcpkgGitCommitId: 74e6536215718009aae747d86d84b78376bf9e09 # HEAD on 2025-10-17 | |
| - name: configure | |
| run: cmake ${{ matrix.flags }} | |
| env: | |
| SCCACHE_WEBDAV_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | |
| SCCACHE_WEBDAV_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | |
| - name: build | |
| run: cmake --build build-cmake --parallel $(nproc) | |
| env: | |
| SCCACHE_WEBDAV_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | |
| SCCACHE_WEBDAV_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | |
| - name: test | |
| if: runner.os != 'Windows' | |
| working-directory: build-cmake | |
| # CameraCalibrationTest Typical inexplicably crashes | |
| run: ctest --output-on-failure -E 'CameraCalibrationTest Typical' | |
| - name: test (windows) | |
| if: runner.os == 'Windows' | |
| working-directory: build-cmake | |
| # UnitTest_test segfaults on exit occasionally | |
| run: ctest --output-on-failure -E 'UnitTest' |