@@ -23,10 +23,10 @@ jobs:
23
23
- name : Install apt packages
24
24
run : |
25
25
sudo apt-get update
26
- sudo apt-get install -y clang cmake libnuma-dev libtbb-dev
26
+ sudo apt-get install -y clang cmake hwloc libnuma-dev libtbb-dev
27
27
28
28
- name : Checkout "tag" UMF version
29
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
29
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30
30
with :
31
31
fetch-depth : 0
32
32
ref : refs/tags/${{inputs.tag}}
@@ -36,61 +36,66 @@ jobs:
36
36
working-directory : ${{github.workspace}}/tag_version
37
37
run : .github/scripts/install_hwloc.sh
38
38
39
- - name : Configure "tag" UMF build
40
- working-directory : ${{github.workspace}}/tag_version
39
+ - name : Checkout latest UMF version
40
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
41
+ with :
42
+ fetch-depth : 0
43
+ path : ${{github.workspace}}/latest_version
44
+
45
+ - name : Configure latest UMF build
46
+ working-directory : ${{github.workspace}}/latest_version
41
47
run : >
42
48
cmake
43
- -B ${{github.workspace}}/tag_version/build
49
+ -B ${{github.workspace}}/latest_version/build
50
+ -DCMAKE_INSTALL_PREFIX=_install
44
51
-DCMAKE_BUILD_TYPE=Debug
45
52
-DUMF_BUILD_SHARED_LIBRARY=ON
46
53
-DCMAKE_C_COMPILER=gcc
47
54
-DCMAKE_CXX_COMPILER=g++
48
- -DUMF_BUILD_TESTS=ON
49
- -DUMF_BUILD_EXAMPLES=ON
55
+ -DUMF_BUILD_TESTS=OFF
50
56
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
51
57
-DUMF_BUILD_CUDA_PROVIDER=ON
52
58
-DUMF_FORMAT_CODE_STYLE=OFF
53
59
-DUMF_DEVELOPER_MODE=ON
54
60
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
55
- -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
56
- -DUMF_TESTS_FAIL_ON_SKIP=ON
57
-
58
- - name : Build "tag" UMF
59
- working-directory : ${{github.workspace}}/tag_version
60
- run : |
61
- cmake --build ${{github.workspace}}/tag_version/build -j $(nproc)
62
61
63
- - name : Run "tag" UMF tests
64
- working-directory : ${{github.workspace}}/tag_version/build
62
+ - name : Build latest UMF
63
+ working-directory : ${{github.workspace}}/latest_version
65
64
run : |
66
- LD_LIBRARY_PATH=${{github.workspace}}/tag_version/build/lib/ ctest --output-on-failure
67
-
68
- - name : Checkout latest UMF version
69
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
70
- with :
71
- fetch-depth : 0
72
- path : ${{github.workspace}}/latest_version
65
+ cmake --build ${{github.workspace}}/latest_version/build -j $(nproc)
73
66
74
- - name : Configure latest UMF build
67
+ - name : Install latest UMF
75
68
working-directory : ${{github.workspace}}/latest_version
69
+ run : sudo cmake --install ${{github.workspace}}/latest_version/build --config Debug
70
+
71
+ - name : Configure "tag" UMF build
72
+ working-directory : ${{github.workspace}}/tag_version
76
73
run : >
77
74
cmake
78
- -B ${{github.workspace}}/latest_version /build
75
+ -B ${{github.workspace}}/tag_version /build
79
76
-DCMAKE_BUILD_TYPE=Debug
80
77
-DUMF_BUILD_SHARED_LIBRARY=ON
81
78
-DCMAKE_C_COMPILER=gcc
82
79
-DCMAKE_CXX_COMPILER=g++
83
- -DUMF_BUILD_TESTS=OFF
80
+ -DUMF_BUILD_TESTS=ON
81
+ -DUMF_BUILD_EXAMPLES=ON
84
82
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
85
83
-DUMF_BUILD_CUDA_PROVIDER=ON
86
84
-DUMF_FORMAT_CODE_STYLE=OFF
87
85
-DUMF_DEVELOPER_MODE=ON
88
86
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
87
+ -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
88
+ -DUMF_TESTS_FAIL_ON_SKIP=ON
89
89
90
- - name : Build latest UMF
91
- working-directory : ${{github.workspace}}/latest_version
90
+ - name : Build "tag" UMF
91
+ working-directory : ${{github.workspace}}/tag_version
92
92
run : |
93
- cmake --build ${{github.workspace}}/latest_version/build -j $(nproc)
93
+ cmake --build ${{github.workspace}}/tag_version/build -j $(nproc)
94
+
95
+ - name : Run "tag" UMF tests
96
+ working-directory : ${{github.workspace}}/tag_version/build
97
+ run : |
98
+ LD_LIBRARY_PATH=${{github.workspace}}/tag_version/build/lib/ ctest --output-on-failure
94
99
95
100
- name : Run "tag" UMF tests with latest UMF libs (warnings enabled)
96
101
working-directory : ${{github.workspace}}/tag_version/build
@@ -103,15 +108,37 @@ jobs:
103
108
GTEST_FILTER="-*umfIpcTest.GetPoolByOpenedHandle*"
104
109
ctest --verbose -E "umf-mempolicy"
105
110
111
+ # Browse all folders in the examples directory, build them using the
112
+ # latest UMF version, and run them, excluding those in the exclude list.
113
+ - name : Build and run "tag" examples using the latest UMF libraries
114
+ working-directory : ${{github.workspace}}/tag_version
115
+ run : |
116
+ EXAMPLES_EXCLUDE_LIST="cmake|common|hmat|level_zero|cuda"
117
+ rm -rf build
118
+ rm -rf include
119
+ mkdir _examples
120
+ cd _examples
121
+ EXAMPLES_LIST=$(find ${{github.workspace}}/tag_version/examples -maxdepth 1 -mindepth 1 -type d | grep -Ev $EXAMPLES_EXCLUDE_LIST | xargs -n 1 basename)
122
+ for EXAMPLE_NAME in $EXAMPLES_LIST; do
123
+ cd ${{github.workspace}}/tag_version
124
+ mkdir -p _examples/$EXAMPLE_NAME;
125
+ cd _examples/$EXAMPLE_NAME;
126
+ echo "Building example: $EXAMPLE_NAME"
127
+ CMAKE_PREFIX_PATH=${{github.workspace}}/latest_version/_install cmake ${{github.workspace}}/tag_version/examples/$EXAMPLE_NAME;
128
+ make;
129
+ find . -maxdepth 1 -type f -executable -exec echo "Running example: {}" \; -exec {} \;
130
+ done
131
+
106
132
windows :
107
133
name : Windows
108
134
env :
109
135
VCPKG_PATH : " ${{github.workspace}}/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/vcpkg/packages/jemalloc_x64-windows"
136
+ VCPKG_BIN_PATH : " ${{github.workspace}}/vcpkg/packages/hwloc_x64-windows/bin;${{github.workspace}}/vcpkg/packages/tbb_x64-windows/bin;${{github.workspace}}/vcpkg/packages/jemalloc_x64-windows/bin"
110
137
runs-on : " windows-2022"
111
138
112
139
steps :
113
140
- name : Checkout "tag" UMF version
114
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
141
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
115
142
with :
116
143
fetch-depth : 0
117
144
ref : refs/tags/${{inputs.tag}}
@@ -130,56 +157,61 @@ jobs:
130
157
run : vcpkg install --triplet x64-windows
131
158
shell : pwsh # Specifies PowerShell as the shell for running the script.
132
159
133
- - name : Configure "tag" UMF build
134
- working-directory : ${{github.workspace}}/tag_version
160
+ - name : Checkout latest UMF version
161
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
162
+ with :
163
+ fetch-depth : 0
164
+ path : ${{github.workspace}}/latest_version
165
+
166
+ - name : Configure latest UMF build
167
+ working-directory : ${{github.workspace}}/latest_version
135
168
run : >
136
169
cmake
137
- -B "${{github.workspace}}/tag_version /build"
170
+ -B "${{github.workspace}}/latest_version /build"
138
171
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
172
+ -DCMAKE_INSTALL_PREFIX=_install
139
173
-DCMAKE_C_COMPILER=cl
140
174
-DCMAKE_CXX_COMPILER=cl
141
175
-DUMF_BUILD_SHARED_LIBRARY=ON
142
- -DUMF_BUILD_TESTS=ON
143
- -DUMF_BUILD_EXAMPLES=ON
176
+ -DUMF_BUILD_TESTS=OFF
144
177
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
145
178
-DUMF_BUILD_CUDA_PROVIDER=ON
146
179
-DUMF_FORMAT_CODE_STYLE=OFF
147
180
-DUMF_DEVELOPER_MODE=ON
148
181
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
149
- -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
150
- -DUMF_TESTS_FAIL_ON_SKIP=ON
151
-
152
- - name : Build "tag" UMF
153
- run : cmake --build "${{github.workspace}}/tag_version/build" --config Debug -j $Env:NUMBER_OF_PROCESSORS
154
-
155
- - name : Run "tag" UMF tests
156
- working-directory : " ${{github.workspace}}/tag_version/build"
157
- run : ctest -C Debug --output-on-failure --test-dir test
158
182
159
- - name : Checkout latest UMF version
160
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
161
- with :
162
- fetch-depth : 0
163
- path : ${{github.workspace}}/latest_version
183
+ - name : Build latest UMF
184
+ run : cmake --build "${{github.workspace}}/latest_version/build" --config Debug -j $Env:NUMBER_OF_PROCESSORS
164
185
165
- - name : Configure latest UMF build
186
+ - name : Install latest UMF
166
187
working-directory : ${{github.workspace}}/latest_version
188
+ run : cmake --install ${{github.workspace}}/latest_version/build --config Debug
189
+
190
+ - name : Configure "tag" UMF build
191
+ working-directory : ${{github.workspace}}/tag_version
167
192
run : >
168
193
cmake
169
- -B "${{github.workspace}}/latest_version /build"
194
+ -B "${{github.workspace}}/tag_version /build"
170
195
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
171
196
-DCMAKE_C_COMPILER=cl
172
197
-DCMAKE_CXX_COMPILER=cl
173
198
-DUMF_BUILD_SHARED_LIBRARY=ON
174
- -DUMF_BUILD_TESTS=OFF
199
+ -DUMF_BUILD_TESTS=ON
200
+ -DUMF_BUILD_EXAMPLES=ON
175
201
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
176
202
-DUMF_BUILD_CUDA_PROVIDER=ON
177
203
-DUMF_FORMAT_CODE_STYLE=OFF
178
204
-DUMF_DEVELOPER_MODE=ON
179
205
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
206
+ -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
207
+ -DUMF_TESTS_FAIL_ON_SKIP=ON
180
208
181
- - name : Build latest UMF
182
- run : cmake --build "${{github.workspace}}/latest_version/build" --config Debug -j $Env:NUMBER_OF_PROCESSORS
209
+ - name : Build "tag" UMF
210
+ run : cmake --build "${{github.workspace}}/tag_version/build" --config Debug -j $Env:NUMBER_OF_PROCESSORS
211
+
212
+ - name : Run "tag" UMF tests
213
+ working-directory : " ${{github.workspace}}/tag_version/build"
214
+ run : ctest -C Debug --output-on-failure --test-dir test
183
215
184
216
- name : Run "tag" UMF tests with latest UMF libs (warnings enabled)
185
217
working-directory : ${{github.workspace}}/tag_version/build
@@ -191,6 +223,48 @@ jobs:
191
223
cp ${{github.workspace}}/latest_version/build/bin/Debug/umf.dll ${{github.workspace}}/tag_version/build/bin/Debug/umf.dll
192
224
ctest -C Debug --verbose
193
225
226
+ # Browse all folders in the examples directory, build them using the
227
+ # latest UMF version, and run them, excluding those in the exclude list.
228
+ - name : Build and run "tag" examples using the latest UMF libraries
229
+ working-directory : ${{github.workspace}}/tag_version
230
+ run : |
231
+ $ErrorActionPreference = "Stop"
232
+ $EXAMPLES_EXCLUDE_LIST = "cmake|common|hmat|level_zero|cuda|custom|ipc|numa"
233
+ Set-Location "${{github.workspace}}/tag_version"
234
+ Remove-Item -Recurse -ErrorAction Ignore -Force build, include
235
+ New-Item -ItemType Directory -Path _examples
236
+ Set-Location -Path _examples
237
+ $EXAMPLES_LIST = Get-ChildItem -Path "${{github.workspace}}/tag_version/examples" -Directory | Where-Object { $_.Name -notmatch $EXAMPLES_EXCLUDE_LIST } | ForEach-Object { $_.Name }
238
+ # NOTE: we add our paths at the beginning of the PATH variable because
239
+ # there is a limit on the size of the PATH variable in Windows
240
+ $env:Path = "${{github.workspace}}/latest_version/_install/bin;${{env.VCPKG_BIN_PATH}};$env:Path"
241
+ foreach ($EXAMPLE_NAME in $EXAMPLES_LIST) {
242
+ Set-Location -Path "${{github.workspace}}/tag_version"
243
+ New-Item -ItemType Directory -Path "_examples/$EXAMPLE_NAME"
244
+ Set-Location -Path "_examples/$EXAMPLE_NAME"
245
+ Write-Output "`nBuilding example: $EXAMPLE_NAME"
246
+ cmake -DCMAKE_PREFIX_PATH="${{github.workspace}}/latest_version/_install;${{env.VCPKG_PATH}}" "${{github.workspace}}/tag_version/examples/$EXAMPLE_NAME"
247
+ cmake --build .
248
+ Set-Location -Path Debug
249
+ Write-Output "`nRunning example: $EXAMPLE_NAME"
250
+ $exeFiles = Get-ChildItem -Filter *.exe
251
+ if ($exeFiles.Count -eq 0) {
252
+ Write-Error "No executable files found in the current directory."
253
+ exit 1
254
+ }
255
+ foreach ($exeFile in $exeFiles) {
256
+ Write-Output "Running: $($exeFile.FullName)"
257
+ & $exeFile.FullName
258
+ if ($LASTEXITCODE -ne 0) {
259
+ $unsignedExitCode = [Convert]::ToInt32($LASTEXITCODE)
260
+ # Format the error code as a hexadecimal string
261
+ $hexErrorCode = [Convert]::ToString($unsignedExitCode, 16).ToUpper()
262
+ Write-Output "error 0x$hexErrorCode"
263
+ exit $LASTEXITCODE
264
+ }
265
+ }
266
+ }
267
+
194
268
gpu :
195
269
name : GPU Ubuntu
196
270
# run only on upstream; forks will not have the HW
@@ -201,8 +275,40 @@ jobs:
201
275
runs-on : ["DSS-${{matrix.provider}}", "DSS-UBUNTU"]
202
276
203
277
steps :
278
+ - name : Checkout latest UMF version
279
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
280
+ with :
281
+ fetch-depth : 0
282
+ path : ${{github.workspace}}/latest_version
283
+
284
+ - name : Configure latest UMF build
285
+ working-directory : ${{github.workspace}}/latest_version
286
+ run : >
287
+ cmake
288
+ -B ${{github.workspace}}/latest_version/build
289
+ -DCMAKE_INSTALL_PREFIX=_install
290
+ -DCMAKE_BUILD_TYPE=Debug
291
+ -DUMF_BUILD_SHARED_LIBRARY=ON
292
+ -DCMAKE_C_COMPILER=gcc
293
+ -DCMAKE_CXX_COMPILER=g++
294
+ -DUMF_BUILD_TESTS=OFF
295
+ -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
296
+ -DUMF_BUILD_CUDA_PROVIDER=ON
297
+ -DUMF_FORMAT_CODE_STYLE=OFF
298
+ -DUMF_DEVELOPER_MODE=ON
299
+ -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
300
+
301
+ - name : Build latest UMF
302
+ working-directory : ${{github.workspace}}/latest_version
303
+ run : |
304
+ cmake --build ${{github.workspace}}/latest_version/build -j $(nproc)
305
+
306
+ - name : Install latest UMF
307
+ working-directory : ${{github.workspace}}/latest_version
308
+ run : cmake --install ${{github.workspace}}/latest_version/build --config Debug
309
+
204
310
- name : Checkout "tag" UMF version
205
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
311
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
206
312
with :
207
313
fetch-depth : 0
208
314
ref : refs/tags/${{inputs.tag}}
@@ -242,33 +348,6 @@ jobs:
242
348
GTEST_FILTER="-*umfIpcTest.GetPoolByOpenedHandle*"
243
349
ctest --output-on-failure
244
350
245
- - name : Checkout latest UMF version
246
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
247
- with :
248
- fetch-depth : 0
249
- path : ${{github.workspace}}/latest_version
250
-
251
- - name : Configure latest UMF build
252
- working-directory : ${{github.workspace}}/latest_version
253
- run : >
254
- cmake
255
- -B ${{github.workspace}}/latest_version/build
256
- -DCMAKE_BUILD_TYPE=Debug
257
- -DUMF_BUILD_SHARED_LIBRARY=ON
258
- -DCMAKE_C_COMPILER=gcc
259
- -DCMAKE_CXX_COMPILER=g++
260
- -DUMF_BUILD_TESTS=OFF
261
- -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
262
- -DUMF_BUILD_CUDA_PROVIDER=ON
263
- -DUMF_FORMAT_CODE_STYLE=OFF
264
- -DUMF_DEVELOPER_MODE=ON
265
- -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
266
-
267
- - name : Build latest UMF
268
- working-directory : ${{github.workspace}}/latest_version
269
- run : |
270
- cmake --build ${{github.workspace}}/latest_version/build -j $(nproc)
271
-
272
351
- name : Run "tag" UMF tests with latest UMF libs (warnings enabled)
273
352
working-directory : ${{github.workspace}}/tag_version/build
274
353
# Disable incompatible tests:
@@ -280,3 +359,27 @@ jobs:
280
359
LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/
281
360
GTEST_FILTER="-*umfIpcTest.GetPoolByOpenedHandle*"
282
361
ctest --verbose -E "not_impl|umf-mempolicy"
362
+
363
+ # Browse all folders in the examples directory, build them using the
364
+ # latest UMF version, and run them, excluding those in the exclude list.
365
+ # NOTE: exclude cuda examples as they require linking with static disjoint
366
+ # pool library
367
+ - name : Build and run "tag" examples using the latest UMF libraries
368
+ working-directory : ${{github.workspace}}/tag_version
369
+ run : |
370
+ EXAMPLES_EXCLUDE_LIST="cmake|common|hmat|cuda${{matrix.provider == 'LEVEL_ZERO' && '' || '|level_zero' }}"
371
+ rm -rf build
372
+ rm -rf include
373
+ mkdir _examples
374
+ cd _examples
375
+ EXAMPLES_LIST=$(find ${{github.workspace}}/tag_version/examples -maxdepth 1 -mindepth 1 -type d | grep -Ev $EXAMPLES_EXCLUDE_LIST | xargs -n 1 basename)
376
+ for EXAMPLE_NAME in $EXAMPLES_LIST; do
377
+ cd ${{github.workspace}}/tag_version
378
+ mkdir -p _examples/$EXAMPLE_NAME;
379
+ cd _examples/$EXAMPLE_NAME;
380
+ echo "Building example: $EXAMPLE_NAME"
381
+ CMAKE_PREFIX_PATH=${{github.workspace}}/latest_version/_install cmake ${{github.workspace}}/tag_version/examples/$EXAMPLE_NAME;
382
+ find . -maxdepth 1 -type f -executable -exec echo "Running example: {}" \; -exec {} \;
383
+ done
384
+
385
+ # TODO add GPU windows
0 commit comments