diff options
author | Brad King <brad.king@kitware.com> | 2022-02-25 17:14:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-02-25 18:33:46 (GMT) |
commit | c1479f08a8cc6d4867355432264ec9a1489b518c (patch) | |
tree | 661233215b825923a4f0c0a6a7a5d3d72904df2a /.gitlab/ci | |
parent | 4db7020811faaa261f9f63895c4cd29b9e0ee62e (diff) | |
download | CMake-c1479f08a8cc6d4867355432264ec9a1489b518c.zip CMake-c1479f08a8cc6d4867355432264ec9a1489b518c.tar.gz CMake-c1479f08a8cc6d4867355432264ec9a1489b518c.tar.bz2 |
ci: Enable Swift tests in debian10-ninja job in non-MR pipelines
The Swift compiler is too big to put in the Debian base image,
so download it in this specific job instead.
Diffstat (limited to '.gitlab/ci')
-rw-r--r-- | .gitlab/ci/configure_debian10_ninja.cmake | 4 | ||||
-rw-r--r-- | .gitlab/ci/env_debian10_ninja.sh | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/.gitlab/ci/configure_debian10_ninja.cmake b/.gitlab/ci/configure_debian10_ninja.cmake index 1be5381..8cf3835 100644 --- a/.gitlab/ci/configure_debian10_ninja.cmake +++ b/.gitlab/ci/configure_debian10_ninja.cmake @@ -77,4 +77,8 @@ set(CMake_TEST_JQ "/usr/bin/jq" CACHE PATH "") set(CMake_TEST_Qt5 "ON" CACHE BOOL "") set(CMake_TEST_UseSWIG "ON" CACHE BOOL "") +if (NOT "$ENV{SWIFTC}" STREQUAL "") + set(CMAKE_Swift_COMPILER "$ENV{SWIFTC}" CACHE FILEPATH "") +endif() + include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/env_debian10_ninja.sh b/.gitlab/ci/env_debian10_ninja.sh index f3e2913..67d900c 100644 --- a/.gitlab/ci/env_debian10_ninja.sh +++ b/.gitlab/ci/env_debian10_ninja.sh @@ -1 +1,11 @@ export MY_RUBY_HOME="/usr/local/rvm/rubies/ruby-2.7.0" + +if test -z "$CI_MERGE_REQUEST_ID"; then + curl -L -O "https://download.swift.org/swift-5.5.3-release/ubuntu1804/swift-5.5.3-RELEASE/swift-5.5.3-RELEASE-ubuntu18.04.tar.gz" + echo '910634e2d97e14c43ed1f29caeb57fd01d10c2ff88cebb79baee1016b52c7492 swift-5.5.3-RELEASE-ubuntu18.04.tar.gz' > swift.sha256sum + sha256sum --check swift.sha256sum + mkdir /opt/swift + tar xzf swift-5.5.3-RELEASE-ubuntu18.04.tar.gz -C /opt/swift --strip-components=2 + rm swift-5.5.3-RELEASE-ubuntu18.04.tar.gz swift.sha256sum + export SWIFTC="/opt/swift/bin/swiftc" +fi |