-
Notifications
You must be signed in to change notification settings - Fork 2
32 lines (25 loc) · 797 Bytes
/
buildcpp.yml
File metadata and controls
32 lines (25 loc) · 797 Bytes
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
name: Build C++ Test
on:
push:
branches: [main, development]
pull_request:
branches: [main, development]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
build_type: [Release, Debug]
steps:
- uses: actions/checkout@v3
- name: Configure CMake
run: cmake -B build_cpp -S . -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: Build C++ test
run: cmake --build build_cpp --target test_cpp --config ${{ matrix.build_type }}
- name: Run C++ tests (Linux/macOS)
if: runner.os != 'Windows'
run: cd build_cpp && ./test_cpp
- name: Run C++ tests (Windows)
if: runner.os == 'Windows'
run: .\build_cpp\${{ matrix.build_type }}\test_cpp.exe