-
Notifications
You must be signed in to change notification settings - Fork 225
40 lines (40 loc) · 1.34 KB
/
cpp_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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
# Remove macos-11 since there is no such runner available
# os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019, windows-2022]
os: [ubuntu-20.04, ubuntu-22.04, 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 //...