Skip to content

Commit d1eca21

Browse files
authored
Merge pull request #239 from lukaszstolarczuk/ci-workflows-update
[CI] Update and extend workflows
2 parents b9cf873 + 3958fdd commit d1eca21

File tree

10 files changed

+460
-349
lines changed

10 files changed

+460
-349
lines changed

.github/workflows/basic.yml

Lines changed: 87 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Builds project (with various compilers, CMake options, etc.) and runs tests
12
name: BasicBuilds
23

34
on: workflow_call
@@ -11,15 +12,15 @@ permissions:
1112

1213
jobs:
1314
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
1517
strategy:
1618
matrix:
1719
build_type: [Debug, Release]
1820
compiler: [{c: icx, cxx: icpx}]
1921
pool_tracking: ['ON', 'OFF']
2022
shared_library: ['OFF']
2123
os_provider: ['ON']
22-
sanitizers: [{asan: OFF, ubsan: OFF, tsan: OFF}]
2324
runs-on: ubuntu-22.04
2425
container:
2526
image: intel/oneapi:latest
@@ -52,19 +53,14 @@ jobs:
5253
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
5354
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
5455
-DUMF_BUILD_LIBUMF_POOL_SCALABLE=ON
55-
-DUSE_ASAN=${{matrix.sanitizers.asan}}
56-
-DUSE_UBSAN=${{matrix.sanitizers.ubsan}}
57-
-DUSE_TSAN=${{matrix.sanitizers.tsan}}
5856
-DUMF_BUILD_EXAMPLES=ON
5957
6058
- name: Build UMF
61-
run: |
62-
cmake --build build -j $(nproc)
59+
run: cmake --build build -j $(nproc)
6360

6461
- name: Run tests
6562
working-directory: ${{github.workspace}}/build
66-
run: |
67-
ctest --output-on-failure --test-dir test
63+
run: ctest --output-on-failure --test-dir test
6864

6965
- name: Test make install
7066
# Run only when the example is built
@@ -80,7 +76,7 @@ jobs:
8076
run: ${{github.workspace}}/test/test_make_uninstall.sh ${{github.workspace}} ${{env.BUILD_DIR}} ${{env.INSTL_DIR}}
8177

8278
ubuntu-build:
83-
name: Build - Ubuntu
79+
name: Ubuntu
8480
strategy:
8581
matrix:
8682
os: ['ubuntu-20.04', 'ubuntu-22.04']
@@ -89,7 +85,6 @@ jobs:
8985
pool_tracking: ['ON', 'OFF']
9086
shared_library: ['OFF']
9187
os_provider: ['ON']
92-
sanitizers: [{asan: OFF, ubsan: OFF, tsan: OFF}]
9388
include:
9489
- os: 'ubuntu-20.04'
9590
build_type: Release
@@ -123,106 +118,69 @@ jobs:
123118
compiler: {c: gcc, cxx: g++}
124119
shared_library: 'OFF'
125120
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}
156121
runs-on: ${{matrix.os}}
157122

158123
steps:
159-
- name: Checkout
160-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
124+
- name: Checkout
125+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
161126

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
166131
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}}
171135

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
191152
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)
195155

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
200159

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}}
208167

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}}
215174

216175
windows-build:
217-
name: Build - Windows
176+
name: Windows
218177
strategy:
219178
matrix:
220179
os: ['windows-2019', 'windows-2022']
221180
build_type: [Debug, Release]
222181
compiler: [{c: cl, cxx: cl}]
223182
pool_tracking: ['ON', 'OFF']
224183
shared_library: ['OFF']
225-
sanitizers: [{asan: OFF}]
226184
os_provider: ['ON']
227185
include:
228186
- os: 'windows-2022'
@@ -243,82 +201,56 @@ jobs:
243201
pool_tracking: 'ON'
244202
shared_library: 'ON'
245203
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}
260204

261205
runs-on: ${{matrix.os}}
262206

263207
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
277210

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}}
292224
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
295227

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
299231

300232
macos-build:
301-
name: Build - MacOS
233+
name: MacOS
302234
strategy:
303-
matrix:
304-
os: ['macos-12', 'macos-13']
235+
matrix:
236+
os: ['macos-12', 'macos-13']
305237
runs-on: ${{matrix.os}}
306238

307239
steps:
308-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
240+
- name: Checkout
241+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
309242

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
312245

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
321254
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)

.github/workflows/benchmarks.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Executes benchmarks implemented in this repository
12
name: Benchmarks
23

34
on: workflow_call
@@ -6,9 +7,8 @@ permissions:
67
contents: read
78

89
jobs:
9-
ubuntu-build:
10-
name: Build - Ubuntu
11-
10+
benchmarks-ubuntu:
11+
name: Ubuntu
1212
strategy:
1313
matrix:
1414
os: ['ubuntu-22.04']
@@ -49,9 +49,9 @@ jobs:
4949

5050
- name: Run benchmarks
5151
working-directory: ${{github.workspace}}/build
52-
# The benchmark of TBB pool manager run on CI very often fails
53-
# with the "confidence interval exceeds maximum permitted 2.5%" error,
54-
# so do not treat that as an error, but succeed in this case.
52+
# The benchmark of TBB pool manager fails very often with the
53+
# "confidence interval exceeds maximum permitted 2.5%" error.
54+
# Do not treat that as a failure in CI.
5555
run: |
5656
export LOG=/tmp/ubench.log
5757
if ! ./benchmark/ubench 2>/dev/null > $LOG; then \

0 commit comments

Comments
 (0)