Repository navigation
62 lines (55 loc) · 1.56 KB
/
Copy pathci.yml
File metadata and controls
62 lines (55 loc) · 1.56 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
name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
build-and-test:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: GCC Release + Benchmarks
cc: gcc
cxx: g++
build_type: Release
sanitizers: "OFF"
run_bench: true
- name: Clang Release
cc: clang
cxx: clang++
build_type: Release
sanitizers: "OFF"
run_bench: false
- name: GCC Debug + ASan & UBSan
cc: gcc
cxx: g++
build_type: Debug
sanitizers: "ON"
run_bench: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure CMake
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DENABLE_SANITIZERS=${{ matrix.sanitizers }}
- name: Build
run: cmake --build build --parallel
- name: Run CTest Suite
env:
ASAN_OPTIONS: detect_leaks=1:halt_on_error=1
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
run: ctest --test-dir build --output-on-failure --verbose
- name: Run Benchmark Smoke Test
if: ${{ matrix.run_bench }}
run: |
./build/gpuruntime_bench --quick --trace build/trace.json
test -s build/trace.json