forked from dacap/observable
-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (59 loc) · 1.77 KB
/
Copy pathbuild.yml
File metadata and controls
59 lines (59 loc) · 1.77 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
name: build
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
build_type: [debug,release]
benchmark: [tests]
fast: [safe, fast]
sanitizer: [""]
include:
- os: macos-latest
build_type: debug
sanitizer: "-fsanitize=thread"
- os: macos-latest
build_type: debug
sanitizer: "-fsanitize=address"
- os: ubuntu-latest
build_type: release
benchmark: benchmark
fast: safe
- os: ubuntu-latest
build_type: release
benchmark: benchmark
fast: fast
steps:
- uses: actions/checkout@v4
- uses: aseprite/get-ninja@main
- uses: ilammy/msvc-dev-cmd@v1
if: runner.os == 'Windows'
- name: Generating Makefiles
shell: bash
run: |
if [[ "${{ matrix.benchmark }}" == "benchmark" ]] ; then
OBSERVABLE_BENCHMARKS=ON
else
OBSERVABLE_BENCHMARKS=OFF
fi
if [[ "${{ matrix.fast }}" == fast ]] ; then
OBSERVABLE_FAST_LIST=ON
else
OBSERVABLE_FAST_LIST=OFF
fi
cmake . -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_FLAGS=${{ matrix.sanitizer }} \
-DCMAKE_EXE_LINKER_FLAGS=${{ matrix.sanitizer }} \
-DOBSERVABLE_FAST_LIST=$OBSERVABLE_FAST_LIST \
-DOBSERVABLE_BENCHMARKS=$OBSERVABLE_BENCHMARKS
- name: Compiling
run: cmake --build .
- name: Running Tests
shell: bash
run: |
ctest --output-on-failure
if [[ "${{ matrix.benchmark }}" == "benchmark" ]] ; then ./benchmarks/obs_benchmarks ; fi