name: CMake on: [pull_request, push] jobs: build: strategy: fail-fast: false matrix: include: - os: ubuntu-latest name: Linux container: wpilib/roborio-cross-ubuntu:2022-20.04 flags: "" - os: macOS-11 name: macOS container: "" flags: "-DWITH_JAVA=OFF" name: "Build - ${{ matrix.name }}" runs-on: ${{ matrix.os }} container: ${{ matrix.container }} steps: - uses: actions/checkout@v2 - name: Install Dependencies run: | if [ "$RUNNER_OS" == "macOS" ]; then brew install opencv fi - name: Set up Python 3.8 uses: actions/setup-python@v2 with: python-version: 3.8 - name: Install jinja run: python -m pip install jinja2 - name: configure run: mkdir build && cd build && cmake ${{ matrix.flags }} .. - name: build working-directory: build run: cmake --build . -j$(nproc) - name: test working-directory: build run: ctest --output-on-failure build-vcpkg: name: "Build - Windows" runs-on: windows-2019 steps: - uses: actions/checkout@v2 - name: Prepare vcpkg uses: lukka/run-vcpkg@v7 with: vcpkgArguments: opencv vcpkgDirectory: ${{ runner.workspace }}/vcpkg vcpkgTriplet: x64-windows vcpkgGitCommitId: d781bd9ca77ac3dc2f13d88169021d48459c665f # HEAD on 2021-07-25 - name: Configure & Build uses: lukka/run-cmake@v3 with: buildDirectory: ${{ runner.workspace }}/build cmakeAppendedArgs: -DWITH_JAVA=OFF cmakeListsOrSettingsJson: CMakeListsTxtAdvanced useVcpkgToolchainFile: true - name: Run Tests run: ctest -C "Debug" --output-on-failure working-directory: ${{ runner.workspace }}/build