| name: CPP Build |
| on: |
| workflow_call: |
| jobs: |
| build: |
| name: "${{ matrix.os }}" |
| runs-on: ${{ matrix.os }} |
| strategy: |
| matrix: |
| os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, macos-10.15, macos-11, macos-12, windows-2019, windows-2022] |
| steps: |
| - uses: actions/checkout@v2 |
| - name: Compile On Linux |
| working-directory: ./cpp |
| if: runner.os == 'Linux' |
| run: bazel build --config=remote --remote_header=x-buildbuddy-api-key=${{ secrets.BUILD_BUDDY_API_KEY }} //... |
| - name: Compile On Windows |
| working-directory: ./cpp |
| if: runner.os == 'Windows' |
| run: bazel build //... |
| - name: Compile On macOS |
| working-directory: ./cpp |
| if: runner.os == 'macOS' |
| run: bazel build //... |
| - name: Run Unit Tests On Linux |
| working-directory: ./cpp |
| if: runner.os == 'Linux' |
| run: bazel test --config=remote --remote_header=x-buildbuddy-api-key=${{ secrets.BUILD_BUDDY_API_KEY }} //... |
| - name: Run Unit Tests On Windows |
| working-directory: ./cpp |
| if: runner.os == 'Windows' |
| run: bazel test --test_output=streamed //... |
| - name: Run Unit Tests On macOS |
| working-directory: ./cpp |
| if: runner.os == 'macOS' |
| run: bazel test --test_output=errors //... |