-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.23 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
48
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: Setup Ubuntu
if: ${{ matrix.runner == 'ubuntu-22.04' }}
run: |
sudo apt update
sudo apt install -y libglib2.0-dev
- 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}}