Skip to content

Commit 3ffd895

Browse files
[CI] Update Windows basic workflow
- enable back testing of CMake 3.14 - Add dev command prompt setup (required for clang-cl, but useful for reading all env vars in the image, in all jobs) - Remove 'cmake ver' from matrix to allow replacing one of the job from matrix with a custom job (with umfd lib enabled)
1 parent b1ca59d commit 3ffd895

File tree

1 file changed

+28
-22
lines changed

1 file changed

+28
-22
lines changed

.github/workflows/reusable_basic.yml

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -235,44 +235,41 @@ jobs:
235235
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"
236236
VCPKG_PATH_BIN: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows/bin;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows/bin;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows/bin"
237237
strategy:
238-
# TODO: add '3.14.0-win64-x64' CMake testing
239238
matrix:
240239
os: ['windows-2022', 'windows-2025']
241240
build_type: [Debug, Release]
242241
compiler: [{c: cl, cxx: cl}]
243242
shared_library: ['ON', 'OFF']
244243
level_zero_provider: ['ON']
245244
cuda_provider: ['ON']
246-
cmake_ver: ['default']
247245
include:
248-
# clang-cl works well with Ninja, Debug build
249-
# For VS generator it produces build errors not related to UMF
246+
# extra job: Custom (old) CMake, clang-cl compiler
247+
# Note: This CMake uses NMake generator as VS paths are probably messed up (by CMake?)
250248
- os: 'windows-2025'
251-
build_type: Debug
249+
build_type: Release
250+
extra_build_options: '-DCMAKE_BUILD_TYPE=Release' # NMake generator requires this
252251
compiler: {c: clang-cl, cxx: clang-cl}
253-
extra_build_options: '-G Ninja'
254252
shared_library: 'ON'
255253
level_zero_provider: 'ON'
256254
cuda_provider: 'ON'
257-
cmake_ver: 'default'
258-
# Custom CMake and umfd enabled
255+
cmake_ver: '3.14.0-win64-x64'
256+
# extra job: Custom CMake, L0/CUDA providers disabled
259257
- os: 'windows-2025'
260258
build_type: Release
261259
compiler: {c: cl, cxx: cl}
262260
shared_library: 'ON'
263-
level_zero_provider: 'ON'
264-
cuda_provider: 'ON'
265-
umfd_lib: 'ON'
261+
level_zero_provider: 'OFF'
262+
cuda_provider: 'OFF'
266263
cmake_ver: '3.28.0-windows-x86_64'
267-
# L0/CUDA providers disabled
268-
- os: 'windows-2025'
264+
# umfd enabled (this job will replace one from matrix)
265+
- os: 'windows-2022'
269266
build_type: Release
270267
compiler: {c: cl, cxx: cl}
271268
shared_library: 'ON'
272-
level_zero_provider: 'OFF'
273-
cuda_provider: 'OFF'
274-
cmake_ver: 'default'
275-
name: Basic (${{matrix.os}}, build_type=${{matrix.build_type}}, compilers=${{matrix.compiler.c}}/${{matrix.compiler.cxx}}, shared_library=${{matrix.shared_library}}, level_zero_provider=${{matrix.level_zero_provider}}, cuda_provider=${{matrix.cuda_provider}}, cmake_ver=${{matrix.cmake_ver}})
269+
level_zero_provider: 'ON'
270+
cuda_provider: 'ON'
271+
umfd_lib: 'ON'
272+
name: Basic (${{matrix.os}}, build_type=${{matrix.build_type}}, compilers=${{matrix.compiler.c}}/${{matrix.compiler.cxx}}, shared_library=${{matrix.shared_library}}, level_zero_provider=${{matrix.level_zero_provider}}, cuda_provider=${{matrix.cuda_provider}}, cmake_ver=${{matrix.cmake_ver || 'default'}}, umfd=${{matrix.umfd_lib || 'OFF'}})
276273
runs-on: ${{matrix.os}}
277274

278275
steps:
@@ -282,7 +279,7 @@ jobs:
282279
fetch-depth: 0
283280

284281
- name: Install cmake (non-default version)
285-
if: matrix.cmake_ver != 'default'
282+
if: ${{ matrix.cmake_ver != 'default' && matrix.cmake_ver != '' }}
286283
run: |
287284
$ErrorActionPreference = "Stop"
288285
$cmakePath = "C:\Program Files\CMake"
@@ -300,6 +297,13 @@ jobs:
300297
Start-Process msiexec.exe -ArgumentList "/i $cmakeInstaller /quiet /norestart" -Wait
301298
cmake --version
302299
300+
# Ensure that the required environment is set
301+
# Note: While this step is required for the clang-cl compiler, it can be executed for all jobs
302+
- name: Setup MSVC dev command prompt
303+
uses: TheMrMilchmann/setup-msvc-dev@fb19abb8a41b3cf0340f5d1be17d420309232be6 # v3.0.1
304+
with:
305+
arch: x64
306+
303307
- name: Initialize vcpkg
304308
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
305309
with:
@@ -338,22 +342,24 @@ jobs:
338342
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=${{matrix.level_zero_provider}}
339343
-DUMF_BUILD_CUDA_PROVIDER=${{matrix.cuda_provider}}
340344
-DUMF_TESTS_FAIL_ON_SKIP=ON
341-
-DUMF_USE_DEBUG_POSTFIX=${{matrix.umfd_lib}}
345+
-DUMF_USE_DEBUG_POSTFIX=${{matrix.umfd_lib || 'OFF'}}
342346
343347
- name: Build UMF
344348
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS
345349

346350
- name: Run tests
347351
working-directory: ${{env.BUILD_DIR}}
348-
# For CMake versions < 3.22 we have to add the build directory to the PATH
349-
# manually
352+
# For CMake versions < 3.22 we have to add the build directory to the PATH manually
353+
# Extra paths without 'build_type' are set for NMake generator
350354
run: |
351355
$m = [regex]::Matches((cmake --version), "cmake version (\d+)\.(\d+)\.(\d+)")
352356
if ($m) {
353357
$major = [int]$m.groups[1].Value
354358
$minor = [int]$m.groups[2].Value
355359
if ($major -lt 3 -or ($major -eq 3 -and $minor -lt 22)) {
356360
$env:Path = "${{env.BUILD_DIR}}/bin/${{matrix.build_type}};${{env.BUILD_DIR}}/src/proxy_lib/${{matrix.build_type}};$env:Path"
361+
$env:Path = "${{env.BUILD_DIR}}/bin/;${{env.BUILD_DIR}}/src/proxy_lib/;$env:Path"
362+
echo "PATH=$env:Path" >> $env:GITHUB_ENV
357363
}
358364
}
359365
ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
@@ -369,7 +375,7 @@ jobs:
369375
--umf-version ${{env.UMF_VERSION}}
370376
${{ matrix.shared_library == 'ON' && '--shared-library' || ''}}
371377
${{ matrix.umfd_lib == 'ON' && '--umfd-lib' || ''}}
372-
378+
373379
- name: check /DEPENDENTLOADFLAG in umf.dll
374380
if: ${{matrix.shared_library == 'ON' && matrix.compiler.cxx == 'cl'}}
375381
run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_DIR}}/bin/${{matrix.build_type}}/umf.dll

0 commit comments

Comments
 (0)