-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.44 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
43
44
45
46
47
name: CMake
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
strategy:
fail-fast: false
matrix:
target: ['ubuntu-22.04', 'ubuntu-22.04-dynamic', 'windows-2022']
build_type: ['debug', 'release']
include:
- target: 'ubuntu-22.04'
runner: 'ubuntu-22.04'
- target: 'ubuntu-22.04-dynamic'
runner: 'ubuntu-22.04'
- target: 'windows-2022'
runner: 'windows-2022'
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
#- name: Configure
# # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
# run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Configure
working-directory: ${{github.workspace}}
run: cmake --preset gh-${{matrix.target}}-${{matrix.build_type}}
- name: Build
working-directory: ${{github.workspace}}
run: cmake --build --preset gh-${{matrix.target}}-${{matrix.build_type}}
- name: Test
working-directory: ${{github.workspace}}
run: ctest --preset gh-${{matrix.target}}-${{matrix.build_type}}