1
+ # Builds project (with various compilers, CMake options, etc.) and runs tests
1
2
name : BasicBuilds
2
3
3
4
on : workflow_call
@@ -11,15 +12,15 @@ permissions:
11
12
12
13
jobs :
13
14
icx-build :
14
- name : Build - Intel C++ Compiler
15
+ # TODO: we could merge ICX build with gcc/clang (using our dockers) Issue: #259
16
+ name : Intel C++ Compiler
15
17
strategy :
16
18
matrix :
17
19
build_type : [Debug, Release]
18
20
compiler : [{c: icx, cxx: icpx}]
19
21
pool_tracking : ['ON', 'OFF']
20
22
shared_library : ['OFF']
21
23
os_provider : ['ON']
22
- sanitizers : [{asan: OFF, ubsan: OFF, tsan: OFF}]
23
24
runs-on : ubuntu-22.04
24
25
container :
25
26
image : intel/oneapi:latest
@@ -52,19 +53,14 @@ jobs:
52
53
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
53
54
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
54
55
-DUMF_BUILD_LIBUMF_POOL_SCALABLE=ON
55
- -DUSE_ASAN=${{matrix.sanitizers.asan}}
56
- -DUSE_UBSAN=${{matrix.sanitizers.ubsan}}
57
- -DUSE_TSAN=${{matrix.sanitizers.tsan}}
58
56
-DUMF_BUILD_EXAMPLES=ON
59
57
60
58
- name : Build UMF
61
- run : |
62
- cmake --build build -j $(nproc)
59
+ run : cmake --build build -j $(nproc)
63
60
64
61
- name : Run tests
65
62
working-directory : ${{github.workspace}}/build
66
- run : |
67
- ctest --output-on-failure --test-dir test
63
+ run : ctest --output-on-failure --test-dir test
68
64
69
65
- name : Test make install
70
66
# Run only when the example is built
80
76
run : ${{github.workspace}}/test/test_make_uninstall.sh ${{github.workspace}} ${{env.BUILD_DIR}} ${{env.INSTL_DIR}}
81
77
82
78
ubuntu-build :
83
- name : Build - Ubuntu
79
+ name : Ubuntu
84
80
strategy :
85
81
matrix :
86
82
os : ['ubuntu-20.04', 'ubuntu-22.04']
89
85
pool_tracking : ['ON', 'OFF']
90
86
shared_library : ['OFF']
91
87
os_provider : ['ON']
92
- sanitizers : [{asan: OFF, ubsan: OFF, tsan: OFF}]
93
88
include :
94
89
- os : ' ubuntu-20.04'
95
90
build_type : Release
@@ -123,106 +118,69 @@ jobs:
123
118
compiler : {c: gcc, cxx: g++}
124
119
shared_library : ' OFF'
125
120
os_provider : ' OFF'
126
- # TODO: Move jobs with sanitizer checks to a separate workflow file.
127
- - os : ' ubuntu-22.04'
128
- build_type : Debug
129
- compiler : {c: clang, cxx: clang++}
130
- pool_tracking : ' ON'
131
- shared_library : ' OFF'
132
- os_provider : ' ON'
133
- # TSAN is mutually exclusive with other sanitizers
134
- sanitizers : {asan: ON, ubsan: ON, tsan: OFF}
135
- - os : ' ubuntu-22.04'
136
- build_type : Debug
137
- compiler : {c: clang, cxx: clang++}
138
- pool_tracking : ' ON'
139
- shared_library : ' OFF'
140
- os_provider : ' ON'
141
- sanitizers : {asan: OFF, ubsan: OFF, tsan: ON}
142
- - os : ' ubuntu-22.04'
143
- build_type : Debug
144
- compiler : {c: gcc, cxx: g++}
145
- pool_tracking : ' ON'
146
- shared_library : ' OFF'
147
- os_provider : ' ON'
148
- sanitizers : {asan: ON, ubsan: ON, tsan: OFF}
149
- - os : ' ubuntu-22.04'
150
- build_type : Debug
151
- compiler : {c: gcc, cxx: g++}
152
- pool_tracking : ' ON'
153
- shared_library : ' OFF'
154
- os_provider : ' ON'
155
- sanitizers : {asan: OFF, ubsan: OFF, tsan: ON}
156
121
runs-on : ${{matrix.os}}
157
122
158
123
steps :
159
- - name : Checkout
160
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
124
+ - name : Checkout
125
+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
161
126
162
- - name : Install apt packages
163
- run : |
164
- sudo apt-get update
165
- sudo apt-get install -y clang cmake libhwloc-dev libnuma-dev libjemalloc-dev libtbb-dev
127
+ - name : Install apt packages
128
+ run : |
129
+ sudo apt-get update
130
+ sudo apt-get install -y clang cmake libhwloc-dev libnuma-dev libjemalloc-dev libtbb-dev
166
131
167
- - name : Install g++-7
168
- if : matrix.compiler.cxx == 'g++-7'
169
- run : |
170
- sudo apt-get install -y ${{matrix.compiler.cxx}}
132
+ - name : Install g++-7
133
+ if : matrix.compiler.cxx == 'g++-7'
134
+ run : sudo apt-get install -y ${{matrix.compiler.cxx}}
171
135
172
- - name : Configure build
173
- run : >
174
- cmake
175
- -B ${{env.BUILD_DIR}}
176
- -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
177
- -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
178
- -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
179
- -DCMAKE_C_COMPILER=${{matrix.compiler.c}}
180
- -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
181
- -DUMF_BUILD_OS_MEMORY_PROVIDER=${{matrix.os_provider}}
182
- -DUMF_ENABLE_POOL_TRACKING=${{matrix.pool_tracking}}
183
- -DUMF_FORMAT_CODE_STYLE=OFF
184
- -DUMF_DEVELOPER_MODE=ON
185
- -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
186
- -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
187
- -DUMF_BUILD_LIBUMF_POOL_SCALABLE=ON
188
- -DUSE_ASAN=${{matrix.sanitizers.asan}}
189
- -DUSE_UBSAN=${{matrix.sanitizers.ubsan}}
190
- -DUSE_TSAN=${{matrix.sanitizers.tsan}}
136
+ - name : Configure build
137
+ run : >
138
+ cmake
139
+ -B ${{env.BUILD_DIR}}
140
+ -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
141
+ -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
142
+ -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
143
+ -DCMAKE_C_COMPILER=${{matrix.compiler.c}}
144
+ -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
145
+ -DUMF_BUILD_OS_MEMORY_PROVIDER=${{matrix.os_provider}}
146
+ -DUMF_ENABLE_POOL_TRACKING=${{matrix.pool_tracking}}
147
+ -DUMF_FORMAT_CODE_STYLE=OFF
148
+ -DUMF_DEVELOPER_MODE=ON
149
+ -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
150
+ -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
151
+ -DUMF_BUILD_LIBUMF_POOL_SCALABLE=ON
191
152
192
- - name : Build UMF
193
- run : |
194
- cmake --build ${{env.BUILD_DIR}} -j $(nproc)
153
+ - name : Build UMF
154
+ run : cmake --build ${{env.BUILD_DIR}} -j $(nproc)
195
155
196
- - name : Run tests
197
- working-directory : ${{env.BUILD_DIR}}
198
- run : |
199
- ctest --output-on-failure
156
+ - name : Run tests
157
+ working-directory : ${{env.BUILD_DIR}}
158
+ run : ctest --output-on-failure
200
159
201
- - name : Test make install
202
- # Run only when the example is built
203
- # TODO: Modify installation test to accept output varying with build options
204
- if : matrix.os_provider == 'ON' && matrix.pool_tracking == 'ON'
205
- working-directory : ${{env.BUILD_DIR}}
206
- run : ${{github.workspace}}/test/test_make_install.sh \
207
- ${{github.workspace}} ${{env.BUILD_DIR}} ${{env.INSTL_DIR}} ${{matrix.build_type}} ${{matrix.shared_library}}
160
+ - name : Test make install
161
+ # Run only when the example is built
162
+ # TODO: Modify installation test to accept output varying with build options
163
+ if : matrix.os_provider == 'ON' && matrix.pool_tracking == 'ON'
164
+ working-directory : ${{env.BUILD_DIR}}
165
+ run : ${{github.workspace}}/test/test_make_install.sh \
166
+ ${{github.workspace}} ${{env.BUILD_DIR}} ${{env.INSTL_DIR}} ${{matrix.build_type}} ${{matrix.shared_library}}
208
167
209
- - name : Test make uninstall
210
- # Run only when the example is built
211
- # TODO: Modify installation test to accept output varying with build options
212
- if : matrix.os_provider == 'ON' && matrix.pool_tracking == 'ON'
213
- working-directory : ${{env.BUILD_DIR}}
214
- run : ${{github.workspace}}/test/test_make_uninstall.sh ${{github.workspace}} ${{env.BUILD_DIR}} ${{env.INSTL_DIR}}
168
+ - name : Test make uninstall
169
+ # Run only when the example is built
170
+ # TODO: Modify installation test to accept output varying with build options
171
+ if : matrix.os_provider == 'ON' && matrix.pool_tracking == 'ON'
172
+ working-directory : ${{env.BUILD_DIR}}
173
+ run : ${{github.workspace}}/test/test_make_uninstall.sh ${{github.workspace}} ${{env.BUILD_DIR}} ${{env.INSTL_DIR}}
215
174
216
175
windows-build :
217
- name : Build - Windows
176
+ name : Windows
218
177
strategy :
219
178
matrix :
220
179
os : ['windows-2019', 'windows-2022']
221
180
build_type : [Debug, Release]
222
181
compiler : [{c: cl, cxx: cl}]
223
182
pool_tracking : ['ON', 'OFF']
224
183
shared_library : ['OFF']
225
- sanitizers : [{asan: OFF}]
226
184
os_provider : ['ON']
227
185
include :
228
186
- os : ' windows-2022'
@@ -243,82 +201,56 @@ jobs:
243
201
pool_tracking : ' ON'
244
202
shared_library : ' ON'
245
203
os_provider : ' OFF'
246
- - os : ' windows-2022'
247
- build_type : Debug
248
- compiler : {c: cl, cxx: cl}
249
- pool_tracking : ' OFF'
250
- shared_library : ' OFF'
251
- os_provider : ' ON'
252
- sanitizers : {asan: ON}
253
- - os : ' windows-2022'
254
- build_type : Debug
255
- compiler : {c: clang-cl, cxx: clang-cl}
256
- pool_tracking : ' OFF'
257
- shared_library : ' OFF'
258
- os_provider : ' ON'
259
- sanitizers : {asan: ON}
260
204
261
205
runs-on : ${{matrix.os}}
262
206
263
207
steps :
264
- - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
265
-
266
- # Use '14.38.33130' MSVC toolset when compiling UMF with ASan.
267
- # Running binaries compiled with older toolsets results in a
268
- # 'STATUS_DLL_INIT_FAILED' error despite being linked with ASan from
269
- # the same toolset as the compiler being used.
270
- # https://github.com/actions/runner-images/issues/8891
271
- - name : Setup MSVC dev command prompt
272
- if : matrix.os == 'windows-2022' && matrix.sanitizers.asan == 'ON'
273
- uses : TheMrMilchmann/setup-msvc-dev@48edcef51a12c80d7e62ace57aae1417795e511c # v3.0.0
274
- with :
275
- arch : x64
276
- toolset : 14.38.33130
208
+ - name : Checkout
209
+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
277
210
278
- - name : Configure build
279
- run : >
280
- cmake
281
- -B ${{env.BUILD_DIR}}
282
- ${{matrix.toolset}}
283
- -DCMAKE_C_COMPILER=${{matrix.compiler.c}}
284
- -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
285
- -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
286
- -DUMF_ENABLE_POOL_TRACKING=${{matrix.pool_tracking}}
287
- -DUMF_FORMAT_CODE_STYLE=OFF
288
- -DUMF_DEVELOPER_MODE=ON
289
- -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
290
- -DUSE_ASAN=${{matrix.sanitizers.asan}}
291
- -DUMF_BUILD_OS_MEMORY_PROVIDER=${{matrix.os_provider}}
211
+ - name : Configure build
212
+ run : >
213
+ cmake
214
+ -B ${{env.BUILD_DIR}}
215
+ ${{matrix.toolset}}
216
+ -DCMAKE_C_COMPILER=${{matrix.compiler.c}}
217
+ -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
218
+ -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
219
+ -DUMF_ENABLE_POOL_TRACKING=${{matrix.pool_tracking}}
220
+ -DUMF_FORMAT_CODE_STYLE=OFF
221
+ -DUMF_DEVELOPER_MODE=ON
222
+ -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
223
+ -DUMF_BUILD_OS_MEMORY_PROVIDER=${{matrix.os_provider}}
292
224
293
- - name : Build UMF
294
- run : cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS
225
+ - name : Build UMF
226
+ run : cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS
295
227
296
- - name : Test
297
- working-directory : ${{env.BUILD_DIR}}
298
- run : ctest -C ${{matrix.build_type}} --output-on-failure
228
+ - name : Run tests
229
+ working-directory : ${{env.BUILD_DIR}}
230
+ run : ctest -C ${{matrix.build_type}} --output-on-failure
299
231
300
232
macos-build :
301
- name : Build - MacOS
233
+ name : MacOS
302
234
strategy :
303
- matrix :
304
- os : ['macos-12', 'macos-13']
235
+ matrix :
236
+ os : ['macos-12', 'macos-13']
305
237
runs-on : ${{matrix.os}}
306
238
307
239
steps :
308
- - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
240
+ - name : Checkout
241
+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
309
242
310
- - name : Install Python requirements
311
- run : python3 -m pip install -r third_party/requirements.txt
243
+ - name : Install Python requirements
244
+ run : python3 -m pip install -r third_party/requirements.txt
312
245
313
- - name : Configure build
314
- run : >
315
- cmake
316
- -B ${{env.BUILD_DIR}}
317
- -DCMAKE_BUILD_TYPE=Release
318
- -DUMF_FORMAT_CODE_STYLE=OFF
319
- -DUMF_DEVELOPER_MODE=ON
320
- -DUMF_ENABLE_POOL_TRACKING=ON
246
+ - name : Configure build
247
+ run : >
248
+ cmake
249
+ -B ${{env.BUILD_DIR}}
250
+ -DCMAKE_BUILD_TYPE=Release
251
+ -DUMF_FORMAT_CODE_STYLE=OFF
252
+ -DUMF_DEVELOPER_MODE=ON
253
+ -DUMF_ENABLE_POOL_TRACKING=ON
321
254
322
- - name : Build UMF
323
- run : |
324
- cmake --build ${{env.BUILD_DIR}} -j $(sysctl -n hw.logicalcpu)
255
+ - name : Build UMF
256
+ run : cmake --build ${{env.BUILD_DIR}} -j $(sysctl -n hw.logicalcpu)
0 commit comments