10
10
permissions :
11
11
contents : read
12
12
13
+ env :
14
+ BUILD_DIR : " ${{github.workspace}}/build"
15
+
13
16
jobs :
14
17
fuzz-test :
15
18
name : Fuzz test
@@ -88,18 +91,16 @@ jobs:
88
91
- name : Run tests under valgrind
89
92
run : ${{github.workspace}}/test/test_valgrind.sh ${{github.workspace}} ${{github.workspace}}/build ${{matrix.tool}}
90
93
91
- Windows-Ninja-cl :
92
- name : Windows-Ninja-cl
93
- env :
94
- 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"
95
- BUILD_DIR : " ${{github.workspace}}/build"
94
+ Windows-generators :
95
+ name : Windows ${{matrix.generator}} generator
96
96
strategy :
97
97
matrix :
98
98
os : ['windows-2019', 'windows-2022']
99
- build_type : [Debug, Release]
99
+ build_type : [Release]
100
100
compiler : [{c: cl, cxx: cl}]
101
101
shared_library : ['ON', 'OFF']
102
102
static_hwloc : ['ON', 'OFF']
103
+ generator : ['Ninja', 'NMake Makefiles']
103
104
104
105
runs-on : ${{matrix.os}}
105
106
@@ -109,8 +110,18 @@ jobs:
109
110
with :
110
111
fetch-depth : 0
111
112
113
+ - name : Set VCPKG_PATH with hwloc
114
+ if : matrix.static_hwloc == 'OFF'
115
+ run : echo "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'" >> $env:GITHUB_ENV
116
+
117
+ - name : Set VCPKG_PATH without hwloc
118
+ if : matrix.static_hwloc == 'ON'
119
+ run : echo "VCPKG_PATH='${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows'" >> $env:GITHUB_ENV
120
+
112
121
- name : Initialize vcpkg
113
122
uses : lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
123
+ env :
124
+ VCPKG_PATH : ${{env.VCPKG_PATH}}
114
125
with :
115
126
vcpkgGitCommitId : 3dd44b931481d7a8e9ba412621fa810232b66289
116
127
vcpkgDirectory : ${{env.BUILD_DIR}}/vcpkg
@@ -120,6 +131,7 @@ jobs:
120
131
run : vcpkg install
121
132
122
133
- name : Install Ninja
134
+ if : matrix.generator == 'Ninja'
123
135
uses : seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 # v5
124
136
125
137
- name : Configure MSVC environment
@@ -132,7 +144,7 @@ jobs:
132
144
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
133
145
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
134
146
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
135
- -G Ninja
147
+ -G "${{matrix.generator}}"
136
148
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
137
149
-DUMF_LINK_HWLOC_STATICALLY=${{matrix.static_hwloc}}
138
150
-DUMF_FORMAT_CODE_STYLE=OFF
@@ -151,71 +163,10 @@ jobs:
151
163
working-directory : ${{env.BUILD_DIR}}
152
164
run : ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
153
165
154
- Windows-NMake :
155
- name : Windows-NMake
156
- env :
157
- VCPKG_PATH : " ${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows"
158
- BUILD_DIR : " ${{github.workspace}}/build"
159
- strategy :
160
- matrix :
161
- os : ['windows-2019', 'windows-2022']
162
- build_type : [Debug, Release]
163
- compiler : [{c: cl, cxx: cl}]
164
- shared_library : ['ON', 'OFF']
165
-
166
- runs-on : ${{matrix.os}}
167
-
168
- steps :
169
- - name : Checkout
170
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
171
- with :
172
- fetch-depth : 0
173
-
174
- - name : Initialize vcpkg
175
- uses : lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
176
- with :
177
- vcpkgGitCommitId : 3dd44b931481d7a8e9ba412621fa810232b66289
178
- vcpkgDirectory : ${{env.BUILD_DIR}}/vcpkg
179
- vcpkgJsonGlob : ' **/vcpkg.json'
180
-
181
- - name : Install dependencies
182
- run : vcpkg install
183
-
184
- - name : Configure MSVC environment
185
- uses : ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
186
-
187
- - name : Configure build
188
- run : >
189
- cmake
190
- -B ${{env.BUILD_DIR}}
191
- -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
192
- -DCMAKE_C_COMPILER=${{matrix.compiler.c}}
193
- -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
194
- -G "NMake Makefiles"
195
- -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
196
- -DUMF_LINK_HWLOC_STATICALLY=ON
197
- -DUMF_FORMAT_CODE_STYLE=OFF
198
- -DUMF_DEVELOPER_MODE=ON
199
- -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
200
- -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
201
- -DUMF_BUILD_CUDA_PROVIDER=ON
202
- -DUMF_TESTS_FAIL_ON_SKIP=ON
203
-
204
- - name : Build UMF
205
- shell : cmd
206
- run : cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j %NUMBER_OF_PROCESSORS%
207
-
208
- - name : Run tests
209
- shell : cmd
210
- working-directory : ${{env.BUILD_DIR}}
211
- run : ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
212
-
213
-
214
166
icx :
215
167
name : ICX
216
168
env :
217
169
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"
218
- BUILD_DIR : " ${{github.workspace}}/build"
219
170
strategy :
220
171
matrix :
221
172
os : ['windows-2019', 'windows-2022']
@@ -297,6 +248,54 @@ jobs:
297
248
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
298
249
ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
299
250
251
+ hwloc-fallback :
252
+ # Scenarios where UMF_LINK_HWLOC_STATICALLY is set to OFF and hwloc is not installed in the system
253
+ # The hwloc library is fetched implicitly
254
+ name : " Fallback to static hwloc build"
255
+ strategy :
256
+ matrix :
257
+ include :
258
+ - os : ' ubuntu-latest'
259
+ build_type : Release
260
+ number_of_processors : ' $(nproc)'
261
+ - os : ' windows-latest'
262
+ build_type : Release
263
+ number_of_processors : ' $Env:NUMBER_OF_PROCESSORS'
264
+
265
+ runs-on : ${{matrix.os}}
266
+
267
+ steps :
268
+ - name : Install dependencies
269
+ if : matrix.os == 'ubuntu-latest'
270
+ run : sudo apt-get install -y libnuma-dev
271
+
272
+ - name : Checkout
273
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
274
+ with :
275
+ fetch-depth : 0
276
+
277
+ - name : Configure build
278
+ run : >
279
+ cmake
280
+ -B ${{env.BUILD_DIR}}
281
+ -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
282
+ -DUMF_BUILD_SHARED_LIBRARY=ON
283
+ -DUMF_BUILD_EXAMPLES=OFF
284
+ -DUMF_DEVELOPER_MODE=ON
285
+ -DUMF_LINK_HWLOC_STATICALLY=OFF
286
+ -DUMF_TESTS_FAIL_ON_SKIP=ON
287
+
288
+ - name : Build UMF
289
+ run : >
290
+ cmake
291
+ --build ${{env.BUILD_DIR}}
292
+ --config ${{matrix.build_type}}
293
+ -j ${{matrix.number_of_processors}}
294
+
295
+ - name : Run tests
296
+ working-directory : ${{env.BUILD_DIR}}
297
+ run : ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
298
+
300
299
L0 :
301
300
uses : ./.github/workflows/reusable_gpu.yml
302
301
with :
0 commit comments