-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (35 loc) · 1.29 KB
/
cmake.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
42
name: CMake build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BUILD_TYPE: DEBUG
jobs:
build:
name: Running unit tests with ${{matrix.ctest_option}} option
strategy:
matrix:
ctect_option:
- "-DBESM666_TEST_WITH_VALGRIND=OFF"
- "-DBESM666_TEST_WITH_VALGRIND=ON"
os: [ ubuntu-latest, macos-12 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: install valgrind
if: ${{ matrix.os != 'macos-12' }}
run: sudo apt update && sudo apt install -y valgrind
- name: Configure CMake
if: ${{ !(matrix.os == 'macos-12' && matrix.ctect_option == '-DBESM666_TEST_WITH_VALGRIND=ON') }}
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{matrix.ctect_option}}
- name: Build
if: ${{ !(matrix.os == 'macos-12' && matrix.ctect_option == '-DBESM666_TEST_WITH_VALGRIND=ON') }}
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
if: ${{ !(matrix.os == 'macos-12' && matrix.ctect_option == '-DBESM666_TEST_WITH_VALGRIND=ON') }}
working-directory: ${{github.workspace}}/build
run: ctest --test-dir ${{github.workspace}}/build/besm-666