Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F8310166
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
13 KB
Subscribers
None
View Options
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0ed61f6..97090b5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,547 +1,547 @@
# ---------------------------------
# - General Setup -
# ---------------------------------
stages:
- build
- test
- FOG:build
- FOG:test
- clean_code
- FOG:clear_code
- long_test
- publish
variables:
GIT_SUBMODULE_STRATEGY: recursive
# build directories
HEJ_BUILD_DIR: tmp_HEJ/HEJ_build
HEJ_INSTALL_DIR: tmp_HEJ/HEJ_installed
FOG_BUILD_DIR: tmp_HEJ/FOG_build
FOG_INSTALL_DIR: ${HEJ_INSTALL_DIR}
# docker images
DOCKER_BASIC: hejdock/hepenv # slc6
- DOCKER_CLANG: 'maheil/hepenv:clang9_ubuntu' # ubuntu with clang
+ DOCKER_CLANG: 'hejdock/hepenv:clang9_ubuntu' # ubuntu with clang
DOCKER_HEPMC3: hejdock/hepmc3env # centos7
DOCKER_HIGHFIVE: hejdock/highfiveenv # centos7
DOCKER_QCDLOOP: hejdock/qcdloopenv # slc6, includes rivet
- DOCKER_RIVET3: maheil/full_rivet3 # ubuntu
- DOCKER_RIVET3H2: maheil/hepmc2_rivet3 # ubuntu
+ DOCKER_RIVET3: 'hejdock/rivetenv:rivet3_gcc9_ubuntu' # ubuntu
+ DOCKER_RIVET3H2: 'hejdock/rivetenv:rivet3_hepmc2_gcc9_ubuntu' # ubuntu
DOCKER_RIVET: hejdock/rivetenv # slc6
# default name of cmake
CMAKE: cmake
CTEST: ctest
OVERWRITE_BOOST: ""
# ----------- Macros -----------
after_script:
- date
.tags_template:
tags: &tags_def
- docker
# default pipeline triggers
.only_template:
only: &only_def
- branches
- tags
- merge_requests
# save complete history of failed tests
.save_failure:
artifacts: &artifacts_failed
when: on_failure
untracked: true
expire_in: 3d
# ---------------------------------
# - Script Templates -
# ---------------------------------
# ----------- Build -----------
.HEJ_build:
tags: *tags_def
only: *only_def
stage: build
before_script:
- date
- source /cvmfs/pheno.egi.eu/HEJ/HEJ_env.sh || exit 1
# prepare build
- t_HEJ_DIR=${PWD}
- t_HEJ_INSTALL_DIR=${PWD}/${HEJ_INSTALL_DIR}
- t_HEJ_BUILD_DIR=${PWD}/${HEJ_BUILD_DIR}
# hack to allow setting "variable in variable"
- t_CMAKE_FLAGS=""
- if [[ -n ${OVERWRITE_BOOST} ]]; then
declare -n t_boost_root=${OVERWRITE_BOOST};
t_CMAKE_FLAGS="-DBOOST_ROOT=${t_boost_root}";
fi
- echo ${t_CMAKE_FLAGS}
- mkdir -p ${t_HEJ_BUILD_DIR}
- cd ${t_HEJ_BUILD_DIR}
- ${CMAKE} ${t_HEJ_DIR} -DCMAKE_BUILD_TYPE=DEBUG
-DCMAKE_INSTALL_PREFIX=${t_HEJ_INSTALL_DIR} ${t_CMAKE_FLAGS}
script:
- make -j $(nproc --ignore=1)
- make install
dependencies: []
artifacts:
# save build and installed folder
name: build
expire_in: 1d
paths:
- ${HEJ_INSTALL_DIR}
- ${HEJ_BUILD_DIR}
# ----------- Test -----------
.HEJ_test:
tags: *tags_def
only: *only_def
stage: test
before_script:
- date
- source /cvmfs/pheno.egi.eu/HEJ/HEJ_env.sh || exit 1
# load HEJ
- t_HEJ_DIR=${PWD}
- t_HEJ_INSTALL_DIR=${PWD}/${HEJ_INSTALL_DIR}
- export LD_LIBRARY_PATH=${t_HEJ_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
- export PATH=${t_HEJ_INSTALL_DIR}/bin:${PATH}
- cd ${HEJ_BUILD_DIR}
- ${CMAKE} ${t_HEJ_DIR} # rerun cmake to create all test configure files
script:
- ${CTEST} --output-on-failure -j $(nproc --ignore=1)
artifacts: *artifacts_failed
## ----------- FOG build -----------
.FOG_build:
tags: *tags_def
only: *only_def
stage: FOG:build
before_script:
- date
- source /cvmfs/pheno.egi.eu/HEJ/HEJ_env.sh || exit 1
# load HEJ
- t_HEJ_INSTALL_DIR=${PWD}/${HEJ_INSTALL_DIR}
- export LD_LIBRARY_PATH=${t_HEJ_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
- export PATH=${t_HEJ_INSTALL_DIR}/bin:${PATH}
# prepare build
- t_FOG_DIR=${PWD}/FixedOrderGen
- t_FOG_INSTALL_DIR=${PWD}/${FOG_INSTALL_DIR}
- t_FOG_BUILD_DIR=${PWD}/${FOG_BUILD_DIR}
# hack to allow setting "variable in variable"
- t_CMAKE_FLAGS=""
- if [[ -n ${OVERWRITE_BOOST} ]]; then
declare -n t_boost_root=${OVERWRITE_BOOST};
t_CMAKE_FLAGS="-DBOOST_ROOT=${t_boost_root}";
fi
- mkdir -p ${t_FOG_BUILD_DIR}
- cd ${t_FOG_BUILD_DIR}
- ${CMAKE} ${t_FOG_DIR} -DCMAKE_BUILD_TYPE=DEBUG
-DCMAKE_INSTALL_PREFIX=${t_FOG_INSTALL_DIR} ${t_CMAKE_FLAGS}
script:
- make -j $(nproc --ignore=1)
- make install
artifacts:
# save build and installed folder
name: FOG_build
expire_in: 1d
paths:
- ${HEJ_INSTALL_DIR}
- ${FOG_INSTALL_DIR}
- ${FOG_BUILD_DIR}
## ----------- FOG test -----------
.FOG_test:
tags: *tags_def
only: *only_def
stage: FOG:test
before_script:
- date
- source /cvmfs/pheno.egi.eu/HEJ/HEJ_env.sh || exit 1
# load HEJ
- t_FOG_DIR=${PWD}/FixedOrderGen
- t_HEJ_INSTALL_DIR=${PWD}/${HEJ_INSTALL_DIR}
- t_FOG_INSTALL_DIR=${PWD}/${FOG_INSTALL_DIR}
- export LD_LIBRARY_PATH=${t_HEJ_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
- export PATH=${t_HEJ_INSTALL_DIR}/bin:${t_FOG_INSTALL_DIR}/bin:${PATH}
- t_FOG_BUILD_DIR=${PWD}/${FOG_BUILD_DIR}
- cd ${t_FOG_BUILD_DIR}
- ${CMAKE} ${t_FOG_DIR} # rerun cmake to create all test configure files
script:
- ${CTEST} --output-on-failure -j $(nproc --ignore=1)
artifacts: *artifacts_failed
# ---------------------------------
# - Build & Test -
# ---------------------------------
# ----------- basic -----------
build:basic:
image: ${DOCKER_BASIC}
extends: .HEJ_build
test:basic:
image: ${DOCKER_BASIC}
extends: .HEJ_test
dependencies:
- build:basic
FOG:build:basic:
image: ${DOCKER_BASIC}
extends: .FOG_build
dependencies:
- build:basic
FOG:test:basic:
image: ${DOCKER_BASIC}
extends: .FOG_test
dependencies:
- FOG:build:basic
# ----------- HighFive/hdf5 -----------
build:HighFive:
image: ${DOCKER_HIGHFIVE}
extends: .HEJ_build
variables:
CMAKE: cmake3
test:HighFive:
image: ${DOCKER_HIGHFIVE}
extends: .HEJ_test
variables:
CMAKE: cmake3
CTEST: ctest3
dependencies:
- build:HighFive
# ----------- QCDloop -----------
build:qcdloop:
image: ${DOCKER_QCDLOOP}
extends: .HEJ_build
test:qcdloop:
image: ${DOCKER_QCDLOOP}
extends: .HEJ_test
dependencies:
- build:qcdloop
# ----------- rivet3 & HepMC3 -----------
build:rivet3:
image: ${DOCKER_RIVET3}
extends: .HEJ_build
variables:
OVERWRITE_BOOST: boost_ROOT_DIR
test:rivet3:
image: ${DOCKER_RIVET3}
extends: .HEJ_test
dependencies:
- build:rivet3
script:
- ${CTEST} --output-on-failure -j $(nproc --ignore=1)
- bash -c '[ -f t/tst.yoda ]' && echo "found rivet output"
- rivet-cmphistos t/tst.yoda
- bash -c '[ -f MC_XS_XS.dat ]' && echo "yoda not empty"
# ----------- HepMC 3 (optional) -----------
# HepMC 3 already in rivet3
build:hepmc3:
image: ${DOCKER_HEPMC3}
extends: .HEJ_build
variables:
CMAKE: cmake3
only: # only run on specific branches
- master
- /^v\d+\.\d+$/
- merge_requests
manual:build:hepmc3:
extends: build:hepmc3
when: manual
only: # default only
- branches
- tags
test:hepmc3:
image: ${DOCKER_HEPMC3}
extends: .HEJ_test
variables:
CMAKE: cmake3
CTEST: ctest3
dependencies:
- build:hepmc3
only: # only run on specific branches
- master
- /^v\d+\.\d+$/
- merge_requests
manual:test:hepmc3:
extends: test:hepmc3
when: manual
only: # default only
- branches
- tags
dependencies:
- manual:build:hepmc3
# ----------- rivet (optional) -----------
# rivet2 already in qcdloop
build:rivet:
image: ${DOCKER_RIVET}
extends: .HEJ_build
only: # only run on specific branches
- master
- /^v\d+\.\d+$/
- merge_requests
manual:build:rivet:
extends: build:rivet
when: manual
only: # default only
- branches
- tags
test:rivet:
image: ${DOCKER_RIVET}
extends: .HEJ_test
dependencies:
- build:rivet
script:
- ${CTEST} --output-on-failure -j $(nproc --ignore=1)
- bash -c '[ -f t/tst.yoda ]' && echo "found rivet output"
- rivet-cmphistos t/tst.yoda
- bash -c '[ -f MC_XS_XS.dat ]' && echo "yoda not empty"
only: # only run on specific branches
- master
- /^v\d+\.\d+$/
- merge_requests
manual:test:rivet:
extends: test:rivet
when: manual
only: # default only
- branches
- tags
dependencies:
- manual:build:rivet
# ----------- rivet3 & HepMC2 (optional) -----------
# This shouldn't change too often
build:rivet3h2:
image: ${DOCKER_RIVET3H2}
extends: .HEJ_build
variables:
OVERWRITE_BOOST: boost_ROOT_DIR
only: # only run on specific branches
- master
- /^v\d+\.\d+$/
- merge_requests
manual:build:rivet3h2:
extends: build:rivet3h2
when: manual
only: # default only
- branches
- tags
test:rivet3h2:
image: ${DOCKER_RIVET3H2}
extends: .HEJ_test
dependencies:
- build:rivet3h2
script:
- ${CTEST} --output-on-failure -j $(nproc --ignore=1)
- bash -c '[ -f t/tst.yoda ]' && echo "found rivet output"
- rivet-cmphistos t/tst.yoda
- bash -c '[ -f MC_XS_XS.dat ]' && echo "yoda not empty"
only: # only run on specific branches
- master
- /^v\d+\.\d+$/
- merge_requests
manual:test:rivet3h2:
extends: test:rivet3h2
when: manual
only: # default only
- branches
- tags
dependencies:
- manual:build:rivet3h2
# ---------------------------------
# - Clean Code -
# ---------------------------------
No_tabs:
stage: clean_code
tags: *tags_def
only: *only_def
image: hejdock/git
dependencies: []
script:
- date
- check_tabs
artifacts: # don't save anything
# ----------- Template no compiler warnings -----------
.Warning_build:
extends: .HEJ_build
stage: clean_code
script:
- ${CMAKE} ${t_HEJ_DIR} -DCMAKE_CXX_FLAGS="-Werror"
-DCMAKE_BUILD_TYPE=RelWithDebInfo
- make -j $(nproc --ignore=1)
- make -j $(nproc --ignore=1) install
artifacts: # don't save anything
.Warning_FOG:
extends: .FOG_build
stage: FOG:clear_code
script:
- ${CMAKE} ${t_FOG_DIR} -DCMAKE_CXX_FLAGS="-Werror" ${t_CMAKE_FLAGS}
-DCMAKE_BUILD_TYPE=RelWithDebInfo
- make -j $(nproc --ignore=1)
- make -j $(nproc --ignore=1) install
artifacts: # don't save anything
# ----------- No gcc warnings -----------
No_Warning:basic:
image: ${DOCKER_BASIC}
extends: .Warning_build
No_Warning:basic:FOG:
image: ${DOCKER_BASIC}
extends: .Warning_FOG
dependencies:
- build:basic
# ----------- No clang warnings -----------
No_Warning:clang:
image: ${DOCKER_CLANG}
extends: .Warning_build
variables:
OVERWRITE_BOOST: boost_ROOT_DIR
artifacts:
# save installed folder
name: build
expire_in: 1d
paths:
- ${HEJ_INSTALL_DIR}
only: # only run on specific branches
- master
- /^v\d+\.\d+$/
- merge_requests
manual:No_Warning:clang:
extends: No_Warning:clang
when: manual
only: # default only
- branches
- tags
No_Warning:clang:FOG:
image: ${DOCKER_CLANG}
extends: .Warning_FOG
dependencies:
- No_Warning:clang
variables:
OVERWRITE_BOOST: boost_ROOT_DIR
only: # only run on specific branches
- master
- /^v\d+\.\d+$/
- merge_requests
manual:No_Warning:clang:FOG:
extends: No_Warning:clang:FOG
dependencies:
- manual:No_Warning:clang
when: manual
only: # default only
- branches
- tags
# ---------------------------------
# - Long tests -
# ---------------------------------
.HEJ_test_long:
extends: .HEJ_build
stage: long_test
script:
- ${CMAKE} ${t_HEJ_DIR} -DCMAKE_BUILD_TYPE=RelWithDebInfo ${t_CMAKE_FLAGS}
-DTEST_ALL=TRUE
- make -j $(nproc --ignore=1) install
- ${CTEST} --output-on-failure -j $(nproc --ignore=1)
only: # only run on specific branches
- master
- /^v\d+\.\d+$/
- merge_requests
# allow triggering long test manually
.HEJ_test_long:manual:
extends: .HEJ_test_long
when: manual
only: # default only
- branches
- tags
# ----------- QCDloop -----------
Long_test:qcdloop:
image: ${DOCKER_QCDLOOP}
extends: .HEJ_test_long
dependencies:
- build:qcdloop
manual:Long_test:qcdloop:
image: ${DOCKER_QCDLOOP}
extends: .HEJ_test_long:manual
dependencies:
- build:qcdloop
# ---------------------------------
# - Publish -
# ---------------------------------
Publish_version:
stage: publish
tags: *tags_def
image: hejdock/git
dependencies: []
artifacts: # don't save anything
only:
- /^v\d+\.\d+$/
except:
- tags
when: on_success
before_script:
- mkdir -p .ssh/ && echo "${SSH_KEY}" > .ssh/id_rsa && chmod 0600 .ssh/id_rsa
- rm -rf ~/.ssh/id_rsa; mkdir -p ~/.ssh/
- ln -s $PWD/.ssh/id_rsa ~/.ssh/id_rsa && chmod 0600 ~/.ssh/id_rsa
- ssh -T ${PUBLIC_GIT_PREFIX} -o "StrictHostKeyChecking no" || echo "added ssh"
script:
- git remote add public ${PUBLIC_GIT_PREFIX}${PUBLIC_GIT_POSTFIX}
- git checkout $CI_COMMIT_REF_NAME
- git branch
- git pull
- git push public
- git push public --tags
after_script:
- rm -f /root/.ssh/id_rsa && rm -fr .ssh
- git remote rm public
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Dec 21, 5:34 PM (12 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4023655
Default Alt Text
(13 KB)
Attached To
rHEJ HEJ
Event Timeline
Log In to Comment