-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (37 loc) · 1.26 KB
/
build.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
name: Build
on:
workflow_dispatch: # manual
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build-and-test:
name: ${{ matrix.cfg.name }}
runs-on: ${{ matrix.cfg.os }}
strategy:
matrix:
cfg:
- {name: "linux gcc dbg", os: ubuntu-latest, preset: debug-ci }
- {name: "windows msvc dbg", os: windows-latest, preset: debug-ci }
- {name: "macos clang dbg", os: macos-latest, preset: debug-ci }
steps:
- name: Clone
uses: actions/checkout@v4
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@v5
- name: VC Vars
# Setup vcvars on Windows
# MSVC's address sanitizer attaches dependencies to several DLLs which are not in PATH
# vcvars will add them to PATH and allow msvc asan executables to run
if: matrix.cfg.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
- name: Configure
run: cmake --preset ${{ matrix.cfg.preset }} -B build
- name: Build
run: cmake --build build
- name: Test
run: ctest --test-dir build --output-on-failure
env:
# just set this to all configs, it will be used where it matters and ignored otherwise
UBSAN_OPTIONS: halt_on_error=1