Skip to content

Commit

Permalink
run relative URL test only on supported CMake versions (3.27)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLartians committed Nov 30, 2023
1 parent 494041d commit cb9d43a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
os: [ubuntu-latest, windows-2022, macos-latest]
# we want to ensure compatibility with a recent CMake version as well as the lowest officially supported
# legacy version that we define as the default version of the second-latest Ubuntu LTS release currently available
cmake_version: ['3.16.3', '3.25.1']
cmake_version: ['3.16.3', '3.25.1', '3.27.5']
exclude:
# there seems to be an issue with CMake 3.16 not finding a C++ compiler on windows-2022
- os: windows-2022
Expand Down
15 changes: 11 additions & 4 deletions test/integration/test_relative_urls.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
require_relative './lib'

class RelativeURLs < IntegrationTest
def setup
# relative URLs were introduced in CMake 3.27
@relative_urls_supported = (!ENV['CMAKE_VERSION']) || (Gem::Version.new(ENV['CMAKE_VERSION']) >= Gem::Version.new('3.27'))
end

def test_add_project_with_relative_urls
prj = make_project from_template: 'using-fibadder'
prj.create_lists_from_default_template package: 'CPMAddPackage("gh:cpm-cmake/testpack-fibadder@1.1.0-relative-urls")'
assert_success prj.configure
assert_success prj.build
omit_if !@relative_urls_supported do
prj = make_project from_template: 'using-fibadder'
prj.create_lists_from_default_template package: 'CPMAddPackage("gh:cpm-cmake/testpack-fibadder@1.1.0-relative-urls")'
assert_success prj.configure
assert_success prj.build
end
end
end

0 comments on commit cb9d43a

Please sign in to comment.