Skip to content
Snippets Groups Projects
Commit 84e99363 authored by MADELA Patrick's avatar MADELA Patrick
Browse files

The boostrap build is too long for a job and you can build Cmake with Cmake...

The boostrap build is too long for a job and you can build Cmake with Cmake but latest version requires at least Cmake 3.13. Therefore we add job to prebuild a previous compatible Cmake with legacy system cmake to build after the final cmake
parent 6808a034
No related branches found
No related tags found
No related merge requests found
Pipeline #1077 passed
variables:
PREBUILD_CMAKE_VERSION: 3.18.2
CMAKE_VERSION: 3.24.2
stages:
- prebuild
- build
- test
- package
# The boostrap build is too long for a job and you can build Cmake with Cmake but latest version requires at least Cmake 3.13
# Therefore we add job to prebuild a previous compatible Cmake with legacy system cmake to build after the final cmake
.prebuild:
stage: prebuild
script:
- yum install -y openssl-devel
- curl -s -OL https://github.com/Kitware/CMake/releases/download/v${PREBUILD_CMAKE_VERSION}/cmake-${PREBUILD_CMAKE_VERSION}-SHA-256.txt
- curl -s -OL https://github.com/Kitware/CMake/releases/download/v${PREBUILD_CMAKE_VERSION}/cmake-${PREBUILD_CMAKE_VERSION}.tar.gz
- echo "$(cat cmake-${PREBUILD_CMAKE_VERSION}-SHA-256.txt | grep cmake-${PREBUILD_CMAKE_VERSION}.tar.gz)" | sha256sum --check --status
- tar -xzf cmake-${PREBUILD_CMAKE_VERSION}.tar.gz
- mkdir build && cd build
- cmake3 ../cmake-${PREBUILD_CMAKE_VERSION} -DCMAKE_INSTALL_PREFIX=${CI_PROJECT_DIR}/${NAME}
- make
- make install
artifacts:
name: ${NAME}
paths:
- ${NAME}
.build:
stage: build
script:
......@@ -15,8 +36,8 @@ stages:
- curl -s -OL https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}.tar.gz
- echo "$(cat cmake-${CMAKE_VERSION}-SHA-256.txt | grep cmake-${CMAKE_VERSION}.tar.gz)" | sha256sum --check --status
- tar -xzf cmake-${CMAKE_VERSION}.tar.gz
- cd cmake-${CMAKE_VERSION}
- ./bootstrap --prefix=${CI_PROJECT_DIR}/${NAME} --parallel=2
- mkdir build && cd build
- ${CI_PROJECT_DIR}/${PREBUILD_NAME}/bin/cmake ../cmake-${CMAKE_VERSION} -DCMAKE_INSTALL_PREFIX=${CI_PROJECT_DIR}/${NAME}
- make
- make install
artifacts:
......@@ -36,11 +57,20 @@ stages:
- zip -r --symlinks ../${NAME}.zip *
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ../${NAME}.zip "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/cmake/${CMAKE_VERSION}/"'
prebuild-el6-i686:
extends: [".prebuild"]
image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el6-gcc73-x86
variables:
NAME: "cmake-${PREBUILD_CMAKE_VERSION}-linux-el6-i686"
linux-el6-i686:
extends: [".build"]
image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el6-gcc73-x86
variables:
PREBUILD_NAME: "cmake-${PREBUILD_CMAKE_VERSION}-linux-el6-i686"
NAME: "cmake-${CMAKE_VERSION}-linux-el6-i686"
needs:
- prebuild-el6-i686
test-el6-i686:
extends: [".test"]
......@@ -59,25 +89,25 @@ package-el6-i686:
- linux-el6-i686
- test-el6-i686
linux-el7-i686:
extends: [".build"]
image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el7-gcc73-x86
variables:
NAME: "cmake-${CMAKE_VERSION}-linux-el7-i686"
# linux-el7-i686:
# extends: [".build"]
# image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el7-gcc73-x86
# variables:
# NAME: "cmake-${CMAKE_VERSION}-linux-el7-i686"
test-el7-i686:
extends: [".test"]
image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el7-gcc73-x86
variables:
NAME: "cmake-${CMAKE_VERSION}-linux-el7-i686"
needs:
- linux-el7-i686
# test-el7-i686:
# extends: [".test"]
# image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el7-gcc73-x86
# variables:
# NAME: "cmake-${CMAKE_VERSION}-linux-el7-i686"
# needs:
# - linux-el7-i686
package-el7-i686:
extends: [".package"]
image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el7-gcc73-x86
variables:
NAME: "cmake-${CMAKE_VERSION}-linux-el7-i686"
needs:
- linux-el7-i686
- test-el7-i686
# package-el7-i686:
# extends: [".package"]
# image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el7-gcc73-x86
# variables:
# NAME: "cmake-${CMAKE_VERSION}-linux-el7-i686"
# needs:
# - linux-el7-i686
# - test-el7-i686
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment