Skip to content

Commit 42de4b9

Browse files
committed
Test umfd install
1 parent 807612e commit 42de4b9

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

.github/workflows/reusable_basic.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,13 @@ jobs:
247247
shared_library: 'ON'
248248
level_zero_provider: 'OFF'
249249
cuda_provider: 'OFF'
250+
- os: 'windows-2022'
251+
build_type: Release
252+
compiler: {c: cl, cxx: cl}
253+
shared_library: 'ON'
254+
level_zero_provider: 'ON'
255+
cuda_provider: 'ON'
256+
umfd_lib: 'ON'
250257

251258
runs-on: ${{matrix.os}}
252259

@@ -289,6 +296,7 @@ jobs:
289296
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=${{matrix.level_zero_provider}}
290297
-DUMF_BUILD_CUDA_PROVIDER=${{matrix.cuda_provider}}
291298
-DUMF_TESTS_FAIL_ON_SKIP=ON
299+
-UMF_USE_DEBUG_POSTFIX=${{matrix.umfd_lib}}
292300
293301
- name: Build UMF
294302
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS
@@ -307,6 +315,7 @@ jobs:
307315
${{matrix.shared_library == 'ON' && '--proxy' || '' }}
308316
--umf-version ${{env.UMF_VERSION}}
309317
${{ matrix.shared_library == 'ON' && '--shared-library' || ''}}
318+
${{ matrix.umfd_lib == 'ON' && '--umfd-lib' || ''}}
310319
311320
- name: check /DEPENDENTLOADFLAG in umf.dll
312321
if: ${{matrix.shared_library == 'ON' && matrix.compiler.cxx == 'cl'}}

test/test_installation.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def __init__(
4141
proxy: bool,
4242
pools: List[str],
4343
umf_version: Version,
44+
umfd_lib: bool,
4445
):
4546
self.workspace_dir = workspace_dir
4647
self.build_dir = build_dir
@@ -50,6 +51,7 @@ def __init__(
5051
self.proxy = proxy
5152
self.pools = pools
5253
self.umf_version = umf_version
54+
self.umfd_lib = umfd_lib
5355
self.match_list = self._create_match_list()
5456

5557
def _create_match_list(self) -> List[str]:
@@ -74,10 +76,14 @@ def _create_match_list(self) -> List[str]:
7476
lib_prefix = "lib"
7577

7678
bin = []
77-
if platform.system() == "Windows" and (self.shared_library or self.proxy):
79+
if platform.system() == "Windows" and (
80+
self.shared_library or self.proxy or self.umfd_lib
81+
):
7882
bin.append("bin")
7983
if self.shared_library:
8084
bin.append("bin/umf.dll")
85+
if self.umfd_lib:
86+
bin.append("bin/umfd.dll")
8187
if self.proxy:
8288
bin.append("bin/umf_proxy.dll")
8389

@@ -101,6 +107,8 @@ def _create_match_list(self) -> List[str]:
101107
lib.append(f"lib/{lib_prefix}{pool}.{lib_ext_static}")
102108
if self.shared_library:
103109
lib.append(f"lib/{lib_prefix}umf.{lib_ext_shared}")
110+
if platform.system() == "Windows" and self.umfd_lib:
111+
lib.append(f"lib/{lib_prefix}umfd.{lib_ext_shared}")
104112

105113
if platform.system() == "Linux":
106114
lib.append(
@@ -115,6 +123,9 @@ def _create_match_list(self) -> List[str]:
115123
else:
116124
lib.append(f"lib/{lib_prefix}umf.{lib_ext_static}")
117125

126+
if platform.system() == "Windows" and self.umfd_lib:
127+
lib.append(f"lib/{lib_prefix}umfd.{lib_ext_shared}")
128+
118129
if self.proxy:
119130
lib.append(f"lib/{lib_prefix}umf_proxy.{lib_ext_shared}")
120131

@@ -283,6 +294,11 @@ def parse_arguments(self) -> argparse.Namespace:
283294
action="store",
284295
help="Current version of the UMF, e.g. 1.0.0",
285296
)
297+
self.parser.add_argument(
298+
"--umfd-lib",
299+
action="store_true",
300+
help="Add this argument if the UMF was built with the umfd library",
301+
)
286302
return self.parser.parse_args()
287303

288304
def run(self) -> None:
@@ -306,6 +322,7 @@ def run(self) -> None:
306322
self.args.proxy,
307323
pools,
308324
umf_version,
325+
self.args.umfd_lib,
309326
)
310327

311328
print("Installation test - BEGIN", flush=True)

0 commit comments

Comments
 (0)