-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (53 loc) · 1.68 KB
/
ci.yml
File metadata and controls
66 lines (53 loc) · 1.68 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
name: Smile CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-test:
name: Build/Test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Show tool versions
shell: bash
run: |
uname -a || true
cmake --version
clang --version || true
# Config
- name: Configure (Windows)
if: runner.os == 'Windows'
run: cmake -S . -B build -G Ninja -DCMAKE_C_COMPILER=clang -DSMILE_DEV=ON -DSMILE_INFO=OFF -DSMILE_WARN=OFF
- name: Configure (Non-Windows)
if: runner.os != 'Windows'
run: cmake -S . -B build -DCMAKE_C_COMPILER=clang -DSMILE_DEV=ON -DSMILE_INFO=OFF -DSMILE_WARN=OFF
# Build
- name: Build
run: cmake --build build --config Debug
# Run Tests
- name: Run tests
run: ctest --test-dir build --output-on-failure -C Debug
sanitize:
name: Sanitize (ubuntu-clang)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure (ASan + UBSan)
run: >
cmake -S . -B build-sanitize
-DCMAKE_C_COMPILER=clang
-DSMILE_DEV=ON
-DSMILE_INFO=OFF
-DSMILE_WARN=OFF
-DCMAKE_C_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer"
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined"
- name: Build
run: cmake --build build-sanitize --config Debug
- name: Run tests
run: ctest --test-dir build-sanitize --output-on-failure -C Debug