1010permissions :
1111 contents : read
1212
13+ env :
14+ BUILD_DIR : " ${{github.workspace}}/build"
15+
1316jobs :
1417 fuzz-test :
1518 name : Fuzz test
@@ -88,18 +91,16 @@ jobs:
8891 - name : Run tests under valgrind
8992 run : ${{github.workspace}}/test/test_valgrind.sh ${{github.workspace}} ${{github.workspace}}/build ${{matrix.tool}}
9093
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
9696 strategy :
9797 matrix :
9898 os : ['windows-2019', 'windows-2022']
99- build_type : [Debug, Release]
99+ build_type : [Release]
100100 compiler : [{c: cl, cxx: cl}]
101101 shared_library : ['ON', 'OFF']
102102 static_hwloc : ['ON', 'OFF']
103+ generator : ['Ninja', 'NMake Makefiles']
103104
104105 runs-on : ${{matrix.os}}
105106
@@ -109,8 +110,18 @@ jobs:
109110 with :
110111 fetch-depth : 0
111112
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+
112121 - name : Initialize vcpkg
113122 uses : lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
123+ env :
124+ VCPKG_PATH : ${{env.VCPKG_PATH}}
114125 with :
115126 vcpkgGitCommitId : 3dd44b931481d7a8e9ba412621fa810232b66289
116127 vcpkgDirectory : ${{env.BUILD_DIR}}/vcpkg
@@ -120,6 +131,7 @@ jobs:
120131 run : vcpkg install
121132
122133 - name : Install Ninja
134+ if : matrix.generator == 'Ninja'
123135 uses : seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 # v5
124136
125137 - name : Configure MSVC environment
@@ -132,7 +144,7 @@ jobs:
132144 -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
133145 -DCMAKE_C_COMPILER=${{matrix.compiler.c}}
134146 -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
135- -G Ninja
147+ -G "${{matrix.generator}}"
136148 -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
137149 -DUMF_LINK_HWLOC_STATICALLY=${{matrix.static_hwloc}}
138150 -DUMF_FORMAT_CODE_STYLE=OFF
@@ -151,71 +163,10 @@ jobs:
151163 working-directory : ${{env.BUILD_DIR}}
152164 run : ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
153165
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-
214166 icx :
215167 name : ICX
216168 env :
217169 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"
219170 strategy :
220171 matrix :
221172 os : ['windows-2019', 'windows-2022']
@@ -297,6 +248,54 @@ jobs:
297248 call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
298249 ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
299250
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+
300299 L0 :
301300 uses : ./.github/workflows/reusable_gpu.yml
302301 with :
0 commit comments