Updated CI/CD to use installed protobuf #48
Workflow file for this run
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: C++ Unit Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: cpp-tests-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| linux-tests: | |
| name: ${{ matrix.build_type }} with ${{ matrix.compiler }} | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build_type: [Debug, Release] | |
| compiler: | |
| - gcc:9 | |
| - gcc:10 | |
| - gcc:11 | |
| - gcc:12 | |
| - gcc:13 | |
| - silkeh/clang:13 | |
| - silkeh/clang:14 | |
| - silkeh/clang:15 | |
| - silkeh/clang:16 | |
| - silkeh/clang:17 | |
| - silkeh/clang:18 | |
| container: | |
| image: ${{ matrix.compiler }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y cmake git ninja-build libprotobuf-dev protobuf-compiler | |
| - name: Configure | |
| run: | | |
| cmake -S "${GITHUB_WORKSPACE}" \ | |
| -B "${GITHUB_WORKSPACE}/build" \ | |
| -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
| -DCALF_TESTS=ON \ | |
| -DCALF_PYTHON_TESTS=OFF \ | |
| -DCALF_PROTOBUF_FETCH=OFF | |
| - name: Verify Protobuf | |
| shell: bash | |
| run: test ! -d "${GITHUB_WORKSPACE}/build/_deps/protobuf-src" | |
| - name: Build | |
| run: cmake --build "${GITHUB_WORKSPACE}/build" --parallel | |
| - name: Run tests | |
| shell: bash -el {0} | |
| working-directory: build | |
| run: ctest --output-on-failure | |
| macos-tests: | |
| name: ${{ matrix.build_type }} with AppleClang | |
| runs-on: macos-15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build_type: [Debug, Release] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install dependencies | |
| run: brew install cmake ninja protobuf | |
| - name: Configure | |
| run: | | |
| cmake -S "${GITHUB_WORKSPACE}" \ | |
| -B "${GITHUB_WORKSPACE}/build" \ | |
| -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
| -DCALF_TESTS=ON \ | |
| -DCALF_PYTHON_TESTS=OFF \ | |
| -DCALF_PROTOBUF_FETCH=OFF | |
| - name: Verify Protobuf | |
| shell: bash | |
| run: test ! -d "${GITHUB_WORKSPACE}/build/_deps/protobuf-src" | |
| - name: Build | |
| run: cmake --build "${GITHUB_WORKSPACE}/build" --parallel | |
| - name: Run tests | |
| shell: bash -el {0} | |
| working-directory: build | |
| run: ctest --output-on-failure |