-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.2 KB
/
unit_tests.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
41
name: unit tests
on: [push]
jobs:
unit-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
config: [Release, Debug]
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Get latest cmake
uses: lukka/get-cmake@latest
- name: Set compiler (ubuntu-latest)
if: matrix.os == 'ubuntu-latest'
run: |
echo "CC=gcc-13" >> $GITHUB_ENV
echo "CXX=g++-13" >> $GITHUB_ENV
echo "TRIPLET=x64-linux" >> $GITHUB_ENV
- name: Set compiler (windows-latest)
if: matrix.os == 'windows-latest'
run: |
echo "TRIPLET=x64-windows" >> $GITHUB_ENV
- name: Configure
run: cmake -B build -S . -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DVCPKG_TARGET_TRIPLET=${TRIPLET} --toolchain=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake
- name: Build
run: cmake --build build --config ${{ matrix.config }} --parallel
- name: Execute
run: ctest --test-dir build -C ${{ matrix.config }}
- name: Publish test report
uses: mikepenz/action-junit-report@v3
with:
report_paths: 'build/bin/junit_*.xml'