blob: 6115c09ec5893332a6f209c61ed94cb7a09b005f [file] [log] [blame]
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 //...
- 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 //...
- 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 //...