-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (74 loc) · 3.13 KB
/
Copy pathci.yml
File metadata and controls
90 lines (74 loc) · 3.13 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
name: ci
on:
push:
pull_request:
jobs:
build-test:
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]
include:
- os: ubuntu-latest
cc: gcc
cxx: g++
- os: ubuntu-latest
cc: clang
cxx: clang++
- os: windows-latest
- os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Configure (ubuntu compiler matrix)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DLOXSEQ_WARNINGS_AS_ERRORS=ON
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
- name: Configure
if: ${{ matrix.os != 'ubuntu-latest' }}
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DLOXSEQ_WARNINGS_AS_ERRORS=ON
- name: Build
run: cmake --build build --config ${{ matrix.build_type }}
- name: Test
run: ctest --test-dir build --output-on-failure -C ${{ matrix.build_type }}
- name: Install (smoke)
run: cmake --install build --config ${{ matrix.build_type }} --prefix dist
- name: Consumer smoke (C)
if: ${{ matrix.build_type == 'Release' }}
run: |
cmake -S examples/consumer_c -B build-consumer-c -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_PREFIX_PATH=${{ github.workspace }}/dist
cmake --build build-consumer-c --config ${{ matrix.build_type }}
- name: Consumer smoke (C++)
if: ${{ matrix.build_type == 'Release' }}
run: |
cmake -S examples/consumer_cpp -B build-consumer-cpp -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_PREFIX_PATH=${{ github.workspace }}/dist
cmake --build build-consumer-cpp --config ${{ matrix.build_type }}
- name: Examples (smoke)
if: ${{ matrix.build_type == 'Release' }}
run: |
cmake -S . -B build-examples -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DLOXSEQ_BUILD_TESTS=OFF -DLOXSEQ_BUILD_EXAMPLES=ON
cmake --build build-examples --config ${{ matrix.build_type }}
- name: Examples (run, unix)
if: ${{ matrix.build_type == 'Release' && matrix.os != 'windows-latest' }}
run: |
./build-examples/loxseq_example_minimal
./build-examples/loxseq_example_batch_reactor
- name: Examples (run, windows)
if: ${{ matrix.build_type == 'Release' && matrix.os == 'windows-latest' }}
run: |
.\\build-examples\\Release\\loxseq_example_minimal.exe
.\\build-examples\\Release\\loxseq_example_batch_reactor.exe
sanitizer-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure (ASan/UBSan)
run: cmake -S . -B build-sanitize -DCMAKE_BUILD_TYPE=Debug -DLOXSEQ_WARNINGS_AS_ERRORS=ON -DCMAKE_C_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer"
env:
CC: clang
- name: Build
run: cmake --build build-sanitize --config Debug
- name: Test
run: ctest --test-dir build-sanitize --output-on-failure -C Debug