blob: 785995bd6ae815104a2fd0c002dab60d61252cf0 [file] [log] [blame]
name: CPP Build
on:
workflow_call:
jobs:
build:
name: "${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Disable VS 2022 before https://github.com/bazelbuild/bazel/issues/18592 issue is solved
# os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019, windows-2022]
os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019]
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 //...