@@ -3,10 +3,6 @@ name: BasicBuilds
3
3
4
4
on : workflow_call
5
5
6
- env :
7
- BUILD_DIR : " ${{github.workspace}}/build/"
8
- INSTL_DIR : " ${{github.workspace}}/build/install-dir"
9
-
10
6
permissions :
11
7
contents : read
12
8
21
17
pool_tracking : ['ON', 'OFF']
22
18
shared_library : ['OFF']
23
19
os_provider : ['ON']
20
+ env :
21
+ BUILD_DIR : " ${{github.workspace}}/build/"
22
+ INSTL_DIR : " ${{github.workspace}}/../install-dir"
23
+
24
24
runs-on : ubuntu-22.04
25
25
container :
26
26
image : intel/oneapi:latest
@@ -63,18 +63,20 @@ jobs:
63
63
working-directory : ${{github.workspace}}/build
64
64
run : ctest --output-on-failure --test-dir test
65
65
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' || '' }}
78
80
79
81
ubuntu-build :
80
82
name : Ubuntu
@@ -140,6 +142,9 @@ jobs:
140
142
os_provider : ' ON'
141
143
pool_tracking : ' ON'
142
144
level_zero_provider : ' OFF'
145
+ env :
146
+ BUILD_DIR : " ${{github.workspace}}/build/"
147
+ INSTL_DIR : " ${{github.workspace}}/../install-dir"
143
148
runs-on : ${{matrix.os}}
144
149
145
150
steps :
@@ -180,25 +185,27 @@ jobs:
180
185
working-directory : ${{env.BUILD_DIR}}
181
186
run : ctest --output-on-failure --test-dir test
182
187
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' || '' }}
197
202
198
203
windows-build :
199
204
name : Windows
200
205
env :
201
206
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"
202
209
strategy :
203
210
matrix :
204
211
os : ['windows-2019', 'windows-2022']
@@ -227,7 +234,6 @@ jobs:
227
234
pool_tracking : ' ON'
228
235
shared_library : ' ON'
229
236
os_provider : ' OFF'
230
-
231
237
runs-on : ${{matrix.os}}
232
238
233
239
steps :
@@ -270,11 +276,30 @@ jobs:
270
276
working-directory : ${{env.BUILD_DIR}}
271
277
run : ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
272
278
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
+
273
294
macos-build :
274
295
name : MacOS
275
296
strategy :
276
297
matrix :
277
298
os : ['macos-12', 'macos-13']
299
+ env :
300
+ BUILD_DIR : " ${{github.workspace}}/build/"
301
+ INSTL_DIR : " ${{github.workspace}}/../install-dir"
302
+ BUILD_TYPE : " Release"
278
303
runs-on : ${{matrix.os}}
279
304
280
305
steps :
@@ -288,7 +313,7 @@ jobs:
288
313
run : >
289
314
cmake
290
315
-B ${{env.BUILD_DIR}}
291
- -DCMAKE_BUILD_TYPE=Release
316
+ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
292
317
-DUMF_FORMAT_CODE_STYLE=OFF
293
318
-DUMF_DEVELOPER_MODE=ON
294
319
-DUMF_ENABLE_POOL_TRACKING=ON
@@ -299,3 +324,10 @@ jobs:
299
324
300
325
- name : Build UMF
301
326
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