Commit f3337a02 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Start switching CI to SFT LCG

parent eafc6c57
......@@ -21,26 +21,34 @@ if [ ! -d "/cvmfs" ]; then
exit 1
fi
if [ ! -d "/cvmfs/clicdp.cern.ch" ]; then
echo "No clicdp CVMFS repository detected, please add it."
if [ ! -d "/cvmfs/sft.cern.ch" ]; then
echo "No SFT CVMFS repository detected, please make sure it is available."
exit 1
fi
if [ ! -d "/cvmfs/sft.cern.ch" ]; then
echo "No sft CVMFS repository detected, please add it."
if [ ! -d "/cvmfs/geant4.cern.ch" ]; then
echo "No Geant4 CVMFS repository detected, please make sure it is available."
exit 1
fi
# Determine which LCG version to use
if [ -z ${LCG_VERSION} ]; then
echo "No explicit LCG version set, using LCG_96b."
LCG_VERSION="LCG_96b"
fi
# Determine which compiler to use
if [ -z ${COMPILER_TYPE} ]; then
echo "No compiler type set, falling back to GCC."
COMPILER_TYPE="gcc"
fi
if [ ${COMPILER_TYPE} == "gcc" ]; then
COMPILER_VERSION="gcc7"
echo "Compiler type set to GCC."
COMPILER_VERSION="gcc8"
fi
if [ ${COMPILER_TYPE} == "llvm" ]; then
COMPILER_VERSION="llvm40"
echo "Compiler type set to LLVM."
COMPILER_VERSION="clang8"
fi
# Choose build type
......@@ -49,70 +57,14 @@ if [ -z ${BUILD_TYPE} ]; then
fi
# General variables
CLICREPO=/cvmfs/clicdp.cern.ch
SFTREPO=/cvmfs/sft.cern.ch
export BUILD_FLAVOUR=x86_64-${OS}-${COMPILER_VERSION}-${BUILD_TYPE}
#--------------------------------------------------------------------------------
# Compiler
#--------------------------------------------------------------------------------
if [ ${COMPILER_TYPE} == "gcc" ]; then
source ${CLICREPO}/compilers/gcc/7.1.0/x86_64-${OS}/setup.sh
fi
if [ ${COMPILER_TYPE} == "llvm" ]; then
source ${CLICREPO}/compilers/llvm/4.0.0/x86_64-${OS}/setup.sh
fi
#--------------------------------------------------------------------------------
# Python
# Source full LCG view
#--------------------------------------------------------------------------------
export PYTHONDIR=${CLICREPO}/software/Python/2.7.13/${BUILD_FLAVOUR}
export PATH=${PYTHONDIR}/bin:$PATH
export LD_LIBRARY_PATH=${PYTHONDIR}/lib:${LD_LIBRARY_PATH}
#--------------------------------------------------------------------------------
# CMake
#--------------------------------------------------------------------------------
export CMAKE_HOME=${CLICREPO}/software/CMake/3.8.1/${BUILD_FLAVOUR}
export PATH=${CMAKE_HOME}/bin:$PATH
#--------------------------------------------------------------------------------
# ROOT
#--------------------------------------------------------------------------------
export ROOTSYS=${CLICREPO}/software/ROOT/6.08.06/${BUILD_FLAVOUR}
export PYTHONPATH="$ROOTSYS/lib:$PYTHONPATH"
export PATH="$ROOTSYS/bin:$PATH"
export LD_LIBRARY_PATH="$ROOTSYS/lib:$LD_LIBRARY_PATH"
export CMAKE_PREFIX_PATH="$ROOTSYS:$CMAKE_PREFIX_PATH"
#--------------------------------------------------------------------------------
# Ninja
#--------------------------------------------------------------------------------
export Ninja_HOME=${CLICREPO}/software/Ninja/1.7.2/${BUILD_FLAVOUR}
export PATH="$Ninja_HOME:$PATH"
#--------------------------------------------------------------------------------
# Eigen
#--------------------------------------------------------------------------------
export Eigen_HOME=${CLICREPO}/software/Eigen/3.3.3/${BUILD_FLAVOUR}/
export Eigen3_DIR=${Eigen_HOME}/share/eigen3/cmake/
export CMAKE_PREFIX_PATH="$Eigen3_DIR:$CMAKE_PREFIX_PATH"
#--------------------------------------------------------------------------------
# Doxygen
#--------------------------------------------------------------------------------
export Doxygen_HOME=${SFTREPO}/lcg/releases/doxygen/1.8.11-ae1d3/${BUILD_FLAVOUR}/bin/
export PATH="$Doxygen_HOME:$PATH"
#--------------------------------------------------------------------------------
# Git
#--------------------------------------------------------------------------------
source ${SFTREPO}/lcg/views/${LCG_VERSION}/${BUILD_FLAVOUR}/setup.sh
export Git_HOME=${CLICREPO}/software/git/2.13.2/${BUILD_FLAVOUR}
export PATH=${Git_HOME}/bin:${PATH}
# Fix LCIO path for LCG_96, cmake configs are not properly placed:
export LCIO_DIR=$(dirname $(dirname $(readlink $(which lcio_event_counter))))
source $ROOTSYS/bin/thisroot.sh
source $G4INSTALL/bin/geant4.sh
......@@ -18,34 +18,14 @@ cmp:slc6-gcc:
stage: compilation
tags:
- docker
image: clicdp/slc6-base
image: gitlab-registry.cern.ch/sft/docker/slc6:latest
script:
- export COMPILER_TYPE="gcc"
- source .gitlab-ci.d/init_x86_64.sh
- source .gitlab-ci.d/load_deps.sh
- mkdir build
- cd build
- cmake -GNinja -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DEigen3_DIR=$Eigen3_DIR ..
- ninja
- ninja install
artifacts:
paths:
- build
- bin
- lib
expire_in: 3 hour
cmp:slc6-llvm:
stage: compilation
tags:
- docker
image: clicdp/slc6-base
script:
- export COMPILER_TYPE="llvm"
- source .gitlab-ci.d/init_x86_64.sh
- mkdir build
- cd build
- cmake -GNinja -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DEigen3_DIR=$Eigen3_DIR ..
- cmake -GNinja -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DEigen3_DIR=$Eigen3_DIR ..
- ninja
- ninja install
artifacts:
......@@ -59,14 +39,14 @@ cmp:cc7-gcc:
stage: compilation
tags:
- docker
image: clicdp/cc7-base
image: gitlab-registry.cern.ch/sft/docker/centos7:latest
script:
- export COMPILER_TYPE="gcc"
- source .gitlab-ci.d/init_x86_64.sh
- source .gitlab-ci.d/load_deps.sh
- mkdir build
- cd build
- cmake -GNinja -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DEigen3_DIR=$Eigen3_DIR ..
- cmake -GNinja -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DEigen3_DIR=$Eigen3_DIR ..
- ninja
- ninja install
artifacts:
......@@ -88,7 +68,7 @@ cmp:cc7-docker:
script:
- mkdir build
- cd build
- cmake3 -DBUILD_EventLoaderEUDAQ2=ON -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DEigen3_DIR=$Eigen3_DIR ..
- cmake3 -DCMAKE_CXX_FLAGS="-Werror" -DBUILD_EventLoaderEUDAQ2=ON -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DEigen3_DIR=$Eigen3_DIR ..
- make
- make install
artifacts:
......@@ -102,13 +82,13 @@ cmp:cc7-llvm:
stage: compilation
tags:
- docker
image: clicdp/cc7-base
image: gitlab-registry.cern.ch/sft/docker/centos7:latest
script:
- export COMPILER_TYPE="llvm"
- source .gitlab-ci.d/init_x86_64.sh
- mkdir build
- cd build
- cmake -GNinja -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DEigen3_DIR=$Eigen3_DIR ..
- cmake -GNinja -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DEigen3_DIR=$Eigen3_DIR ..
- ninja
- ninja install
artifacts:
......@@ -127,7 +107,7 @@ cmp:mac1014-clang:
- source .gitlab-ci.d/load_deps.sh
- mkdir build
- cd build
- cmake -GNinja -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DCMAKE_USE_RELATIVE_PATHS=TRUE -DEigen3_DIR=$Eigen3_DIR ..
- cmake -GNinja -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DCMAKE_USE_RELATIVE_PATHS=TRUE -DEigen3_DIR=$Eigen3_DIR ..
- ninja
- ninja install
artifacts:
......@@ -164,43 +144,13 @@ tst:telescope:
# Format and Lint Checking #
############################
# SLC 6
fmt:slc6-llvm-format:
stage: formatting
tags:
- docker
dependencies:
- cmp:slc6-llvm
image: clicdp/slc6-base
script:
- export COMPILER_TYPE="llvm"
- source .gitlab-ci.d/init_x86_64.sh
- cd build/
- ninja check-format
fmt:slc6-llvm-lint:
stage: formatting
tags:
- docker
dependencies:
- cmp:slc6-llvm
image: clicdp/slc6-base
script:
- export COMPILER_TYPE="llvm"
- source .gitlab-ci.d/init_x86_64.sh
- cd build/
- ninja check-lint
# CentOS 7
fmt:centos7-llvm-format:
stage: formatting
tags:
- docker
dependencies:
- cmp:cc7-llvm
image: clicdp/cc7-base
image: gitlab-registry.cern.ch/sft/docker/centos7:latest
script:
- export COMPILER_TYPE="llvm"
- source .gitlab-ci.d/init_x86_64.sh
......@@ -213,7 +163,7 @@ fmt:cc7-llvm-lint:
- docker
dependencies:
- cmp:cc7-llvm
image: clicdp/cc7-base
image: gitlab-registry.cern.ch/sft/docker/centos7:latest
script:
- export COMPILER_TYPE="llvm"
- source .gitlab-ci.d/init_x86_64.sh
......@@ -230,7 +180,7 @@ cmp:doxygen:
stage: documentation
tags:
- docker
image: clicdp/cc7-base
image: gitlab-registry.cern.ch/sft/docker/centos7:latest
dependencies: []
script:
- source .gitlab-ci.d/init_x86_64.sh
......@@ -273,7 +223,7 @@ pkg:slc6-gcc:
stage: packaging
tags:
- docker
image: clicdp/slc6-base
image: gitlab-registry.cern.ch/sft/docker/slc6:latest
only:
- tags
- schedules
......@@ -297,7 +247,7 @@ pkg:cc7-gcc:
stage: packaging
tags:
- docker
image: clicdp/cc7-base
image: gitlab-registry.cern.ch/sft/docker/centos7:latest
only:
- tags
- schedules
......
Supports Markdown
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