Skip to content

Commit 4956930

Browse files
committed
add testing 3.14 cmake
1 parent 0c44ef6 commit 4956930

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

.github/workflows/reusable_basic.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
install_tbb: ['ON']
2727
disable_hwloc: ['OFF']
2828
link_hwloc_statically: ['OFF']
29+
cmake_ver: ['latest']
2930
include:
3031
- os: 'ubuntu-22.04'
3132
build_type: Release
@@ -36,6 +37,8 @@ jobs:
3637
install_tbb: 'ON'
3738
disable_hwloc: 'OFF'
3839
link_hwloc_statically: 'OFF'
40+
# check minimum supported cmake version
41+
cmake_ver: '3.14.0'
3942
- os: 'ubuntu-22.04'
4043
build_type: Release
4144
compiler: {c: gcc, cxx: g++}
@@ -45,6 +48,7 @@ jobs:
4548
install_tbb: 'ON'
4649
disable_hwloc: 'OFF'
4750
link_hwloc_statically: 'OFF'
51+
cmake_ver: 'latest'
4852
- os: 'ubuntu-24.04'
4953
build_type: Debug
5054
compiler: {c: gcc, cxx: g++}
@@ -54,6 +58,7 @@ jobs:
5458
install_tbb: 'ON'
5559
disable_hwloc: 'OFF'
5660
link_hwloc_statically: 'OFF'
61+
cmake_ver: 'latest'
5762
# test level_zero_provider='OFF' and cuda_provider='OFF'
5863
- os: 'ubuntu-22.04'
5964
build_type: Release
@@ -64,6 +69,7 @@ jobs:
6469
install_tbb: 'ON'
6570
disable_hwloc: 'OFF'
6671
link_hwloc_statically: 'OFF'
72+
cmake_ver: 'latest'
6773
# test icx compiler
6874
- os: 'ubuntu-22.04'
6975
build_type: Release
@@ -74,6 +80,7 @@ jobs:
7480
install_tbb: 'ON'
7581
disable_hwloc: 'OFF'
7682
link_hwloc_statically: 'OFF'
83+
cmake_ver: 'latest'
7784
# test lld linker
7885
- os: 'ubuntu-24.04'
7986
build_type: Release
@@ -85,7 +92,8 @@ jobs:
8592
disable_hwloc: 'OFF'
8693
link_hwloc_statically: 'OFF'
8794
llvm_linker: '-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld" -DCMAKE_MODULE_LINKER_FLAGS="-fuse-ld=lld" -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=lld"'
88-
# test without installing TBB
95+
cmake_ver: 'latest'
96+
# test without installing TBB
8997
- os: 'ubuntu-22.04'
9098
build_type: Release
9199
compiler: {c: gcc, cxx: g++}
@@ -95,6 +103,7 @@ jobs:
95103
install_tbb: 'OFF'
96104
disable_hwloc: 'OFF'
97105
link_hwloc_statically: 'OFF'
106+
cmake_ver: 'latest'
98107
- os: 'ubuntu-22.04'
99108
build_type: Debug
100109
compiler: {c: gcc, cxx: g++}
@@ -104,6 +113,7 @@ jobs:
104113
install_tbb: 'ON'
105114
disable_hwloc: 'ON'
106115
link_hwloc_statically: 'OFF'
116+
cmake_ver: 'latest'
107117
- os: 'ubuntu-22.04'
108118
build_type: Release
109119
compiler: {c: gcc, cxx: g++}
@@ -113,6 +123,7 @@ jobs:
113123
install_tbb: 'ON'
114124
disable_hwloc: 'OFF'
115125
link_hwloc_statically: 'ON'
126+
cmake_ver: 'latest'
116127
runs-on: ${{matrix.os}}
117128

118129
steps:
@@ -124,7 +135,15 @@ jobs:
124135
- name: Install apt packages
125136
run: |
126137
sudo apt-get update
127-
sudo apt-get install -y clang cmake libnuma-dev lcov
138+
sudo apt-get install -y clang libnuma-dev lcov
139+
140+
- name: Install cmake (minimum supported version)
141+
if: matrix.cmake_ver != 'latest'
142+
run: |
143+
sudo apt-get remove --purge -y cmake
144+
wget https://github.com/Kitware/CMake/releases/download/v${{matrix.cmake_ver}}/cmake-${{matrix.cmake_ver}}-Linux-x86_64.sh
145+
chmod +x cmake-${{matrix.cmake_ver}}-Linux-x86_64.sh
146+
sudo ./cmake-${{matrix.cmake_ver}}-Linux-x86_64.sh --skip-license --prefix=/usr/local
128147
129148
- name: Install hwloc
130149
if: matrix.disable_hwloc == 'OFF'

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

5+
message(STATUS "CMake version: ${CMAKE_VERSION}")
56
cmake_minimum_required(VERSION 3.14.0 FATAL_ERROR)
7+
68
# needed when UMF is used as an external project
79
set(UMF_CMAKE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
810

test/test_installation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,10 @@ def install_umf(self) -> None:
181181
f"Error: Installation directory '{self.install_dir}' is not empty"
182182
)
183183

184-
install_cmd = f"cmake --install {self.build_dir} --config {self.build_type.title()} --prefix {self.install_dir}"
184+
install_cmd = f"cmake --build {self.build_dir} --config {self.build_type.title()} --target install"
185+
185186
try:
187+
print(f"Running command: {install_cmd}", flush=True)
186188
subprocess.run(install_cmd.split()).check_returncode() # nosec B603
187189
except subprocess.CalledProcessError:
188190
sys.exit(f"Error: UMF installation command '{install_cmd}' failed")

0 commit comments

Comments
 (0)