File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 17
17
# we need at least ruby 2.7 for the tests
18
18
# instead of dealing with installing a modern version of ruby on 2019, we'll just use windows-2022 here
19
19
os : [ubuntu-latest, windows-2022, macos-latest]
20
+ # we want to ensure compatibility with a recent CMake version as well as the lowest officially supported
21
+ # legacy version that we define as the default version of the second-latest Ubuntu LTS release currently available
22
+ cmake_version : ['3.16.3', '3.25.1']
23
+ exclude :
24
+ # there seems to be an issue with CMake 3.16 not finding a C++ compiler on windows-2022
25
+ - os : windows-2022
26
+ cmake_version : ' 3.16.3'
20
27
21
28
steps :
22
29
- name : clone
@@ -25,14 +32,17 @@ jobs:
25
32
- name : Setup cmake
26
33
uses : jwlawson/actions-setup-cmake@v1.13
27
34
with :
28
- cmake-version : ' 3.25.x '
35
+ cmake-version : ${{ matrix.cmake_version }}
29
36
30
37
- name : unit tests
31
38
run : |
32
39
cmake -Stest -Bbuild/test
33
40
cmake --build build/test --target test-verbose
41
+ env :
42
+ CMAKE_VERSION : ${{ matrix.cmake_version }}
34
43
35
44
- name : integration tests
36
45
run : ruby test/integration/runner.rb
37
46
env :
38
47
CPM_INTEGRATION_TEST_DIR : ./build/integration
48
+ CMAKE_VERSION : ${{ matrix.cmake_version }}
Original file line number Diff line number Diff line change 2
2
3
3
class SystemWarnings < IntegrationTest
4
4
5
+ def setup
6
+ # system is only supported for CMake >= 3.25
7
+ @system_supported = ( !ENV [ 'CMAKE_VERSION' ] ) || ( Gem ::Version . new ( ENV [ 'CMAKE_VERSION' ] ) >= Gem ::Version . new ( '3.25' ) )
8
+ end
9
+
5
10
def test_dependency_added_using_system
6
11
for use_system in [ true , false ] do
7
12
prj = make_project name : use_system ? "system" : "no_system" , from_template : 'using-adder'
@@ -21,7 +26,7 @@ def test_dependency_added_using_system
21
26
PACK
22
27
23
28
assert_success prj . configure
24
- if use_system
29
+ if use_system and @system_supported
25
30
assert_success prj . build
26
31
else
27
32
assert_failure prj . build
@@ -42,7 +47,11 @@ def test_dependency_added_implicitly_using_system
42
47
PACK
43
48
44
49
assert_success prj . configure
45
- assert_success prj . build
50
+ if @system_supported
51
+ assert_success prj . build
52
+ else
53
+ assert_failure prj . build
54
+ end
46
55
end
47
56
48
57
end
You can’t perform that action at this time.
0 commit comments