Commit 6c138ae5 authored by Vicente Bolea's avatar Vicente Bolea 💬
Browse files

CI: download/install cmake in each build


Signed-off-by: Vicente Bolea's avatarVicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
parent bf6d6ca5
Pipeline #239627 passed with stage
......@@ -122,11 +122,21 @@ stages:
- build
- test
.use_distro_cmake:
variables:
USE_DISTRO_CMAKE: "true"
.install_cmake: &install_cmake |
export PATH=$PWD/.gitlab/cmake/bin:$PATH
test -z "$USE_DISTRO_CMAKE" && .gitlab/ci/config/cmake.sh
cmake --version
.cmake_build_linux: &cmake_build_linux
stage: build
timeout: 2 hours
interruptible: true
before_script:
- *install_cmake
- .gitlab/ci/config/sccache.sh
- export PATH=$PWD/.gitlab:$PATH
- SCCACHE_IDLE_TIMEOUT=0 sccache --start-server
......@@ -170,6 +180,8 @@ stages:
stage: test
timeout: 50 minutes
interruptible: true
before_script:
- *install_cmake
script:
#Need to use our custom ctest-latest symlink
#This will allow us to use 3.17+ which has support
......@@ -198,6 +210,8 @@ stages:
stage: test
timeout: 2 hours
interruptible: true
before_script:
- *install_cmake
script:
- "ctest-latest -VV -S .gitlab/ci/ctest_memcheck.cmake"
artifacts:
......
......@@ -13,6 +13,7 @@ build:centos7_gcc73:
- .centos7
- .cmake_build_linux
- .only-default
- .use_distro_cmake
variables:
CMAKE_BUILD_TYPE: RelWithDebInfo
CMAKE_GENERATOR: "Unix Makefiles"
......@@ -30,6 +31,7 @@ test:centos7_gcc73:
- .centos7
- .cmake_test_linux
- .only-default
- .use_distro_cmake
dependencies:
- build:centos7_gcc73
needs:
......@@ -47,6 +49,7 @@ test:rhel8_test_centos7:
- .rhel8
- .cmake_test_linux
- .only-default
- .use_distro_cmake
variables:
CTEST_EXCLUSIONS: "built_against_test_install"
dependencies:
......
#!/bin/sh
set -x
readonly version="3.21.0"
case "$( uname -s )" in
Linux)
shatool="sha256sum"
sha256sum="d54ef6909f519740bc85cec07ff54574cd1e061f9f17357d9ace69f61c6291ce"
platform="Linux"
arch="x86_64"
;;
Darwin)
shatool="shasum -a 256"
sha256sum="de0ae285d3fdf88373397b53de007e29cc67bec7cb945badff3eeecf80c25016"
platform="macos"
arch="universal"
;;
*)
echo "Unrecognized platform $( uname -s )"
exit 1
;;
esac
readonly shatool
readonly sha256sum
readonly platform
readonly arch
readonly filename="cmake-$version-$platform-$arch"
readonly tarball="$filename.tar.gz"
cd .gitlab
echo "$sha256sum $tarball" > cmake.sha256sum
curl -OL "https://github.com/Kitware/CMake/releases/download/v$version/$tarball"
$shatool --check cmake.sha256sum
tar xf "$tarball"
mv cmake-$version-*-$arch cmake
if [ "$( uname -s )" = "Darwin" ]; then
ln -s CMake.app/Contents/bin cmake/bin
fi
......@@ -13,6 +13,7 @@ build:ubuntu1604_gcc5:
- .ubuntu1604_cuda
- .cmake_build_linux
- .only-default
- .use_distro_cmake
variables:
CC: "gcc-5"
CXX: "g++-5"
......@@ -31,6 +32,7 @@ test:ubuntu1604_gcc5:
- .ubuntu1604_cuda
- .cmake_test_linux
- .only-default
- .use_distro_cmake
dependencies:
- build:ubuntu1604_gcc5
needs:
......@@ -50,6 +52,7 @@ build:ubuntu1604_gcc5_2:
- .ubuntu1604_cuda
- .cmake_build_linux
- .only-master
- .use_distro_cmake
variables:
CC: "gcc-5"
CXX: "g++-5"
......@@ -68,6 +71,7 @@ test:ubuntu1804_test_ubuntu1604_gcc5_2:
- .ubuntu1804_cuda
- .cmake_test_linux
- .only-master
- .use_distro_cmake
variables:
CTEST_EXCLUSIONS: "built_against_test_install"
dependencies:
......@@ -87,6 +91,7 @@ build:ubuntu1604_clang5:
- .ubuntu1604
- .cmake_build_linux
- .only-default
- .use_distro_cmake
variables:
CC: "clang-5.0"
CXX: "clang++-5.0"
......@@ -103,6 +108,7 @@ test:ubuntu1604_clang5:
- .ubuntu1604
- .cmake_test_linux
- .only-default
- .use_distro_cmake
dependencies:
- build:ubuntu1604_clang5
needs:
......
......@@ -45,6 +45,10 @@ if (NOT EXISTS ${license_file})
message(SEND_ERROR "Cannot find LICENSE.txt.")
endif (NOT EXISTS ${license_file})
# CMake >= 3.31 requires this for empty elems in lists and the LICENSE.txt has
# empty newlines to separate paragraphs.
cmake_policy(SET CMP0007 NEW)
# Get a list of third party files (with different copyrights) from the
# license file.
file(STRINGS ${license_file} license_lines)
......
......@@ -56,3 +56,4 @@ vtkm/cont/tbb/internal/kxsort.h
vtkm/thirdparty
vtkm/internal/brigand.hpp
version.txt
.gitlab/cmake
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment