Repository navigation
116 lines (110 loc) · 3.63 KB
/
Copy pathci.yml
File metadata and controls
116 lines (110 loc) · 3.63 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# SPDX-FileCopyrightText: 2026 PullsarDev
# SPDX-License-Identifier: Apache-2.0
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
build-and-test:
name: ${{ matrix.name }} Debug (${{ matrix.checks }})
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
compiler: [msvc, clang, gcc]
checks: [default, constrained]
include:
- compiler: msvc
name: Windows MSVC
os: windows-latest
cmake_args: ""
- compiler: clang
name: Linux Clang
os: ubuntu-latest
cmake_args: -DCMAKE_CXX_COMPILER=clang++
- compiler: gcc
name: Linux GCC
os: ubuntu-latest
cmake_args: -DCMAKE_CXX_COMPILER=g++
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- name: Configure
shell: bash
run: >
cmake -S . -B build
-DCMAKE_BUILD_TYPE=Debug
-DINTEREST_WARNINGS_AS_ERRORS=ON
-DINTEREST_CONSTRAINED_BUILD=${{ matrix.checks == 'constrained' && 'ON' || 'OFF' }}
${{ matrix.cmake_args }}
- name: Build
run: cmake --build build --config Debug --parallel 2
- name: Test
run: ctest --test-dir build -C Debug --output-on-failure --no-tests=error
optimized:
name: ${{ matrix.name }} Release
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
include:
- name: Windows MSVC
os: windows-latest
cmake_args: ""
- name: Linux Clang
os: ubuntu-latest
cmake_args: -DCMAKE_CXX_COMPILER=clang++
- name: Linux GCC
os: ubuntu-latest
cmake_args: -DCMAKE_CXX_COMPILER=g++
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- name: Configure
run: >
cmake -S . -B build-release
-DCMAKE_BUILD_TYPE=Release
-DINTEREST_WARNINGS_AS_ERRORS=ON
${{ matrix.cmake_args }}
- name: Build
run: cmake --build build-release --config Release --parallel 2
- name: Test
run: ctest --test-dir build-release -C Release --output-on-failure --no-tests=error
- name: Build from a parent CMake project
run: >
cmake -S examples/consumer -B build-consumer
-DCMAKE_BUILD_TYPE=Release
${{ matrix.cmake_args }}
- name: Build consumer
run: cmake --build build-consumer --config Release --parallel 2
- name: Test consumer
run: ctest --test-dir build-consumer -C Release --output-on-failure --no-tests=error
sanitizers:
name: Linux Clang ASan + UBSan
runs-on: ubuntu-latest
timeout-minutes: 15
env:
ASAN_OPTIONS: detect_leaks=1
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- name: Configure
run: >
cmake -S . -B build-sanitizers
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_BUILD_TYPE=Debug
-DINTEREST_WARNINGS_AS_ERRORS=ON
-DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-sanitize-recover=all -fno-omit-frame-pointer"
- name: Build
run: cmake --build build-sanitizers --parallel 2
- name: Test
run: ctest --test-dir build-sanitizers --output-on-failure --no-tests=error