-
Notifications
You must be signed in to change notification settings - Fork 0
168 lines (127 loc) · 4.02 KB
/
ci.yml
File metadata and controls
168 lines (127 loc) · 4.02 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
CMAKE_VERSION: "3.16"
jobs:
build-test:
name: Build & Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-13]
steps:
- uses: actions/checkout@v4
- name: Install dependencies (Linux)
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y liburing-dev
- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --parallel
- name: Run Tests
working-directory: build
run: ctest --output-on-failure --timeout 60
sanitizer-asan:
name: AddressSanitizer
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y liburing-dev
- name: Configure (ASAN)
run: cmake -B build-asan -DCMAKE_BUILD_TYPE=Debug -DCOCO_ENABLE_ASAN=ON
- name: Build
run: cmake --build build-asan --parallel
- name: Run Tests
working-directory: build-asan
env:
ASAN_OPTIONS: "detect_leaks=1:abort_on_error=1:print_stats=1"
run: ctest --output-on-failure --timeout 120
sanitizer-tsan:
name: ThreadSanitizer
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y liburing-dev
- name: Configure (TSAN)
run: cmake -B build-tsan -DCMAKE_BUILD_TYPE=Debug -DCOCO_ENABLE_TSAN=ON
- name: Build
run: cmake --build build-tsan --parallel
- name: Run Tests
working-directory: build-tsan
env:
TSAN_OPTIONS: "halt_on_error=1"
run: ctest --output-on-failure --timeout 120 -E "stress"
sanitizer-ubsan:
name: UndefinedBehaviorSanitizer
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y liburing-dev
- name: Configure (UBSAN)
run: cmake -B build-ubsan -DCMAKE_BUILD_TYPE=Debug -DCOCO_ENABLE_UBSAN=ON
- name: Build
run: cmake --build build-ubsan --parallel
- name: Run Tests
working-directory: build-ubsan
run: ctest --output-on-failure --timeout 120
benchmark:
name: Benchmark
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y liburing-dev
- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --parallel
- name: Context Switch Benchmark
working-directory: build
run: ./bench_switch
- name: Channel Benchmark
working-directory: build
run: ./bench_channel
- name: Stack Benchmark
working-directory: build
run: ./bench_stack
- name: Preempt Benchmark
working-directory: build
run: ./bench_preempt
valgrind:
name: Valgrind Memory Check
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y liburing-dev valgrind
- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Debug
- name: Build
run: cmake --build build --parallel
- name: Valgrind Memory Check (key tests)
working-directory: build
run: |
for test in test_coro test_channel test_timer test_stack test_stack_overflow test_cancel test_global_sched; do
echo "=== Valgrind: $test ==="
valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1 --errors-for-leak-kinds=all \
./$test 2>&1
done