Skip to content

Commit f8cf8ad

Browse files
Merge pull request #306 from PatKamin/install-tests-windows
Test installation of UMF on all OSes
2 parents dd2430c + b267503 commit f8cf8ad

File tree

6 files changed

+365
-222
lines changed

6 files changed

+365
-222
lines changed

.github/workflows/basic.yml

Lines changed: 64 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ name: BasicBuilds
33

44
on: workflow_call
55

6-
env:
7-
BUILD_DIR : "${{github.workspace}}/build/"
8-
INSTL_DIR : "${{github.workspace}}/build/install-dir"
9-
106
permissions:
117
contents: read
128

@@ -21,6 +17,10 @@ jobs:
2117
pool_tracking: ['ON', 'OFF']
2218
shared_library: ['OFF']
2319
os_provider: ['ON']
20+
env:
21+
BUILD_DIR : "${{github.workspace}}/build/"
22+
INSTL_DIR : "${{github.workspace}}/../install-dir"
23+
2424
runs-on: ubuntu-22.04
2525
container:
2626
image: intel/oneapi:latest
@@ -63,18 +63,20 @@ jobs:
6363
working-directory: ${{github.workspace}}/build
6464
run: ctest --output-on-failure --test-dir test
6565

66-
- name: Test make install
67-
# Run only when the example is built
68-
if: matrix.os_provider == 'ON' && matrix.pool_tracking == 'ON'
69-
working-directory: ${{env.BUILD_DIR}}
70-
run: ${{github.workspace}}/test/test_make_install.sh \
71-
${{github.workspace}} ${{env.BUILD_DIR}} ${{env.INSTL_DIR}} ${{matrix.build_type}} ${{matrix.shared_library}}
72-
73-
- name: Test make uninstall
74-
# Run only when the example is built
75-
if: matrix.os_provider == 'ON' && matrix.pool_tracking == 'ON'
76-
working-directory: ${{env.BUILD_DIR}}
77-
run: ${{github.workspace}}/test/test_make_uninstall.sh ${{github.workspace}} ${{env.BUILD_DIR}} ${{env.INSTL_DIR}}
66+
- name: Test UMF installation and uninstallation
67+
# The '--shared-library' parameter is added to the installation test when the UMF is built as a shared library
68+
# OS provider, pool tracking and scalable pool (always ON in this job) has to be enabled for the basic example to be built
69+
# The '--examples' parameter is added to the installation test when examples are built
70+
run: >
71+
python3 ${{github.workspace}}/test/test_installation.py
72+
--build-dir ${{env.BUILD_DIR}}
73+
--install-dir ${{env.INSTL_DIR}}
74+
--build-type ${{matrix.build_type}}
75+
--disjoint-pool
76+
--jemalloc-pool
77+
--scalable-pool
78+
${{ matrix.shared_library == 'ON' && '--shared-library' || ''}}
79+
${{ (matrix.os_provider == 'ON' && matrix.pool_tracking == 'ON') && '--examples' || '' }}
7880
7981
ubuntu-build:
8082
name: Ubuntu
@@ -140,6 +142,9 @@ jobs:
140142
os_provider: 'ON'
141143
pool_tracking: 'ON'
142144
level_zero_provider: 'OFF'
145+
env:
146+
BUILD_DIR : "${{github.workspace}}/build/"
147+
INSTL_DIR : "${{github.workspace}}/../install-dir"
143148
runs-on: ${{matrix.os}}
144149

145150
steps:
@@ -180,25 +185,27 @@ jobs:
180185
working-directory: ${{env.BUILD_DIR}}
181186
run: ctest --output-on-failure --test-dir test
182187

183-
- name: Test make install
184-
# Run only when the example is built
185-
# TODO: Modify installation test to accept output varying with build options
186-
if: matrix.os_provider == 'ON' && matrix.pool_tracking == 'ON'
187-
working-directory: ${{env.BUILD_DIR}}
188-
run: ${{github.workspace}}/test/test_make_install.sh \
189-
${{github.workspace}} ${{env.BUILD_DIR}} ${{env.INSTL_DIR}} ${{matrix.build_type}} ${{matrix.shared_library}}
190-
191-
- name: Test make uninstall
192-
# Run only when the example is built
193-
# TODO: Modify installation test to accept output varying with build options
194-
if: matrix.os_provider == 'ON' && matrix.pool_tracking == 'ON'
195-
working-directory: ${{env.BUILD_DIR}}
196-
run: ${{github.workspace}}/test/test_make_uninstall.sh ${{github.workspace}} ${{env.BUILD_DIR}} ${{env.INSTL_DIR}}
188+
- name: Test UMF installation and uninstallation
189+
# The '--shared-library' parameter is added to the installation test when the UMF is built as a shared library
190+
# OS provider, pool tracking and scalable pool (always ON in this job) has to be enabled for the basic example to be built
191+
# The '--examples' parameter is added to the installation test when examples are built
192+
run: >
193+
python3 ${{github.workspace}}/test/test_installation.py
194+
--build-dir ${{env.BUILD_DIR}}
195+
--install-dir ${{env.INSTL_DIR}}
196+
--build-type ${{matrix.build_type}}
197+
--disjoint-pool
198+
--jemalloc-pool
199+
--scalable-pool
200+
${{ matrix.shared_library == 'ON' && '--shared-library' || '' }}
201+
${{ (matrix.os_provider == 'ON' && matrix.pool_tracking == 'ON') && '--examples' || '' }}
197202
198203
windows-build:
199204
name: Windows
200205
env:
201206
VCPKG_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows"
207+
BUILD_DIR : "${{github.workspace}}/build/${{matrix.build_type}}"
208+
INSTL_DIR : "${{github.workspace}}/../install-dir"
202209
strategy:
203210
matrix:
204211
os: ['windows-2019', 'windows-2022']
@@ -227,7 +234,6 @@ jobs:
227234
pool_tracking: 'ON'
228235
shared_library: 'ON'
229236
os_provider: 'OFF'
230-
231237
runs-on: ${{matrix.os}}
232238

233239
steps:
@@ -270,11 +276,30 @@ jobs:
270276
working-directory: ${{env.BUILD_DIR}}
271277
run: ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
272278

279+
- name: Test UMF installation and uninstallation
280+
# The '--shared-library' parameter is added to the installation test when the UMF is built as a shared library
281+
# OS provider, pool tracking and scalable pool (always ON in this job) has to be enabled for the basic example to be built
282+
# The '--examples' parameter is added to the installation test when examples are built
283+
run: >
284+
python3 ${{github.workspace}}/test/test_installation.py
285+
--build-dir ${{env.BUILD_DIR}}
286+
--install-dir ${{env.INSTL_DIR}}
287+
--build-type ${{matrix.build_type}}
288+
--disjoint-pool
289+
--jemalloc-pool
290+
--scalable-pool
291+
${{ matrix.shared_library == 'ON' && '--shared-library' || ''}}
292+
${{ (matrix.os_provider == 'ON' && matrix.pool_tracking == 'ON') && '--examples' || '' }}
293+
273294
macos-build:
274295
name: MacOS
275296
strategy:
276297
matrix:
277298
os: ['macos-12', 'macos-13']
299+
env:
300+
BUILD_DIR : "${{github.workspace}}/build/"
301+
INSTL_DIR : "${{github.workspace}}/../install-dir"
302+
BUILD_TYPE : "Release"
278303
runs-on: ${{matrix.os}}
279304

280305
steps:
@@ -288,7 +313,7 @@ jobs:
288313
run: >
289314
cmake
290315
-B ${{env.BUILD_DIR}}
291-
-DCMAKE_BUILD_TYPE=Release
316+
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
292317
-DUMF_FORMAT_CODE_STYLE=OFF
293318
-DUMF_DEVELOPER_MODE=ON
294319
-DUMF_ENABLE_POOL_TRACKING=ON
@@ -299,3 +324,10 @@ jobs:
299324
300325
- name: Build UMF
301326
run: cmake --build ${{env.BUILD_DIR}} -j $(sysctl -n hw.logicalcpu)
327+
328+
- name: Test UMF installation and uninstallation
329+
run: >
330+
python3 ${{github.workspace}}/test/test_installation.py
331+
--build-dir ${{env.BUILD_DIR}}
332+
--install-dir ${{env.INSTL_DIR}}
333+
--build-type ${{env.BUILD_TYPE}}

0 commit comments

Comments
 (0)