-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (65 loc) · 2.2 KB
/
Copy pathci.yml
File metadata and controls
70 lines (65 loc) · 2.2 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
name: CI
on:
push:
pull_request:
permissions:
contents: read
jobs:
cpp:
name: C++ (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v7
- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
- name: Build
run: cmake --build build --config Release --parallel
- name: Test
run: ctest --test-dir build -C Release --output-on-failure
- name: Install
run: cmake --install build --config Release
- name: Configure installed-package consumers
run: cmake -S tests/install -B consumer -DCMAKE_PREFIX_PATH=${{ github.workspace }}/install
- name: Build installed-package consumers
run: cmake --build consumer --config Release --parallel
- name: Test installed-package consumers
run: ctest --test-dir consumer -C Release --output-on-failure
sanitizer:
name: Address/undefined behavior sanitizers
runs-on: ubuntu-latest
env:
UBSAN_OPTIONS: halt_on_error=1
steps:
- uses: actions/checkout@v7
- name: Configure
run: >-
cmake -S . -B build-sanitize
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer"
-DCMAKE_C_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer"
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined"
- name: Build
run: cmake --build build-sanitize --parallel
- name: Test
run: ctest --test-dir build-sanitize --output-on-failure
python:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.14"]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install package and test dependencies
run: python -m pip install . pytest
- name: Test
run: python -m pytest -q python/tests