Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • le.koch/cbmroot
  • patrick.pfistner_AT_kit.edu/cbmroot
  • lena.rossel_AT_stud.uni-frankfurt.de/cbmroot
  • i.deppner/cbmroot
  • fweig/cbmroot
  • karpushkin_AT_inr.ru/cbmroot
  • v.akishina/cbmroot
  • rishat.sultanov_AT_cern.ch/cbmroot
  • l_fabe01_AT_uni-muenster.de/cbmroot
  • pwg-c2f/cbmroot
  • j.decuveland/cbmroot
  • a.toia/cbmroot
  • i.vassiliev/cbmroot
  • n.herrmann/cbmroot
  • o.lubynets/cbmroot
  • se.gorbunov/cbmroot
  • cornelius.riesen_AT_physik.uni-giessen.de/cbmroot
  • zhangqn17_AT_mails.tsinghua.edu.cn/cbmroot
  • bartosz.sobol/cbmroot
  • ajit.kumar/cbmroot
  • computing/cbmroot
  • a.agarwal_AT_vecc.gov.in/cbmroot
  • osingh/cbmroot
  • wielanek_AT_if.pw.edu.pl/cbmroot
  • malgorzata.karabowicz.stud_AT_pw.edu.pl/cbmroot
  • m.shiroya/cbmroot
  • s.roy/cbmroot
  • p.-a.loizeau/cbmroot
  • a.weber/cbmroot
  • ma.beyer/cbmroot
  • d.klein/cbmroot
  • d.smith/cbmroot
  • mvdsoft/cbmroot
  • d.spicker/cbmroot
  • y.h.leung/cbmroot
  • aksharma/cbmroot
  • m.deveaux/cbmroot
  • mkunold/cbmroot
  • h.darwish/cbmroot
  • pk.sharma_AT_vecc.gov.in/cbmroot
  • f_fido01_AT_uni-muenster.de/cbmroot
  • g.kozlov/cbmroot
  • d.emschermann/cbmroot
  • evgeny.lavrik/cbmroot
  • v.friese/cbmroot
  • f.uhlig/cbmroot
  • ebechtel_AT_ikf.uni-frankfurt.de/cbmroot
  • a.senger/cbmroot
  • praisig/cbmroot
  • s.lebedev/cbmroot
  • redelbach_AT_compeng.uni-frankfurt.de/cbmroot
  • p.subramani/cbmroot
  • a_meye37_AT_uni-muenster.de/cbmroot
  • om/cbmroot
  • o.golosov/cbmroot
  • l.chlad/cbmroot
  • a.bercuci/cbmroot
  • d.ramirez/cbmroot
  • v.singhal/cbmroot
  • h.schiller/cbmroot
  • apuntke/cbmroot
  • f.zorn/cbmroot
  • rubio_AT_physi.uni-heidelberg.de/cbmroot
  • p.chudoba/cbmroot
  • apuntke/mcbmroot
  • r.karabowicz/cbmroot
66 results
Show changes
Commits on Source (3799)
ARG TAG=12-fair202211.4-rocm5.4
ARG REGISTRY=hub.cbm.gsi.de/computing/images/online
FROM ${REGISTRY}/dev:${TAG} as build
ARG SOURCE_DIR=/opt/cbm/src
WORKDIR ${SOURCE_DIR}
# Kaniko doesn't support RUN --mount, so we have to copy the source code instead
COPY . .
RUN .ci/online/scripts/install.sh
FROM ${REGISTRY}/runtime:${TAG}
ARG CBMROOT_PATH=/opt/cbm/cbmroot
ARG FAIRSOFT_PATH=/opt/cbm/fairsoft
COPY --from=build ${CBMROOT_PATH}/bin ${CBMROOT_PATH}/bin
COPY --from=build ${CBMROOT_PATH}/lib/*.so ${CBMROOT_PATH}/lib/
# FIXME HACK FOR DC OCT 23
COPY --from=build ${FAIRSOFT_PATH}/lib/libGenVector.so ${FAIRSOFT_PATH}/lib/.
COPY --from=build ${FAIRSOFT_PATH}/lib/libGenVector.so.6.26 ${FAIRSOFT_PATH}/lib/.
COPY --from=build ${FAIRSOFT_PATH}/lib/libGenVector.so.6.26.10 ${FAIRSOFT_PATH}/lib/.
COPY --from=build ${FAIRSOFT_PATH}/lib/libCore.so ${FAIRSOFT_PATH}/lib/.
COPY --from=build ${FAIRSOFT_PATH}/lib/libCore.so.6.26 ${FAIRSOFT_PATH}/lib/.
COPY --from=build ${FAIRSOFT_PATH}/lib/libCore.so.6.26.10 ${FAIRSOFT_PATH}/lib/.
ENV LD_LIBRARY_PATH=${CBMROOT_PATH}/lib:${FAIRSOFT_PATH}/lib:/opt/rocm/lib:${LD_LIBRARY_PATH}
ENV PATH=${CBMROOT_PATH}/bin:${PATH}
CMD ["cbmreco"]
FROM gcr.io/kaniko-project/executor:v1.16.0-debug
ARG USERNAME="username"
ARG PASSWORD="your_password"
ARG REGISTRY="hub.cbm.gsi.de"
ARG IMAGE="${REGISTRY}/computing/cbmroot/cbm_online"
ARG TAG="${USER}-debug"
RUN mkdir -p /kaniko/.docker
RUN echo "{\"auths\":{\"${REGISTRY}\":{\"username\":\"${USERNAME}\",\"password\":\"${PASSWORD}\"}}}" > /kaniko/.docker/config.json
# TODO: Mount CbmRoot source instead of copying it into the container (-> same with authentification...)
COPY . /workspace
ENV IMAGE=${IMAGE}
ENV TAG=${TAG}
ENTRYPOINT ["/bin/sh" , "-xc", "/kaniko/executor --context dir:///workspace --dockerfile /workspace/algo/containers/cbm_online/Dockerfile --destination $IMAGE:$TAG"]
#!/bin/bash
set -e
user="$1"
password="$2"
script=$(readlink -f "$0")
function check_arg() {
if [ -z "$1" ]; then
echo "Error: No $2 specified."
echo "Usage: $script <user> <password>"
exit 1
fi
}
check_arg "$user" "user"
check_arg "$password" "password"
# Set tag as optional third argument
if [ -z "$3" ]; then
tag="$user-debug"
else
tag="$3"
fi
# This script must be run from the CbmRoot top level directory.
# Check for .git, .clang-format, and .gitlab-ci.yml
if [ ! -d .git ] || [ ! -f .clang-format ] || [ ! -f .gitlab-ci.yml ]; then
echo "Error: This script must be run from the CbmRoot top level directory."
exit 1
fi
registry="hub.cbm.gsi.de/computing/cbmroot"
image="cbm_online"
build_args=" \
--build-arg="USERNAME=$user" \
--build-arg="PASSWORD=$password" \
--build-arg="TAG=$tag" \
"
dockerfile="algo/containers/cbm_online/DockerfileBuild"
docker build --progress plain $build_args -f $dockerfile -t cbm_online_builder .
#!/bin/bash
set -e
srcdir=cbmroot
build_type=RelWithDebInfo
install_prefix=/opt/cbm/cbmroot
fairsoft_path=/opt/cbm/fairsoft
enable_hip=ON
rocm_root=/opt/rocm
hip_archs="gfx906;gfx908" # MI50;MI100
n_jobs=16
cmake_args="-DCMAKE_INSTALL_PREFIX=$install_prefix \
-DCMAKE_BUILD_TYPE=$build_type \
-DSIMPATH=$fairsoft_path \
-DXPU_ENABLE_HIP=$enable_hip \
-DXPU_ROCM_ROOT=$rocm_root \
-DXPU_HIP_ARCH=$hip_archs \
"
ln -s ../cmake algo/cmake
cmake -S algo -B build $cmake_args
cmake --build build -j$n_jobs --target install
#! /bin/bash
set -e
IMAGE=hub.cbm.gsi.de/fweig/containers/cbm_online:online-container
DOCKER_FLAGS=" \
--rm \
-it \
--mount type=bind,source=$HOME/cbm/params,target=/opt/cbm/params \
--mount type=bind,source=/home/cbmdata/mcbm22/2391,target=/opt/cbm/data \
"
CMD="cbmreco"
CMD_FLAGS=" \
-p /opt/cbm/params \
-i /opt/cbm/data/2391_node8_1_0000.tsa \
-n 1 \
--omp 1 \
"
docker run $DOCKER_FLAGS $IMAGE $CMD $CMD_FLAGS
# docker run $DOCKER_FLAGS $IMAGE ls -l /opt/cbm/data
#! /bin/bash
set -e
IMAGE=hub.cbm.gsi.de/fweig/containers/cbm_online:online-container
DOCKER_FLAGS=" \
--rm \
-it \
--mount type=bind,source=$HOME/cbm/params,target=/opt/cbm/params \
--mount type=bind,source=/home/cbmdata/mcbm22/2391,target=/opt/cbm/data \
--device=/dev/kfd \
--device=/dev/dri \
--security-opt seccomp=unconfined \
--group-add video
"
CMD="cbmreco"
CMD_FLAGS=" \
-p /opt/cbm/params \
-i /opt/cbm/data/2391_node8_1_0000.tsa \
-n 1 \
--omp 1\
-l info \
-d hip1 \
"
# CMD=xpuinfo
# CMD_FLAGS=
docker run $DOCKER_FLAGS $IMAGE $CMD $CMD_FLAGS
# docker run $DOCKER_FLAGS $IMAGE ls -l /opt/cbm/data
---
AccessModifierOffset: -2
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
#AlignConsecutiveMacros: true
AlignConsecutiveAssignments: true
AlignConsecutiveBitFields: true
AlignConsecutiveDeclarations: false
#AlignConsecutiveMacros: true
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
#AllowAllArgumentsOnNextLine: true
#AllowAllConstructorInitializersOnNextLine: true
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
#AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
#AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
# Discuss
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Attach
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: AfterColon
ColumnLimit: 80
#Discuss
BreakStringLiterals: true
ColumnLimit: 120
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
DeriveLineEnding: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
IncludeBlocks: Preserve
# Implement ordering of include statements
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^("|<)Cbm'
Priority: 1
- Regex: '^("|<).*/Cbm'
Priority: 1
- Regex: '".*"'
Priority: 1
- Regex: '^("|<).*slice'
Priority: 2
- Regex: '^("|<)Monitor.hpp'
Priority: 2
- Regex: '^("|<)System.hpp'
Priority: 2
- Regex: '^("|<)Fair'
Priority: 3
- Regex: '^("|<)Logger.h'
Priority: 3
- Regex: '^("|<)T.*\.h'
Priority: 4
- Regex: '^("|<)Rt.*\.h'
Priority: 4
- Regex: '^("|<)boost'
Priority: 5
- Regex: '^<.*[^\.]h>'
Priority: 6
- Regex: '^<.*[^\.h]>'
Priority: 6
- Regex: '^<.*>'
Priority: 7
- Regex: '.*'
Priority: 8
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: Indent
IndentGotoLabels: false
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
Language: Cpp
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
#Discuss Penalties
PenaltyBreakAssignment: 2
PointerAlignment: Left
ReflowComments: false
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
#SpaceAfterLogicalNot: true
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
WhitespaceSensitiveMacros: ['CBM_ENUM_DICT', 'CBM_YAML_PROPERTIES']
StatementMacros: ['CBM_PARALLEL_FOR']
Standard: c++11
TabWidth: 8
UseCRLF: false
UseTab: Never
...
Checks: '-*,modernize-deprecated-headers'
WarningsAsErrors: ''
HeaderFilterRegex: '.*'
AnalyzeTemporaryDtors: false
FormatStyle: file
CheckOptions:
- key: modernize-deprecated-headers.CheckHeaderFile
value: 'true'
...
.git
.vscode
/geometry
/input
/parameters
/build
/algo/external
# exclude top level directories
# which are taken from other git repositories
# The / at the beginning is important, otherwise all directories
# containing the string are ignored
# containing the string are ignored
/geometry
/input
/parameters
/qa_data
/build
/algo/external
# Comment some single files
Dart*.cfg
# gdb Crash dumps
**/core_dump_*
# Git rebase backoup files
**/*.orig
# IDEs
.vscode
stages:
- check
- checkRepository
- checkFormat
- build
- package
- verify
- finalise
- documentation
CbmRoot_Continuous:
stage: build
RebaseCheck:
stage: checkRepository
variables:
GIT_DEPTH: 200
image: alpine
tags:
- CbmRoot
- docker
only:
refs:
- master
- merge_requests
variables:
- $CI_PROJECT_PATH == "computing/cbmroot"
cache:
paths:
- build/
- external/DataTree/
- external/DataTreeQA/
- external/KFParticle/
- external/NicaFemto/
- external/Vc/
- external/cppzmq/
- external/flib_dpb/flib_dpb/
- external/flib_dpb_20/
- external/ipc/ipc/
- external/ipc_legacy/ipc/
- external/jsroot/
- external/spadic/spadic/
- input
- geometry
- parameters
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^DC_.*$/
script:
- set -xv
- mkdir -p build
- cd build
- find . -name "*.root" -delete
- find . -name "*_ok" -delete
- find . -name "all_*.par" -delete
- cd ..
- echo "export LINUX_FLAVOUR=Debian8.11" >> Dart.cfg
- echo "export FAIRSOFT_VERSION=jun19p1" >> Dart.cfg
- echo "export FAIRROOT_VERSION=v18.2.0" >> Dart.cfg
- echo "export SIMPATH=/cvmfs/fairroot.gsi.de/fairsoft/\${FAIRSOFT_VERSION}" >> Dart.cfg
- echo "export FAIRROOTPATH=/cvmfs/fairroot.gsi.de/fairroot/\${FAIRROOT_VERSION}_fairsoft-\${FAIRSOFT_VERSION}" >> Dart.cfg
- echo "export BUILDDIR=$PWD/build" >> Dart.cfg
- echo "export SOURCEDIR=$PWD" >> Dart.cfg
- echo "export NCPU=5" >> Dart.cfg
- echo "export PATH=\$SIMPATH/bin:$PATH" >> Dart.cfg
- ls
- pwd
- cat Dart.cfg
- $PWD/Dart.sh Continuous Dart.cfg
- cd build
- find . -name "*.root" -delete
- find . -name "*_ok" -delete
- find . -name "all_*.par" -delete
- cd ..
FormatCheck:
stage: check
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
# Check if a rebase is needed
# If a rebase is needed stop immediately
- apk update && apk add git bash
- scripts/connect_upstream_repo.sh $CI_MERGE_REQUEST_PROJECT_URL
- git fetch upstream
- hash1=$(git show-ref upstream/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME | cut -f1 -d' ')
- hash2=$(git merge-base upstream/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME HEAD)
- echo "${hash1}"
- echo "${hash2}"
- if [ "${hash1}" = "${hash2}" ]; then
- echo "No rebase required"
- exit 0
- else
- echo "The Merge Request is not up-to-date"
- echo "Rebase is required"
- exit 1
- fi
LinearHistCheck:
stage: checkRepository
variables:
GIT_DEPTH: 200
image: alpine
tags:
- CbmRoot
- docker
only:
refs:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^DC_.*$/
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparisson
# comparison
# Check if the history introduced by the MR is linear (no branch loop in fork)
# If not linear stop immediately
- apk update && apk add git bash
- scripts/connect_upstream_repo.sh $CI_MERGE_REQUEST_PROJECT_URL
- git fetch upstream
- echo "export FAIRSOFT_VERSION=jun19p1" > env.sh
- echo "export FAIRROOT_VERSION=v18.2.0" >> env.sh
- echo "export SIMPATH=/cvmfs/fairroot.gsi.de/fairsoft/\${FAIRSOFT_VERSION}" >> env.sh
- echo "export FAIRROOTPATH=/cvmfs/fairroot.gsi.de/fairroot/\${FAIRROOT_VERSION}_fairsoft-\${FAIRSOFT_VERSION}" >> env.sh
- count=$(git rev-list --min-parents=2 --count upstream/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME..HEAD)
- echo "${count}"
- if [ 0 = "${count}" ]; then
- echo "History introduced in fork is linear"
- exit 0
- else
- echo "History introduced in fork is not linear"
- echo "${count} merge commits must be removed or the other new commits have to be replayed in a new branch"
- exit 1
- fi
CodeFormatCheck:
stage: checkFormat
tags:
- CbmRoot_apptainer
only:
refs:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^DC_.*$/
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
- scripts/connect_upstream_repo.sh $CI_MERGE_REQUEST_PROJECT_URL
- git fetch upstream
- echo "export FAIRSOFT_VERSION=apr21p2" > env.sh
- echo "export FAIRROOT_VERSION=v18.6.7" >> env.sh
- echo "export SIMPATH=/cvmfs/fairsoft.gsi.de/debian10/fairsoft/\${FAIRSOFT_VERSION}" >> env.sh
- echo "export FAIRROOTPATH=/cvmfs/fairsoft.gsi.de/debian10/fairroot/\${FAIRROOT_VERSION}_fs_\${FAIRSOFT_VERSION}" >> env.sh
- echo "export BUILDDIR=$PWD/build" >> env.sh
- echo "export SOURCEDIR=$PWD" >> env.sh
- echo "export PATH=/cvmfs/fairroot.gsi.de/clang-format-8.0.1:\$SIMPATH/bin:$PATH:/cvmfs/it.gsi.de/compiler/llvm/6.0.1/bin/" >> env.sh
- echo "export PATH=/cvmfs/cbm.gsi.de/debian10/clang-format-11.0.0/bin:\$SIMPATH/bin:$PATH" >> env.sh
- echo "export LABEL=format-check_MR-\${CI_MERGE_REQUEST_IID}" >> env.sh
- echo "export FAIRROOT_FORMAT_BASE=upstream/\${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}" >> env.sh
- . ./env.sh && ctest -S cmake/scripts/checkformat.cmake -VV
variables:
CONTAINER: "/cvmfs/vae.gsi.de/debian10/containers/user_container-production.sif"
OS: debian10
# FAIRSOFT_VERSION: nov22p1
# FAIRROOT_VERSION: v18.8.0
# BASE_PATH: "/opt"
# SIMPATH: "$BASE_PATH/fairsoft/$FAIRSOFT_VERSION"
# FAIRROOTPATH: "$BASE_PATH/fairroot/${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
CbmRoot_Merge:
stage: build
#CodeTidyCheck:
# stage: checkFormat
# tags:
# - CbmRoot_apptainer
# only:
# refs:
# - merge_requests
# variables:
# - $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
# script:
# # Get the upstream repository manually. I did not find any other way to have it for
# # comparison
# - scripts/connect_upstream_repo.sh $CI_MERGE_REQUEST_PROJECT_URL
# - git fetch upstream
# - echo "export FAIRSOFT_VERSION=$FAIRSOFT_VERSION" > env.sh
# - echo "export FAIRROOT_VERSION=$FAIRROOT_VERSION" >> env.sh
# - echo "export SIMPATH=/opt/fairsoft/\${FAIRSOFT_VERSION}" >> env.sh
# - echo "export FAIRROOTPATH=/opt/fairroot/\${FAIRROOT_VERSION}_\${FAIRSOFT_VERSION}" >> env.sh
# - echo "export BUILDDIR=$PWD/build" >> env.sh
# - echo "export SOURCEDIR=$PWD" >> env.sh
# - echo "export PATH=/cvmfs/cbm.gsi.de/clang-format-11.0.0/bin:\$SIMPATH/bin:$PATH" >> env.sh
# - echo "export LABEL=tidy-check_MR-${CI_MERGE_REQUEST_IID}" >> env.sh
# - echo "export FAIRROOT_TIDY_BASE=upstream/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}" >> env.sh
# - echo "export NCPU=8"
# - . ./env.sh && ctest -S cmake/scripts/checktidy.cmake -VV
# after_script:
# - rm -rf build
# variables:
# CONTAINER: "/cvmfs/cbm.gsi.de/containers/debian12_v18.8.0_nov22p1_1.sif"
# OS: debian12
# FAIRSOFT_VERSION: nov22p1
# FAIRROOT_VERSION: v18.8.0
# BASE_PATH: "/opt"
# SIMPATH: "$BASE_PATH/fairsoft/$FAIRSOFT_VERSION"
# FAIRROOTPATH: "$BASE_PATH/fairroot/${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
FileFormatCheck:
stage: checkFormat
image: alpine
tags:
- CbmRoot
- docker
only:
refs:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^DC_.*$/
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
- apk update && apk add git bash file
- scripts/connect_upstream_repo.sh $CI_MERGE_REQUEST_PROJECT_URL
- git fetch upstream
- scripts/check-file-format.sh upstream
FileEndCheck:
stage: checkFormat
image: alpine
tags:
- docker
only:
refs:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^DC_.*$/
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
- apk update && apk add git bash file
- scripts/connect_upstream_repo.sh $CI_MERGE_REQUEST_PROJECT_URL
- git fetch upstream
- scripts/check-file-ending.sh upstream
CheckForNonASCII:
stage: checkFormat
image: alpine
tags:
- docker
only:
refs:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^DC_.*$/
script:
- echo $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH
- echo $CI_MERGE_REQUEST_PROJECT_PATH
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
- apk update && apk add git bash file pcre-tools
- scripts/connect_upstream_repo.sh $CI_MERGE_REQUEST_PROJECT_URL
- git fetch upstream
- scripts/check-non-ascii-characters.sh upstream
FileLicenceCheck:
stage: checkFormat
image: alpine
tags:
- docker
only:
refs:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^DC_.*$/
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
- apk update && apk add git bash file
- scripts/connect_upstream_repo.sh $CI_MERGE_REQUEST_PROJECT_URL
- git fetch upstream
- scripts/check-licence-header.sh upstream
#
# job template
#
.build_and_test: &build_and_test
timeout: 1h # Possible since Gitlab 15.7, job-level timeout can exceed project timeout but not Runner timeout
before_script:
- if [ "$CI_MERGE_REQUEST_PROJECT_PATH" != "computing/cbmroot" ]; then
- echo "Should not come here"
- exit 1
- if [ "$CI_PROJECT_PATH" != "computing/cbmroot" ]; then
- echo "Should not come here"
- env
- exit 1
- fi
- fi
script:
- echo "export LINUX_FLAVOUR=$OS" >> Dart.cfg
- echo "export SIMPATH=$SIMPATH" >> Dart.cfg
- echo "export FAIRROOTPATH=$FAIRROOTPATH" >> Dart.cfg
- if [[ -n $RAW_DATA_PATH ]]; then
- echo "export RAW_DATA_PATH=$RAW_DATA_PATH" >> Dart.cfg
- fi
- echo $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
- echo $CI_MERGE_REQUEST_ID
- echo $CI_MERGE_REQUEST_IID
- echo "export LINUX_FLAVOUR=Debian8.11" >> Dart.cfg
- echo "export FAIRSOFT_VERSION=jun19p1" >> Dart.cfg
- echo "export FAIRROOT_VERSION=v18.2.0" >> Dart.cfg
- echo "export SIMPATH=/cvmfs/fairroot.gsi.de/fairsoft/\${FAIRSOFT_VERSION}" >> Dart.cfg
- echo "export FAIRROOTPATH=/cvmfs/fairroot.gsi.de/fairroot/\${FAIRROOT_VERSION}_fairsoft-\${FAIRSOFT_VERSION}" >> Dart.cfg
- echo "export BUILDDIR=$PWD/build" >> Dart.cfg
- echo "export SOURCEDIR=$PWD" >> Dart.cfg
- echo "export NCPU=5" >> Dart.cfg
- echo "export PATH=\$SIMPATH/bin:$PATH" >> Dart.cfg
- ls
- pwd
- cat Dart.cfg
- $PWD/Dart.sh MergeRequest Dart.cfg
- if [[ -n $EXTRA_PATH ]]; then
- echo "export PATH=$EXTRA_PATH:$PATH" >> Dart.cfg
- fi
- if [[ -n $EXTRA_FLAGS ]]; then
- echo "export EXTRA_FLAGS=$EXTRA_FLAGS" >> Dart.cfg
- fi
- if [[ -n $INSTALL_PROJECT ]]; then
- echo "export INSTALL_PROJECT=TRUE" >> Dart.cfg
- fi
- ./scripts/find_cijob_ctest_stop_time.sh Dart.cfg
- if [[ -n $CI_TEST_STAGE_TOTAL_TIME_LIMIT ]]; then
- echo "export CI_TEST_STAGE_TOTAL_TIME_LIMIT=$CI_TEST_STAGE_TOTAL_TIME_LIMIT" >> Dart.cfg
- fi
- if [[ -n $CONFIGFILE ]]; then
- source $CONFIGFILE $FAIRSOFT_VERSION
- fi
- $PWD/Dart.sh $BUILD_TYPE Dart.cfg
after_script:
- rm -rf build
#
# job element definitions
#
.realData_tag: &realData_tag
stage: build
tags:
- CbmRoot_realData
.realData_variables: &realData_variables
OS: "Debian12"
NCPU: 16
RAW_DATA_PATH: "/opt/cbmsoft/beamtime-test-data/reduced/"
FAIRSOFT_VERSION: "apr21p2"
FAIRROOT_VERSION: "v18.6.7"
BASE_PATH: "/opt/"
SIMPATH: "$BASE_PATH/fairsoft/$FAIRSOFT_VERSION"
FAIRROOTPATH: "$BASE_PATH/fairroot/${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
CHECK_GEO_HASH_CHANGE: "1"
CI_TEST_STAGE_TOTAL_TIME_LIMIT: 1500 # in seconds = 25 minutes
.apptainer_tag: &apptainer_tag
stage: build
tags:
- CbmRoot_apptainer
.apptainer_vae23_variables_apr21: &apptainer_vae23_variables_apr21
CONTAINER: "/cvmfs/vae.gsi.de/vae23/containers/user_container-production.sif"
OS: vae23
FAIRSOFT_VERSION: apr21p2
FAIRROOT_VERSION: v18.6.7
BASE_PATH: "/cvmfs/fairsoft.gsi.de/debian10/"
SIMPATH: "$BASE_PATH/fairsoft/$FAIRSOFT_VERSION"
FAIRROOTPATH: "$BASE_PATH/fairroot/${FAIRROOT_VERSION}_fs_${FAIRSOFT_VERSION}"
CONFIGFILE: "/cvmfs/cbm.gsi.de/debian10/bin/setup_development_environment.sh"
INSTALL_PROJECT: "TRUE"
EXTRA_FLAGS: '"-DCBM_TEST_INSTALL=TRUE"'
.apptainer_vae23_variables_nov22p1: &apptainer_vae23_variables_nov22p1
CONTAINER: "/cvmfs/vae.gsi.de/vae23/containers/user_container-production.sif"
OS: vae23
FAIRSOFT_VERSION: nov22p1
FAIRROOT_VERSION: v18.8.0
BASE_PATH: "/cvmfs/fairsoft.gsi.de/debian10/"
SIMPATH: "$BASE_PATH/fairsoft/$FAIRSOFT_VERSION"
FAIRROOTPATH: "$BASE_PATH/fairroot/${FAIRROOT_VERSION}_fs_${FAIRSOFT_VERSION}"
CONFIGFILE: "/cvmfs/cbm.gsi.de/debian10/bin/setup_development_environment.sh"
INSTALL_PROJECT: "TRUE"
EXTRA_FLAGS: '"-DCBM_TEST_INSTALL=TRUE"'
.apptainer_vae24_variables_nov22p3: &apptainer_vae24_variables_nov22p3
CONTAINER: "/cvmfs/vae.gsi.de/vae24/containers/user_container-production.sif"
OS: vae24
FAIRSOFT_VERSION: nov22p3
FAIRROOT_VERSION: v18.8.0
BASE_PATH: "/cvmfs/fairsoft.gsi.de/debian11/"
SIMPATH: "$BASE_PATH/fairsoft/$FAIRSOFT_VERSION"
FAIRROOTPATH: "$BASE_PATH/fairroot/${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
CONFIGFILE: "/cvmfs/cbm.gsi.de/debian11/bin/setup_development_environment.sh"
INSTALL_PROJECT: "TRUE"
EXTRA_FLAGS: '"-DCBM_TEST_INSTALL=TRUE"'
.apptainer_vae24_variables_jan24p1: &apptainer_vae24_variables_jan24p1
CONTAINER: "/cvmfs/vae.gsi.de/vae24/containers/user_container-production.sif"
OS: vae24
FAIRSOFT_VERSION: jan24p1
FAIRROOT_VERSION: v18.8.2
BASE_PATH: "/cvmfs/fairsoft.gsi.de/debian11/"
SIMPATH: "$BASE_PATH/fairsoft/$FAIRSOFT_VERSION"
FAIRROOTPATH: "$BASE_PATH/fairroot/${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
CONFIGFILE: "/cvmfs/cbm.gsi.de/debian11/bin/setup_development_environment.sh"
INSTALL_PROJECT: "TRUE"
EXTRA_FLAGS: '"-DCBM_TEST_INSTALL=TRUE"'
.apptainer_debian11_variables_apr21: &apptainer_debian11_variables_apr21
CONTAINER: "/cvmfs/cbm.gsi.de/containers/debian11_v18.6.7_apr21p2_1.sif"
OS: debian11
FAIRSOFT_VERSION: apr21p2
FAIRROOT_VERSION: v18.6.7
BASE_PATH: "/opt/"
SIMPATH: "$BASE_PATH/fairsoft/${FAIRSOFT_VERSION}"
FAIRROOTPATH: "$BASE_PATH/fairroot/${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
INSTALL_PROJECT: "TRUE"
EXTRA_FLAGS: '"-DCBM_TEST_INSTALL=TRUE"'
.apptainer_debian12_variables_nov22p1: &apptainer_debian12_variables_nov22p1
CONTAINER: "/cvmfs/cbm.gsi.de/containers/debian12_v18.8.0_nov22p1_2.sif"
OS: debian12
FAIRSOFT_VERSION: nov22p1
FAIRROOT_VERSION: v18.8.0
BASE_PATH: "/opt"
SIMPATH: "$BASE_PATH/fairsoft/$FAIRSOFT_VERSION"
FAIRROOTPATH: "$BASE_PATH/fairroot/${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
INSTALL_PROJECT: "TRUE"
EXTRA_FLAGS: '"-DCBM_TEST_INSTALL=TRUE"'
.linux_tag: &linux_tag
stage: build
tags:
- CbmRoot
# Possible since Gitlab 15.7, job-level timeout can exceed project timeout but not Runner timeout
timeout: 1h 30m # Continuous tests after merge need more time than the pre-merge CI
.linux_variables: &linux_variables
OS: "Debian12"
NCPU: 5
FAIRSOFT_VERSION: "nov22p1"
FAIRROOT_VERSION: "v18.8.0"
BASE_PATH: "/cvmfs/fairsoft.gsi.de/debian12"
SIMPATH: "$BASE_PATH/fairsoft/$FAIRSOFT_VERSION"
FAIRROOTPATH: "$BASE_PATH/fairroot/${FAIRROOT_VERSION}_fs_${FAIRSOFT_VERSION}"
EXTRA_PATH: "${SIMPATH}/bin"
CI_TEST_STAGE_TOTAL_TIME_LIMIT: 1800 # in seconds = 30 m, Continuous tests after merge need longer than pre-merge CI
.macosx_tag: &macosx_tag
stage: build
tags:
- qemu_macosx
.macosx_13_variables_nov22p1: &macosx_13_variables_nov22p1
OS: "macOS13"
FAIRSOFT_VERSION: "nov22p1"
FAIRROOT_VERSION: "v18.8.0"
BASE_PATH: "/opt"
SIMPATH: "$BASE_PATH/fairsoft/$FAIRSOFT_VERSION"
FAIRROOTPATH: "$BASE_PATH/fairroot/${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
IMAGE_NAME: "${OS}_${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
EXTRA_PATH: /usr/local/bin
.macosx_12_variables_nov22p1: &macosx_12_variables_nov22p1
OS: "macOS12"
FAIRSOFT_VERSION: "nov22p1"
FAIRROOT_VERSION: "v18.8.0"
BASE_PATH: "/opt"
SIMPATH: "$BASE_PATH/fairsoft/$FAIRSOFT_VERSION"
FAIRROOTPATH: "$BASE_PATH/fairroot/${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
IMAGE_NAME: "${OS}_${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
EXTRA_PATH: /usr/local/bin
.macosx_11_variables_nov22p1: &macosx_11_variables_nov22p1
OS: "macOS11"
FAIRSOFT_VERSION: "nov22p1"
FAIRROOT_VERSION: "v18.8.0"
BASE_PATH: "/opt"
SIMPATH: "$BASE_PATH/fairsoft/$FAIRSOFT_VERSION"
FAIRROOTPATH: "$BASE_PATH/fairroot/${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
IMAGE_NAME: "${OS}_${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
EXTRA_PATH: /usr/local/bin
.macosx_1015_variables: &macosx_1015_variables
OS: "macOS1015"
FAIRSOFT_VERSION: "apr21p2"
FAIRROOT_VERSION: "v18.6.7"
BASE_PATH: "/opt"
SIMPATH: "$BASE_PATH/fairsoft/$FAIRSOFT_VERSION"
FAIRROOTPATH: "$BASE_PATH/fairroot/${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
IMAGE_NAME: "${OS}_${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
EXTRA_PATH: /usr/local/bin
.macosx_12_variables: &macosx_12_variables
OS: "macOS12"
FAIRSOFT_VERSION: "apr21p2"
FAIRROOT_VERSION: "v18.6.7"
BASE_PATH: "/opt"
SIMPATH: "$BASE_PATH/fairsoft/$FAIRSOFT_VERSION"
FAIRROOTPATH: "$BASE_PATH/fairroot/${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
IMAGE_NAME: "${OS}_${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
EXTRA_PATH: /usr/local/bin
.macosx_11_variables: &macosx_11_variables
OS: "macOS11"
FAIRSOFT_VERSION: "apr21p2"
FAIRROOT_VERSION: "v18.6.7"
BASE_PATH: "/opt"
SIMPATH: "$BASE_PATH/fairsoft/$FAIRSOFT_VERSION"
FAIRROOTPATH: "$BASE_PATH/fairroot/${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
IMAGE_NAME: "${OS}_${FAIRROOT_VERSION}_${FAIRSOFT_VERSION}"
EXTRA_PATH: /usr/local/bin
.mergeVariables: &mergeVariables
BUILD_TYPE: "Continuous"
.mergeRequestVariables: &mergeRequestVariables
BUILD_TYPE: "MergeRequest"
.check_merge_request: &check_merge_request
only:
refs:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
.check_merge: &check_merge
only:
refs:
- master
variables:
- $CI_PROJECT_PATH == "computing/cbmroot"
#
# job matrix for build jobs
#
CbmRoot_Merge_realData:
<<: [*realData_tag, *check_merge_request, *build_and_test]
variables:
<<: [*mergeRequestVariables, *realData_variables]
CbmRoot_Merge_Apptainer_debian12_nov22p1:
<<: [*apptainer_tag, *check_merge_request, *build_and_test]
variables:
<<: [*mergeRequestVariables, *apptainer_debian12_variables_nov22p1]
CbmRoot_Merge_Apptainer_debian11_apr21:
<<: [*apptainer_tag, *check_merge_request, *build_and_test]
variables:
<<: [*mergeRequestVariables, *apptainer_debian11_variables_apr21]
CbmRoot_Merge_Apptainer_vae23_apr21:
<<: [*apptainer_tag, *check_merge_request, *build_and_test]
variables:
<<: [*mergeRequestVariables, *apptainer_vae23_variables_apr21]
CbmRoot_Merge_Apptainer_vae23_nov22p1:
<<: [*apptainer_tag, *check_merge_request, *build_and_test]
variables:
<<: [*mergeRequestVariables, *apptainer_vae23_variables_nov22p1]
CbmRoot_Merge_Apptainer_vae24_nov22p3:
<<: [*apptainer_tag, *check_merge_request, *build_and_test]
variables:
<<: [*mergeRequestVariables, *apptainer_vae24_variables_nov22p3]
CbmRoot_Merge_Apptainer_vae24_jan24p1:
<<: [*apptainer_tag, *check_merge_request, *build_and_test]
variables:
<<: [*mergeRequestVariables, *apptainer_vae24_variables_jan24p1]
CbmRoot_Merge_macosx_13_nov22p1:
<<: [*macosx_tag, *check_merge_request, *build_and_test]
variables:
<<: [*mergeRequestVariables, *macosx_13_variables_nov22p1]
CbmRoot_Merge_macosx_12_nov22p1:
<<: [*macosx_tag, *check_merge_request, *build_and_test]
variables:
<<: [*mergeRequestVariables, *macosx_12_variables_nov22p1]
CbmRoot_Merge_macosx_11_nov22p1:
<<: [*macosx_tag, *check_merge_request, *build_and_test]
variables:
<<: [*mergeRequestVariables, *macosx_11_variables_nov22p1]
CbmRoot_Merge_macosx_1015:
<<: [*macosx_tag, *check_merge_request, *build_and_test]
variables:
<<: [*mergeRequestVariables, *macosx_1015_variables]
CbmRoot_Merge_macosx_11:
<<: [*macosx_tag, *check_merge_request, *build_and_test]
variables:
<<: [*mergeRequestVariables, *macosx_11_variables]
CbmRoot_Merge_macosx_12:
<<: [*macosx_tag, *check_merge_request, *build_and_test]
variables:
<<: [*mergeRequestVariables, *macosx_12_variables]
CbmRoot_Continuous:
<<: [*linux_tag, *check_merge, *build_and_test]
variables:
<<: [*mergeVariables, *linux_variables]
BuildOnlineContainerMR:
stage: package
only:
refs:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
needs:
- CodeFormatCheck
- FileFormatCheck
- FileEndCheck
- FileLicenceCheck
tags:
- docker
image:
name: $CI_REGISTRY/computing/images/base/kaniko/executor:v1.20.1-debug
entrypoint: [""]
variables:
IMAGE_NAME: $CI_REGISTRY_IMAGE/cbm_online
IMAGE_TAG: mr$CI_MERGE_REQUEST_IID
DOCKERFILE: $CI_PROJECT_DIR/.ci/online/Dockerfile
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context dir://$CI_PROJECT_DIR --dockerfile $DOCKERFILE --destination $IMAGE_NAME:$IMAGE_TAG
# Cache settings suggested by Copilot: --cache=true --cache-repo=${IMAGE_NAME} --cache-ttl=168h --cache-shared=true --cache-dir=/cache
# TODO: Test if these work
# Ensure the container we just build is usable, and not missing any dependencies
VerifyOnlineContainerMR:
stage: verify
only:
refs:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
needs:
- BuildOnlineContainerMR
tags:
- docker
variables:
IMAGE_NAME: $CI_REGISTRY_IMAGE/cbm_online
IMAGE_TAG: mr$CI_MERGE_REQUEST_IID
image: $IMAGE_NAME:$IMAGE_TAG
script:
- cbmreco --help
# Create container for master and DC_* branches on merge
BuildOnlineContainerBranch:
stage: package
only:
- master@computing/cbmroot
- nightly_master@computing/cbmroot
- /^DC_.*$/@computing/cbmroot
needs: [] # Don't wait for continuous build, start immediately
tags:
- docker
image:
name: $CI_REGISTRY/computing/images/base/kaniko/executor:v1.20.1-debug
entrypoint: [""]
variables:
IMAGE_NAME: $CI_REGISTRY_IMAGE/cbm_online
IMAGE_TAG: $CI_COMMIT_BRANCH
DOCKERFILE: $CI_PROJECT_DIR/.ci/online/Dockerfile
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context dir://$CI_PROJECT_DIR --dockerfile $DOCKERFILE --destination $IMAGE_NAME:$IMAGE_TAG
VerifyOnlineContainerBranch:
stage: verify
only:
- master@computing/cbmroot
- nightly_master@computing/cbmroot
- /^DC_.*$/@computing/cbmroot
needs:
- BuildOnlineContainerBranch
tags:
- docker
variables:
IMAGE_NAME: $CI_REGISTRY_IMAGE/cbm_online
IMAGE_TAG: $CI_COMMIT_BRANCH
image: $IMAGE_NAME:$IMAGE_TAG
script:
- cbmreco --help
InformCodeOwners:
stage: finalise
tags:
- Code_Owners
only:
refs:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
- scripts/connect_upstream_repo.sh $CI_MERGE_REQUEST_PROJECT_URL
- git fetch upstream
- scripts/inform_codeowners.sh upstream
pages:
stage: documentation
......@@ -121,11 +642,12 @@ pages:
tags:
- docker
script:
- apk update && apk add doxygen
- apk update && apk add doxygen graphviz
- doxygen doxygen/cbmDoxyfile.conf
- mv html-doc/html public/
artifacts:
expire_in: 1 day
paths:
- public
only:
- doxygen
- nightly_master
# The name of our project is "CBMROOT". CMakeLists files in this project can
# refer to the root source directory of the project as ${CBMROOT_SOURCE_DIR} or
# as ${CMAKE_SOURCE_DIR} and to the root binary directory of the project as
# ${CBMROOT_BINARY_DIR} or ${CMAKE_BINARY_DIR}.
# This difference is important for the base classes which are in CBMROOT
# and PANDAROOT.
# Check if cmake has the required version
# For the CTest fixtures at least CMake 3.7.2 is needed.
# Since NicaFempto requires 3.11.0 we should be consistent while we
# Since flesnet requires 3.14.0 we should be consistent while we
# build it in the CbmRoot context
CMAKE_MINIMUM_REQUIRED(VERSION 3.11.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.14.0 FATAL_ERROR)
cmake_policy(VERSION 3.14...3.23)
# Define compiler on macosx to avoid problems when comparing to compilers
# used for FairSoft/FairRoot compilation
if(APPLE)
if(NOT DEFINED CMAKE_C_COMPILER)
set(CMAKE_C_COMPILER clang)
endif()
if(NOT DEFINED CMAKE_CXX_COMPILER)
set(CMAKE_CXX_COMPILER clang++)
endif()
endif()
# Set name of our project to "CBMROOT". Has to be done
# after check of cmake version
project(CBMROOT)
# Default CMake settings
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_EXTENSIONS OFF)
FIND_PATH(FAIRBASE NAMES FairRun.h PATHS
${CBMBASE_DIR}/steer
NO_DEFAULT_PATH
# Set the library version in the main CMakeLists.txt
set(CBMROOT_MAJOR_VERSION 22)
set(CBMROOT_MINOR_VERSION 2)
set(CBMROOT_PATCH_VERSION 99)
execute_process(
COMMAND bash "-c" "cd ${CMAKE_SOURCE_DIR} && git log | head -n 1 | sed 's_commit \\(.[^ ]*\\)_\\1_' && cd ${OLDPWD}"
OUTPUT_VARIABLE CBMROOT_BUILD_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(
COMMAND bash "-c" "cd ${CMAKE_SOURCE_DIR} && git log | sed -n '3 s/Date:[ ]*//p' && cd ${OLDPWD}"
OUTPUT_VARIABLE CBMROOT_BUILD_HASH_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE)
message("CBMROOT BUILD HASH is ${CBMROOT_BUILD_HASH} dated on ${CBMROOT_BUILD_HASH_DATE}.")
# Set name of our project to "CBMROOT"
# This also sets ${CBMROOT_VERSION} to the provided VERSION value, which would be empty if not set here explicitly
project(CBMROOT
VERSION ${CBMROOT_MAJOR_VERSION}.${CBMROOT_MINOR_VERSION}.${CBMROOT_PATCH_VERSION}
LANGUAGES C CXX
)
If (FAIRBASE)
Message(STATUS "Found FAIRBASE")
SET(FAIRBASE ${FAIRBASE})
Else (FAIRBASE)
Message(STATUS "NOT Found FAIRBASE")
IF(NOT DEFINED ENV{FAIRROOTPATH})
MESSAGE(FATAL_ERROR "You did not define the environment variable FAIRROOTPATH which is needed to find FairRoot. Please set this variable and execute cmake again.")
ENDIF(NOT DEFINED ENV{FAIRROOTPATH})
SET(FAIRROOTPATH $ENV{FAIRROOTPATH})
EndIf (FAIRBASE)
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/
# is checked
set(CMAKE_MODULE_PATH "${FAIRROOTPATH}/share/fairbase/cmake/modules_old" ${CMAKE_MODULE_PATH})
set(CMAKE_MODULE_PATH "${FAIRROOTPATH}/share/fairbase/cmake/modules" ${CMAKE_MODULE_PATH})
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH})
set(CMAKE_PREFIX_PATH "$ENV{SIMPATH}/share/cmake/ZeroMQ" ${CMAKE_PREFIX_PATH})
# Check if the compiler support specific C++11 features
# Up to now this is only a check since the code does not use
# any of the features of the new standard
IF(FAIRROOTPATH)
Set(CheckSrcDir "${FAIRROOTPATH}/share/fairbase/cmake/checks")
ELSE(FAIRROOTPATH)
Set(CheckSrcDir "${CMAKE_SOURCE_DIR}/cmake/checks")
ENDIF(FAIRROOTPATH)
if(FAIRROOTPATH)
find_package(FairRoot)
SET(MY_ROOT_INCLUDE_PATH ${FAIRROOT_INCLUDE_DIR})
If(CMAKE_INSTALL_PREFIX)
Message("***** HERE *****")
SET(MY_ROOT_INCLUDE_PATH
${MY_ROOT_INCLUDE_PATH}
"${CMAKE_INSTALL_PREFIX}/include"
"${CMAKE_INSTALL_PREFIX}/include/mvd"
"${CMAKE_INSTALL_PREFIX}/include/littrack"
"${CMAKE_INSTALL_PREFIX}/include/KF"
)
EndIf(CMAKE_INSTALL_PREFIX)
endif(FAIRROOTPATH)
include(CheckCXX11Features)
# Load some basic macros which are needed later on
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
# Load some basic cmake functionality
include(ExternalProject)
include(CTest)
# Make the CbmRoot cmake functions available
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
include(CbmChecks)
include(CbmGenerateConfig)
include(CbmMacros)
include(CbmTargets)
include(CbmCompilerSettings)
include(FairMacros)
include(WriteConfigFile)
include(CTest)
include(CheckCompiler)
Include(ExternalProject)
# CbmRoot uses from 22.07.15 C++11, so we need an compiler which supports C++11
# Check if the used compiler support C++11. If not stop with an error message
# Check also if FairSoft and FairRoot have been compiled with C++11 support
If(NOT _HAS_CXX11_FLAG)
Message(FATAL_ERROR "The used C++ compiler (${CMAKE_CXX_COMPILER}) does not support C++11. CbmRoot can only be compiled with compilers supporting C++11. Please install such an compiler.")
EndIf()
include(WriteGeant4Data_jupy)
include(WriteKernelFile)
Execute_process(COMMAND $ENV{SIMPATH}/bin/fairsoft-config --cxxflags OUTPUT_VARIABLE _res_fairsoft_config OUTPUT_STRIP_TRAILING_WHITESPACE)
String(FIND ${_res_fairsoft_config} "-std=c++11" POS_C++11)
If(${POS_C++11} EQUAL -1)
Message(FATAL_ERROR "FairSoft wasn't compiled with c++11 support. Please recompile FairSoft with a compiler which supports c++11.")
EndIf()
# Do some basic checks
# out-of-source build, unix system and
# existence of FAIRROOTPATH and SIMPATH variables
Check_Prerequisites()
Execute_process(COMMAND $ENV{SIMPATH}/bin/fairsoft-config --root-version OUTPUT_VARIABLE _res_root_version OUTPUT_STRIP_TRAILING_WHITESPACE)
String(FIND ${_res_root_version} "Usage" POS_USAGE)
If(${POS_USAGE} EQUAL 1)
Message(FATAL_ERROR "FairSoft version to old. At least nov15 compiled with ROOT6 is needed.")
EndIf()
If(NOT ${_res_root_version} EQUAL 6)
Message(FATAL_ERROR "FairSoft was not compiled with ROOT6. At least FairSoft nov15 compiled with ROOT6 is needed.")
EndIf()
#Fairsoft Modules Path
list(PREPEND CMAKE_PREFIX_PATH ${SIMPATH})
# Extract the FairRoot version from fairroot-config
# The version info is of the form Major.Minor.Patch e.g. 15.11.1 and
# is stored in the variable FairRoot_VERSION and FairSoft_VERSION
FairRootVersion()
FairSoftVersion()
unset(packages)
# Since 20.02.2019 CbmRoot need at least FairRoot v18.0.5 and FairSoft may18
# Check if FairRoot and FairSoft have at least this versions
If(FairRoot_VERSION VERSION_LESS 18.0.5)
Message(FATAL_ERROR "\n CbmRoot needs at least FairRoot version v18.0.5. \n You use FairRoot ${FairRoot_VERSION}. Please upgrade your FairRoot version.")
EndIf()
# FairSoft version 18.5.0 means may18
If(FairSoft_VERSION VERSION_LESS 18.5.0)
Message(FATAL_ERROR "\n CbmRoot needs at least FairSoft version may18. \n You use FairSoft ${_fairsoft_version}. Please upgrade your FairSoft version.")
EndIf()
find_package(Python3)
MESSAGE("Python3_EXECUTABLE=${Python3_EXECUTABLE}")
Execute_process(COMMAND $ENV{FAIRROOTPATH}/bin/fairroot-config --fairsoft_path OUTPUT_VARIABLE _simpath OUTPUT_STRIP_TRAILING_WHITESPACE)
Remove_Trailing_Slash($ENV{SIMPATH})
Set(_simpath ${_ret_val})
Remove_Trailing_Slash(${_simpath})
Set(_fairroot_config ${_ret_val})
String(COMPARE EQUAL ${_simpath} ${_fairroot_config} _same_fairsoft)
If(NOT _same_fairsoft)
Message(STATUS "FairSoft version used for FairRoot compilation: ${_fairroot_config}")
Message(STATUS "FairSoft version now (defined by SIMPATH): ${_simpath}")
Message(FATAL_ERROR "Both versions must be the same.")
EndIf()
#Searches for ROOT Package
find_package(ROOT 6.22 CONFIG REQUIRED)
if(ROOT_FOUND)
list(APPEND packages ROOT)
endif()
find_package(FairCMakeModules REQUIRED)
include(FairFindPackage2)
#Searches for FairLogger Package
find_package2(PUBLIC FairLogger)
# at the end after all find_package[2] calls, call once
find_package2_implicit_dependencies()
if(FairLogger_FOUND)
list(APPEND packages FairLogger)
set(FAIRLOGGER_INCLUDE_DIR ${FairLogger_INCDIR}/fairlogger)
# CbmRoot expects that the Logger include statement does not need any
# additional path in the statement
# The target FairLogger::FairLogger does not provide the needed info
# So we add the additional subdirectory here to the target
get_target_property(_incDirs FairLogger::FairLogger INTERFACE_INCLUDE_DIRECTORIES)
set_target_properties(FairLogger::FairLogger PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_incDirs}/fairlogger"
)
endif()
#Check the compiler and set the compile and link flags
If(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
Set(_default_build_type FullWarnings)
Set(_cflags "-g -O2")
Set(_cxxflags "-g -O2 -Wshadow -Wall -Wextra -Wunused-variable")
String(TOUPPER ${_default_build_type} upper_build_type )
Set(_build_type_cxx CMAKE_CXX_FLAGS_${upper_build_type})
Set(_build_type_c CMAKE_C_FLAGS_${upper_build_type})
Set(_exe_linker_flags CMAKE_EXE_LINKER_FLAGS_${upper_build_type})
Set(_module_linker_flags CMAKE_MODULE_LINKER_FLAGS_${upper_build_type})
Set(_shared_linker_flags CMAKE_SHARED_LINKER_FLAGS_${upper_build_type})
Set(_static_linker_flags CMAKE_STATIC_LINKER_FLAGS_${upper_build_type})
Message("No build type defined on command line. Set the build type ${_default_build_type}")
Message("CXX_FLAGS: ${_cxxflags}")
Message("C_FLAGS: ${_cflags}")
Set(CMAKE_BUILD_TYPE ${_default_build_type} CACHE STRING "Choose the type of build." FORCE)
If(CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin)
If(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
Set(${_build_type_cxx} ${_cxxflags} CACHE STRING "Flags used by the CXX compiler during FullWarnings builds.")
Set(${_build_type_c} ${_cflags} CACHE STRING "Flags used by the C compiler during FullWarnings builds.")
Set(${_exe_linker_flags} "" CACHE STRING "Flags used by the linker during FullWarnings builds.")
Set(${_module_linker_flags} "" CACHE STRING "Flags used by the linker during the creation of modules during FullWarnings builds.")
Set(${_shared_linker_flags} "" CACHE STRING "Flags used by the linker during the creation of shared libraries during FullWarnings builds.")
Set(${_static_linker_flags} "" CACHE STRING "Flags used by the linker during the creation of static libraries during FullWarnings builds.")
mark_as_advanced(
${_build_type_cxx}
${_build_type_c}
${_exe_linker_flags}
${_module_linker_flags}
${_shared_linker_flags}
${_static_linker_flags}
)
EndIf()
EndIf()
EndIf()
If(CMAKE_BUILD_TYPE MATCHES CONTINUOUS)
Set(CMAKE_CXX_FLAGS_CONTINUOUS "-g -O2 -Wshadow -Wall -Wextra -Wunused-variable")
Set(CMAKE_C_FLAGS_CONTINUOUS "-g -O2")
Message("The build type is CONTINUOUS")
Message("CXX_FLAGS: ${CMAKE_CXX_FLAGS_CONTINUOUS}")
Message("C_FLAGS: ${CMAKE_C_FLAGS_CONTINUOUS}")
#Searches for VMC Package
if(ROOT_vmc_FOUND)
set(VMCLIB ROOT::VMC)
list(APPEND packages ROOT_vmc)
else()
find_package2(PUBLIC VMC REQUIRED)
set(VMCLIB VMCLibrary)
endif()
if(VMC_FOUND)
list(APPEND packages VMC)
endif()
#Searches for FairROOT Package
find_package(FairRoot REQUIRED)
if(FAIRROOT_FOUND)
list(APPEND packages FairRoot)
set(FairRoot_FOUND TRUE)
endif()
#Searching for Boost Package
find_package(ZeroMQ)
if(ZeroMQ_FOUND)
list(APPEND packages ZeroMQ)
endif()
#Searching for Boost Package
find_package(Boost CONFIG
COMPONENTS serialization regex filesystem log log_setup container program_options thread iostreams system
)
if(Boost_FOUND)
list(APPEND packages Boost)
endif()
#Searching for Geant4 Package
find_package(Geant4 CONFIG REQUIRED)
if(Geant4_FOUND)
list(APPEND packages Geant4)
endif()
#Searching for Vc Package
find_package(Vc 1.4.1 CONFIG REQUIRED)
if(Vc_FOUND)
list(APPEND packages Vc)
endif()
#Searching for VGM Package
find_package(VGM CONFIG REQUIRED)
if(VGM_FOUND)
endif()
#Searching for Geant4VMC Package
find_package(Geant4VMC CONFIG REQUIRED)
if(Geant4VMC_FOUND)
list(APPEND packages Geant4VMC)
endif()
#Searching for Geant3 Package
find_package(Geant3 CONFIG REQUIRED)
if(Geant3_FOUND)
list(APPEND packages Geant3)
endif()
#Searching for SSE
find_package(SSE REQUIRED)
if(SSE_FOUND)
list(APPEND packages SSE)
endif()
#Searching for format package
find_package(fmt CONFIG REQUIRED)
if(fmt_FOUND)
list(APPEND packages fmt)
endif()
#Searching for ONNXRuntime
find_package(ONNXRuntime CONFIG)
if (ONNXRuntime_FOUND)
list(APPEND packages ONNXRuntime)
endif()
#Searching for FairMQ
find_package(FairMQ CONFIG REQUIRED)
if(FairMQ_FOUND)
list(APPEND packages FairMQ)
get_target_property(_inDirMQ FairMQ::FairMQ INTERFACE_INCLUDE_DIRECTORIES)
set_property(TARGET FairMQ::FairMQ APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${_inDirMQ}/fairmq/options")
endif()
# Check if the compiler supports the needed C++ standard
# Check for the minimum required versions of FairSoft and FairRoot
check_external_stack()
if(NOT CBM_TEST_MODEL)
set(CBM_TEST_MODEL Experimental)
endif()
# Special case for GCC 10.2.1 with Profiling enabled: optimization of L1 has to be disabled to avoid errors
If((${CBM_TEST_MODEL} MATCHES Weekly OR ${CBM_TEST_MODEL} MATCHES Profile)
AND ${CMAKE_CXX_COMPILER_ID} MATCHES GNU
AND ${CMAKE_CXX_COMPILER_VERSION} MATCHES 10.2.1)
Message(STATUS "Detected Profiling build with GCC 10.2.1")
Message(STATUS "=> Disabling L1 optimization to avoid compilation errors")
Set(L1_NO_OPT ON CACHE BOOL "Detected Profiling build with GCC 10.2.1 => Disabling L1 opti to avoid comp. errors")
EndIf()
Check_Compiler()
set(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} "CONTINUOUS" "FullWarnings")
#Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wshadow -Weffc++ -Wno-unused-variable -Wno-unused-parameter -Wno-sign-compare -Wno-ignored-qualifiers -Wno-overloaded-virtual")
#Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weverything -Wno-padded -Wno-global-constructors")
#Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-documentation -Wno-padded -Wno-global-constructors -Wno-exit-time-destructors -Wno-extra-semi -Wno-weak-vtables -Wno-unused-member-function")
#Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wdeprecated -Wunused-exception-parameter -Wconversion -Wsign-conversion -Wold-style-cast -Wshorten-64-to-32 -Wswitch-enum -Wfloat-equal -Wunreachable-code")
#Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wold-style-cast")
Set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib")
# Set the compiler flags
set_compiler_flags()
# Define where the produced targets are placed in the binary directory
Set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
Set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
Set(INCLUDE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/include")
set(CMAKE_INSTALL_LIBDIR lib)
# VMCWORKDIR is needed by the CbmRoot runtime to find macros, geometries and
# parameters
Set(VMCWORKDIR ${CBMROOT_SOURCE_DIR})
Option(USE_PATH_INFO "Information from PATH and LD_LIBRARY_PATH are used." OFF)
If(USE_PATH_INFO)
Set(PATH $ENV{PATH})
If (APPLE)
Set(LD_LIBRARY_PATH $ENV{DYLD_LIBRARY_PATH})
Else (APPLE)
Set(LD_LIBRARY_PATH $ENV{LD_LIBRARY_PATH})
EndIf (APPLE)
Else(USE_PATH_INFO)
STRING(REGEX MATCHALL "[^:]+" PATH $ENV{PATH})
EndIf(USE_PATH_INFO)
# Check if the user wants to build the project in the source
# directory
CHECK_OUT_OF_SOURCE_BUILD()
# Check if we are on an UNIX system. If not stop with an error
# message
IF(NOT UNIX)
MESSAGE(FATAL_ERROR "You're not on an UNIX system. The project was up to now only tested on UNIX systems, so we break here. If you want to go on please edit the CMakeLists.txt in the source directory.")
ENDIF(NOT UNIX)
#Check if necessary environment variables are set
#If not stop execution
if(NOT CBMROOT_MINIMAL)
IF(NOT DEFINED ENV{SIMPATH})
MESSAGE(FATAL_ERROR "You did not define the environment variable SIMPATH which is nedded to find the external packages. Please set this variable and execute cmake again.")
ENDIF(NOT DEFINED ENV{SIMPATH})
SET(SIMPATH $ENV{SIMPATH})
else(NOT CBMROOT_MINIMAL)
if(NOT DEFINED ENV{ROOTSYS})
MESSAGE(FATAL_ERROR "You did not define the environment variable ROOTSYS which is nedded for the installation of the minimal version of CbmRoot. Please set this variable and execute cmake again.")
endif(NOT DEFINED ENV{ROOTSYS})
endif(NOT CBMROOT_MINIMAL)
# Check if the external packages are installed into a separate install
# directory
CHECK_EXTERNAL_PACKAGE_INSTALL_DIR()
# searches for needed packages
# REQUIRED means that cmake will stop if this packages are not found
# For example the framework can run without GEANT4, but ROOT is
# mandatory
if(CBMROOT_MINIMAL)
MESSAGE("******* Install minimal CbmRoot Version ********")
find_package(ROOT 6.00.00 REQUIRED)
else(CBMROOT_MINIMAL)
find_package(ROOT 6.00.00 REQUIRED)
find_package(GEANT3 REQUIRED)
find_package(GEANT4)
find_package(GEANT4DATA)
find_package(GEANT4VMC)
find_package(TBB)
find_package(SSE)
# find_package(IWYU)
find_package(ZeroMQ)
Set(Boost_NO_SYSTEM_PATHS TRUE)
Set(Boost_NO_BOOST_CMAKE TRUE)
set(BOOST_ROOT ${SIMPATH})
set(GSL_DIR ${SIMPATH})
Message("-- Looking for Boost ...")
# If an older version of boost is found both of the variables below are
# cached and in a second cmake run, a good boost version is found even
# if the version is to old.
# To overcome this problem both variables are cleared before checking
# for boost.
Unset(Boost_INCLUDE_DIR CACHE)
Unset(Boost_LIBRARY_DIRS CACHE)
find_package(Boost 1.48 COMPONENTS program_options thread system timer serialization regex log log_setup filesystem)
If (Boost_FOUND)
Set(Boost_Avail 1)
Else (Boost_FOUND)
Set(Boost_Avail 0)
EndIf (Boost_FOUND)
Message("-- Looking for GSL ...")
find_package(GSL)
Find_Package(FairLogger)
Find_Package(FairMQ)
endif(CBMROOT_MINIMAL)
# set a variable which should be used in all CMakeLists.txt
# Defines all basic include directories from fairbase
SetBasicVariables()
# Add the Geant3 include directory such that ROOT can find TGeant3.h
# Has to be done after calling SetBasicVariables, otherwise the value
# is overwritten
SET(ROOT_INCLUDE_PATH ${ROOT_INCLUDE_PATH} "${GEANT3_INCLUDE_DIR}")
Set(BASE_INCLUDE_DIRECTORIES
${BASE_INCLUDE_DIRECTORIES}
${SYSTEM_INCLUDE_DIRECTORIES}
# Set library versioning
set(FAIRROOT_LIBRARY_PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES}
VERSION "${CBMROOT_VERSION}"
SOVERSION "${CBMROOT_MAJOR_VERSION}"
)
# Set the library version in the main CMakeLists.txt
SET(CBMROOT_MAJOR_VERSION 0)
SET(CBMROOT_MINOR_VERSION 0)
SET(CBMROOT_PATCH_VERSION 0)
SET(CBMROOT_VERSION "${CBMROOT_MAJOR_VERSION}.${CBMROOT_MINOR_VERSION}.${CBMROOT_PATCH_VERSION}")
If(NOT ROOT_FOUND_VERSION OR ROOT_FOUND_VERSION LESS 59999)
SET(FAIRROOT_LIBRARY_PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES}
VERSION "${CBMROOT_VERSION}"
SOVERSION "${CBMROOT_MAJOR_VERSION}"
SUFFIX ".so"
)
Else()
SET(FAIRROOT_LIBRARY_PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES}
VERSION "${CBMROOT_VERSION}"
SOVERSION "${CBMROOT_MAJOR_VERSION}"
)
EndIf()
# Searching for OpenMP + control variable prep. for config script (default behavior + override)
find_package(OpenMP)
set(OMP_NUM_THREADS 1)
If(DEFINED ENV{OMP_NUM_THREADS} )
set(OMP_NUM_THREADS $ENV{OMP_NUM_THREADS})
endif()
SET(CBMLIBDIR ${CMAKE_BINARY_DIR}/lib)
SET(LD_LIBRARY_PATH ${CBMLIBDIR} ${Boost_LIBRARY_DIRS} ${LD_LIBRARY_PATH})
set(CBMLIBDIR ${CMAKE_BINARY_DIR}/lib)
set(LD_LIBRARY_PATH ${CBMLIBDIR} ${SIMPATH}/lib ${LD_LIBRARY_PATH} ${FAIRROOT_LIBRARY_DIR})
set(ROOT_INCLUDE_PATH ${FAIRROOT_INCLUDE_DIR})
# Recurse into the given subdirectories. This does not actually
# cause another cmake executable to run. The same process will walk through
# the project's entire directory structure.
If(CMAKE_SYSTEM_NAME MATCHES Darwin)
Include(CheckIncludeFile)
Check_Include_File("_types/_uint8_t.h" _UINT8_T_EXIST)
EndIf()
Option(BUILD_UNITTESTS "Build all unit tests and add them as new tests" ON)
If(BUILD_UNITTESTS)
Message("Build the unit tests.")
Message(STATUS "Build internal GTest")
Include(external/InstallGtest.cmake)
endif()
Set(GTEST_ROOT ${SIMPATH})
Find_Package(GTest)
EndIf(BUILD_UNITTESTS)
### Subdirectories to be compiled #####
### Externals included as svn externals
### Externals included and build from several sources
# Must be the first subdirectory since the defined targets are needed by
# following targets
add_subdirectory (external)
option(BUILD_FOR_TIDY "Create compile commands database needed by clang-tidy" OFF)
# Add the default compiler include paths needed for our static standalone clang-tidy
# binary. The paths are only added to the compilation units in the generated file
# compile_commands.json which is used as input for clang-tidy. Without the
# paths clang-tidy can't find the standard C and C++ header files.
# Also add special compile options to use the scalar version of VC.
# Otherwise hardware and compiler dependent header files may not be found.
# Since we want to check our code and not some system headers this is
# acceptable.
if(BUILD_FOR_TIDY)
ADD_DEFINITIONS(-DVc_IMPL=Scalar)
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES
${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}
)
endif()
### Base directories
add_subdirectory (core)
add_subdirectory (algo)
add_subdirectory (sim)
add_subdirectory (reco)
add_subdirectory (analysis)
### Detector directories
add_subdirectory (mvd)
add_subdirectory (services)
### Others
Option(LARGE_TEST_STATISTIC "Run the test suite with large statistic (100 events)" OFF)
add_subdirectory (macro)
add_subdirectory(fles)
If(FAIRMQ_FOUND)
If(FairMQ_FOUND)
add_subdirectory(MQ)
EndIf()
add_subdirectory(tutorials)
add_custom_target(cleanlib
COMMAND ${CMAKE_COMMAND} -E remove libCbm*
COMMAND ${CMAKE_COMMAND} -E remove G__Cbm*
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
)
add_custom_target(cleantest
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake/scripts/cleantest.cmake
)
find_package2(PRIVATE ClangFormat)
if(ClangFormat_FOUND)
add_custom_target(FormatCheck
${CMAKE_COMMAND} -E env FAIRROOT_GIT_CLANG_FORMAT_BIN=${GIT_CLANG_FORMAT_BIN} ${CMAKE_SOURCE_DIR}/cmake/scripts/check-format.sh
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
endif()
Option(BUILD_DOXYGEN "Build Doxygen" OFF)
option(BUILD_DOXYGEN "Build Doxygen" OFF)
if(BUILD_DOXYGEN)
MESSAGE(STATUS "*** Building the Doxygen documentaion ***")
ADD_SUBDIRECTORY(doxygen)
endif(BUILD_DOXYGEN)
if(RULE_CHECKER_FOUND)
ADD_CUSTOM_TARGET(RULES
COMMAND ${RULE_CHECKER_SCRIPT1} ${CMAKE_BINARY_DIR} viol > violations.html
DEPENDS $ENV{ALL_RULES})
endif(RULE_CHECKER_FOUND)
if(IWYU_FOUND)
ADD_CUSTOM_TARGET(checkHEADERS
DEPENDS $ENV{ALL_HEADER_RULES}
)
endif(IWYU_FOUND)
if(NOT CBMROOT_MINIMAL)
WRITE_CONFIG_FILE(config.sh)
WRITE_CONFIG_FILE(config.csh)
SET(ROOT_INCLUDE_PATH
${ROOT_INCLUDE_PATH}
"${CMAKE_INSTALL_PREFIX}/include"
"${CMAKE_INSTALL_PREFIX}/include/mvd"
"${CMAKE_INSTALL_PREFIX}/include/littrack"
"${CMAKE_INSTALL_PREFIX}/include/KF"
)
SET(VMCWORKDIR ${CMAKE_INSTALL_PREFIX}/share/cbmroot)
WRITE_CONFIG_FILE(config.sh_install)
WRITE_CONFIG_FILE(config.csh_install)
else(NOT CBMROOT_MINIMAL)
SET(FULL_CONFIG_FILE "false")
WRITE_CONFIG_FILE(config.sh)
endif(NOT CBMROOT_MINIMAL)
Install(FILES ${CMAKE_BINARY_DIR}/config.sh_install
DESTINATION bin
RENAME CbmRootConfig.sh
)
Install(FILES ${CMAKE_BINARY_DIR}/check_system.sh
DESTINATION bin
)
message(STATUS "*** Building the Doxygen documentaion ***")
add_subdirectory(doxygen)
endif()
Install(FILES ${CMAKE_BINARY_DIR}/config.csh_install
DESTINATION bin
RENAME CbmRootConfig.csh
)
# Definde additional targets
# cleanlib: rm al Cbm libraries and dictionaries
# cleantest: remove all files from build directory created when running ROOT macros
# FormatCheck: execute clang-format for all changed files (needed for CI)
define_additional_targets()
# generate the needed config files to run macros from build and
# installation directories. The later will be installed into the
# install directory
generate_config_files()
# install the parameters, geometries and input directories
Install(DIRECTORY geometry input parameters
DESTINATION share/cbmroot
PATTERN ".git" EXCLUDE)
print_info()
# Ending a path in a `/` will specify the code owners for every file
# nested in that directory, on any level
/ @f.uhlig @v.friese @p.-a.loizeau
/cmake/ @f.uhlig
/external/ @f.uhlig
/scripts/ @f.uhlig @p.-a.loizeau
# Cleanup and proper separation needed
/MQ/ @f.uhlig @p.-a.loizeau
/fles/ @f.uhlig @p.-a.loizeau
/macro/ @f.uhlig @p.-a.loizeau
/macro/C2F/ @a.andronic @k.piasecki
/macro/analysis/ @a.andronic @k.piasecki
/macro/KF/ @se.gorbunov
# Core
/core/ @f.uhlig @v.friese @p.-a.loizeau
/core/qa/ @se.gorbunov @s.zharko
/core/data/test/ @f.uhlig
/core/data/raw/ @p.-a.loizeau
/core/base/utils/ @f.uhlig
/core/base/report/ @f.uhlig
/core/base/draw/ @f.uhlig
# Algo
/algo/ @d.smith @fweig
# Simulation
/sim/ @f.uhlig @v.friese @p.-a.loizeau
#/sim/transport/geosetup/ @e.lavrik
# Reco
/reco/ @f.uhlig @v.friese @p.-a.loizeau
/reco/littrack/ @se.gorbunov
/reco/L1/ @se.gorbunov @s.zharko
/reco/eventbuilder/ @d.smith
/reco/KF/ @se.gorbunov @s.zharko
# Analysis
/analysis/ @a.andronic @k.piasecki
/analysis/PWGC2F/femtoscopy/ @wielanek_AT_if.pw.edu.pl
/analysis/common/ @a.andronic @k.piasecki
/analysis/PWGHAD/ @a.andronic @k.piasecki
/analysis/PWGCHA/ @a.andronic @k.piasecki
/analysis/PWGDIL/ @a.andronic @k.piasecki
/analysis/PWGDIL/dielectron/pi0eta/ @c.pauly
/analysis/PWGDIL/dielectron/papaframework/ @a_meye37_AT_uni-muenster.de
/analysis/PWGDIL/dielectron/lmvm/ @a.andronic @k.piasecki
/analysis/PWGDIL/dielectron/conversion/ @c.pauly
/analysis/PWGDIL/dimuon/ @a.andronic @k.piasecki
## Detectors
# TRD
/core/data/trd/ @a.bercuci @p.kaehler
/core/data/test/trd/ @a.bercuci @p.kaehler
/core/detectors/trd/ @a.bercuci @p.kaehler
/macro/trd/ @a.bercuci @p.kaehler
/sim/detectors/trd/ @a.bercuci @p.kaehler
/reco/detectors/trd/ @a.bercuci @p.kaehler
/algo/detectors/trd/ @a.bercuci @p.kaehler
# PSD
/analysis/detectors/psd/ @v.friese
/core/data/psd/ @v.friese
/core/data/test/psd/ @v.friese
/core/detectors/psd/ @v.friese
/macro/psd/ @v.friese
/sim/detectors/psd/ @v.friese
/reco/detectors/psd/ @v.friese
# FSD
/analysis/detectors/fsd/ @dvorar10_AT_fjfi.cvut.cz
/core/data/fsd/ @dvorar10_AT_fjfi.cvut.cz
/core/detectors/fsd/ @dvorar10_AT_fjfi.cvut.cz
/sim/detectors/fsd/ @dvorar10_AT_fjfi.cvut.cz
/reco/detectors/fsd/ @dvorar10_AT_fjfi.cvut.cz
# MUCH
/core/data/much/ @v.singhal
/core/data/test/much/ @v.singhal
/core/detectors/much/ @v.singhal
/macro/much/ @v.singhal
/sim/detectors/much/ @v.singhal
/reco/detectors/much/ @v.singhal
/algo/detectors/much/ @v.singhal
/macro/analysis/much/ @v.singhal
# TOF
/analysis/detectors/tof/ @n.herrmann @i.deppner
/core/data/tof/ @n.herrmann @i.deppner
/core/data/test/tof/ @n.herrmann @i.deppner
/core/detectors/tof/ @n.herrmann @i.deppner
/fles/star2019/ @n.herrmann @i.deppner
/macro/tof/ @n.herrmann @i.deppner
/sim/detectors/tof/ @n.herrmann @i.deppner
/reco/detectors/tof/ @n.herrmann @i.deppner
/MQ/eTOF/ @n.herrmann @i.deppner
/MQ/hitbuilder/ @n.herrmann @i.deppner
/algo/detectors/tof/ @n.herrmann @i.deppner
# RICH
/core/data/rich/ @ma.beyer
/core/data/test/rich/ @ma.beyer
/core/detectors/rich/ @ma.beyer
/macro/rich/ @ma.beyer
/sim/detectors/rich/ @ma.beyer
/reco/detectors/rich/ @ma.beyer
/algo/detectors/rich/ @ma.beyer
# STS
/analysis/detectors/sts/ @v.friese
/core/data/sts/ @v.friese
/core/data/test/sts/ @v.friese
/core/detectors/sts/ @v.friese
/macro/sts/ @v.friese
/sim/detectors/sts/ @v.friese
/reco/detectors/sts/ @v.friese
/MQ/sts/ @v.friese
/algo/detectors/sts/ @v.friese
/algo/data/sts/ @v.friese
# MVD
/reco/detectors/mvd/ @c.muentz @m.deveaux @j.stroth
/core/detectors/mvd/ @c.muentz @m.deveaux @j.stroth
/core/data/mvd/ @c.muentz @m.deveaux @j.stroth
/analysis/detectors/mvd/ @c.muentz @m.deveaux @j.stroth
/macro/mvd/ @c.muentz @m.deveaux @j.stroth
/sim/detectors/mvd/ @c.muentz @m.deveaux @j.stroth
......@@ -3,8 +3,13 @@
message(" -- Read CTestCustom.cmake --")
# Maximum size of uploaded test output of failed tests is 100kB
# or 10MB in case of weekly tests
# Larger output is cutted
set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "102400")
if(${CBM_TEST_MODEL} MATCHES Weekly)
set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "10240000")
else()
set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "102400")
endif()
# Maximum size of uploaded test output of passed tests is 1kB
# Larger output is cutted
......@@ -42,16 +47,27 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
# -- warnings from our external packages
"external/flib_dpb"
# "external/flib_dpb_20"
"external/ipc"
"maybe_unused"
"include/AnalysisTree"
# -- remove intended fall through warnings
"[[fallthrough]]"
"CbmMcbm2018UnpackerAlgoTof.cxx.*warning: attributes at the beginning of statement are ignored"
"CbmMcbm2018UnpackerAlgoTof.cxx.*warning: this statement may fall through"
"CbmMcbm2018UnpackerAlgoTof.cxx.*note: here"
"CbmDeviceUnpackTofMcbm2018.cxx.*warning: attributes at the beginning of statement are ignored"
"CbmDeviceUnpackTofMcbm2018.cxx.*warning: this statement may fall through"
"CbmDeviceUnpackTofMcbm2018.cxx.*note: here"
"PairAnalysisHistos.cxx.*warning: this statement may fall through"
"PairAnalysisHistos.cxx.*note: here"
"CbmMcbm2018TofPar.cxx.*warning: attributes at the beginning of statement are ignored"
"CbmMcbm2018TofPar.cxx.*warning: this statement may fall through"
"CbmMcbm2018TofPar.cxx.*note: here"
# -- warnings from a feature we want and which is okay
"CbmCheckEvents.cxx:86:52"
# -- warnings about to long function for debugging
"variable tracking size limit exceeded"
# -- warnings from structures for HADAQ memory casting
"struct hadaq::HadTu"
......@@ -62,11 +78,16 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
# -- warnings from structures for MBS/LMD memory casting
"struct mbs::Header"
# -- warnings from my test machine demac006
"warning: text-based stub file"
# -- warnings from macosx test machines
"ld: warning: dylib.*was built for newer macOS version.*than being linked"
".*\\^.*"
"warning.*generated."
# -- don't show pragma message warnings
"Compiling CBM Configuration"
# -- filter warnings about unused attributes
"attribute directive ignored"
)
# -----------------------------------------------------------
......@@ -81,6 +102,7 @@ Set (CTEST_CUSTOM_COVERAGE_EXCLUDE
".*Dict.cxx"
".*Fair.*"
".*GTest.*"
".*external/.*"
)
Set(CTEST_CUSTOM_ERROR_EXCEPTION
......
# Check if cmake has the required version
# Since flesnet requires 3.14.0 we should be consistent while we
# build it in the CbmRoot context
cmake_minimum_required(VERSION 3.14.0 FATAL_ERROR)
cmake_policy(VERSION 3.14...3.23)
Set(CTEST_SOURCE_DIRECTORY $ENV{SOURCEDIR})
Set(CTEST_BINARY_DIRECTORY $ENV{BUILDDIR})
Set(CTEST_SITE $ENV{SITE})
......@@ -5,6 +11,14 @@ Set(CTEST_BUILD_NAME $ENV{LABEL})
Set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
Set(CTEST_PROJECT_NAME "CBMROOT")
Set(EXTRA_FLAGS $ENV{EXTRA_FLAGS})
Set(INSTALL_PROJECT $ENV{INSTALL_PROJECT})
if(NOT CBM_TEST_MODEL)
set(CBM_TEST_MODEL NIGHTLY)
endif()
include(${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
Ctest_Read_Custom_Files("${CTEST_SOURCE_DIRECTORY}")
Set(CTEST_UPDATE_COMMAND "git")
......@@ -14,31 +28,37 @@ Set(CTEST_BUILD_COMMAND "${BUILD_COMMAND} -i -k -j$ENV{number_of_processors}")
# Extract the FairRoot version from fairroot-config
# The version info is of the form Major.Minor.Patch e.g. 15.11.1 and
# is stored in the variable FairRoot_VERSION
Set(CMAKE_MODULE_PATH "${CTEST_SOURCE_DIRECTORY}/cmake/modules" ${CMAKE_MODULE_PATH})
Include(CbmMacros)
FairRootVersion()
If(${FairRoot_VERSION} VERSION_LESS 16.0.0)
Set(CTEST_USE_LAUNCHERS 0)
#Set(CMAKE_MODULE_PATH "${CTEST_SOURCE_DIRECTORY}/cmake/modules" ${CMAKE_MODULE_PATH})
#set(FAIRROOTPATH $ENV{FAIRROOTPATH})
#Include(CbmMacros)
#FairRootVersion()
message("Compiling with $ENV{number_of_processors} jobs in parallel.")
message("Testing with $ENV{number_of_processors_for_test} jobs in parallel.")
Set(CTEST_USE_LAUNCHERS 1)
If(${CBM_TEST_MODEL} MATCHES MergeRequest OR ${CBM_TEST_MODEL} MATCHES Continuous)
Set(_BuildType NIGHTLY)
Set(_CMakeModel Continuous)
elseIf(${CBM_TEST_MODEL} MATCHES Weekly OR ${CBM_TEST_MODEL} MATCHES Profile)
Set(_BuildType PROFILE)
Set(_CMakeModel Nightly)
Else()
Set(CTEST_USE_LAUNCHERS 1)
String(TOUPPER ${CBM_TEST_MODEL} _BuildType)
set(_CMakeModel ${CBM_TEST_MODEL})
EndIf()
If($ENV{ctest_model} MATCHES Weekly)
Set(_Model PROFILE)
ElseIf($ENV{ctest_model} MATCHES MergeRequest)
Set(_Model CONTINUOUS)
If(EXTRA_FLAGS AND INSTALL_PROJECT)
Set(CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-G${CTEST_CMAKE_GENERATOR}\" \"-DCBM_TEST_MODEL=${CBM_TEST_MODEL}\" \"-DCMAKE_BUILD_TYPE=${_BuildType}\" \"-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}\" \"${EXTRA_FLAGS}\" \"-DCMAKE_INSTALL_PREFIX=${CTEST_SOURCE_DIRECTORY}/install\" \"${CTEST_SOURCE_DIRECTORY}\" ")
ElseIf(EXTRA_FLAGS)
Set(CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-G${CTEST_CMAKE_GENERATOR}\" \"-DCBM_TEST_MODEL=${CBM_TEST_MODEL}\" \"-DCMAKE_BUILD_TYPE=${_BuildType}\" \"-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}\" \"${EXTRA_FLAGS}\" \"${CTEST_SOURCE_DIRECTORY}\" ")
Else()
String(TOUPPER $ENV{ctest_model} _Model)
Set(CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-G${CTEST_CMAKE_GENERATOR}\" \"-DCBM_TEST_MODEL=${CBM_TEST_MODEL}\" \"-DCMAKE_BUILD_TYPE=${_BuildType}\" \"-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}\" \"${CTEST_SOURCE_DIRECTORY}\" ")
EndIf()
If(EXTRA_FLAGS)
Set(CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-G${CTEST_CMAKE_GENERATOR}\" \"-DCMAKE_BUILD_TYPE=${_Model}\" \"-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}\" \"${EXTRA_FLAGS}\" \"${CTEST_SOURCE_DIRECTORY}\" ")
Else()
Set(CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-G${CTEST_CMAKE_GENERATOR}\" \"-DCMAKE_BUILD_TYPE=${_Model}\" \"-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}\" \"${CTEST_SOURCE_DIRECTORY}\" ")
EndIf()
If($ENV{ctest_model} MATCHES Nightly OR $ENV{ctest_model} MATCHES Weekly OR $ENV{ctest_model} MATCHES Profile)
#If(${CBM_TEST_MODEL} MATCHES Nightly OR ${CBM_TEST_MODEL} MATCHES Weekly OR ${CBM_TEST_MODEL} MATCHES Profile)
If(NOT ${_BuildType} MATCHES EXPERIMENTAL)
Find_Program(GCOV_COMMAND gcov)
If(GCOV_COMMAND)
......@@ -46,91 +66,161 @@ If($ENV{ctest_model} MATCHES Nightly OR $ENV{ctest_model} MATCHES Weekly OR $ENV
Set(CTEST_COVERAGE_COMMAND ${GCOV_COMMAND})
EndIf(GCOV_COMMAND)
If(NOT $ENV{ctest_model} MATCHES Weekly)
Set(ENV{ctest_model} Nightly)
EndIf()
# get the information about conflicting or localy modified files
# from svn, extract the relavant information about the file name
# and put the result in the output variable
If(EXISTS ${CTEST_SOURCE_DIRECTORY}/.svn)
Execute_Process(COMMAND svn stat -u
COMMAND grep ^[CM]
COMMAND cut -c21-
OUTPUT_VARIABLE FILELIST
)
# create out of the output a cmake list. This step is done to convert the
# stream into seperated filenames.
# The trick is to exchange an "\n" by an ";" which is the separartor in
# a list created by cmake
String(REGEX REPLACE "\n" ";" _result "${FILELIST}")
ForEach(_file ${_result})
String(STRIP "${_file}" _file1)
Set(CTEST_NOTES_FILES ${CTEST_NOTES_FILES} "${CTEST_SOURCE_DIRECTORY}/${_file1}")
EndForEach(_file ${_result})
EndIf()
CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
EndIf()
Configure_File(${CTEST_SOURCE_DIRECTORY}/CTestCustom.cmake
${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake
)
Ctest_Read_Custom_Files("${CTEST_BINARY_DIRECTORY}")
Ctest_Start(${_CMakeModel})
If($ENV{ctest_model} MATCHES MergeRequest)
set(ENV{ctest_model} Continuous)
unset(repeat)
if(${_CMakeModel} MATCHES Continuous)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.17)
set(repeat REPEAT UNTIL_PASS:2)
endif()
EndIf()
Ctest_Start($ENV{ctest_model})
If($ENV{ctest_model} MATCHES Continuous)
set(ENV{ctest_model} Nightly)
# The stop time should be a date compatible string without day nor timezone
# Examples:
# => CTEST_END_TIME_LIMIT=`date -d "${END_TIME}CET -5minutes" +"%H:%M:%S"`
# => CTEST_END_TIME_LIMIT=`date -d "now +25minutes" +"%H:%M:%S"`
unset(stop_time)
If(DEFINED ENV{CTEST_END_TIME_LIMIT})
set(stop_time STOP_TIME "$ENV{CTEST_END_TIME_LIMIT}")
message(STATUS " End time for the ctest test runs set to ${stop_time}")
EndIf()
If(NOT $ENV{ctest_model} MATCHES Experimental)
If(NOT ${_BuildType} MATCHES EXPERIMENTAL)
Ctest_Update(SOURCE "${CTEST_SOURCE_DIRECTORY}")
EndIf()
Ctest_Configure(BUILD "${CTEST_BINARY_DIRECTORY}"
RETURN_VALUE _RETVAL
)
If(NOT _RETVAL)
Ctest_Build(BUILD "${CTEST_BINARY_DIRECTORY}")
If($ENV{ctest_model} MATCHES Continuous)
CTest_Submit(PARTS Update Configure Build)
Ctest_Build(BUILD "${CTEST_BINARY_DIRECTORY}"
NUMBER_ERRORS _NUM_ERROR
)
If(${_CMakeModel} MATCHES Continuous)
CTest_Submit(PARTS Update Configure Build
BUILD_ID cdash_build_id
)
if(${_NUM_ERROR} GREATER 0)
message(STATUS " ")
message(STATUS " You can find the produced results on the CDash server")
message(STATUS " ")
message(STATUS " CDash Build Summary ..: "
"${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/buildSummary.php?buildid=${cdash_build_id}"
)
message(STATUS " CDash Test List ......: "
"${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/viewTest.php?buildid=${cdash_build_id}"
)
message(STATUS " ")
Message(STATUS "Build finished with ${_NUM_ERROR} errors")
message(FATAL_ERROR "Compilation failure")
endif()
EndIf()
Ctest_Test(BUILD "${CTEST_BINARY_DIRECTORY}"
PARALLEL_LEVEL $ENV{number_of_processors}
If(DEFINED ENV{CI_TEST_STAGE_TOTAL_TIME_LIMIT})
# Compute test stage timeout based on current time + limit from environment variable
If(DEFINED ENV{CTEST_END_TIME_LIMIT})
# If also full DASH run timeout defined, also compare the two and keep the earliest one
execute_process (
COMMAND scripts/find_citests_ctest_stop_time.sh $ENV{CTEST_END_TIME_LIMIT}
OUTPUT_VARIABLE CI_TESTS_TOTAL_END_TIME_DATE
)
Else()
# Else just get the CI jpb timeout
execute_process (
COMMAND scripts/find_citests_ctest_stop_time.sh
OUTPUT_VARIABLE CI_TESTS_TOTAL_END_TIME_DATE
)
EndIf()
set(stop_time STOP_TIME "${CI_TESTS_TOTAL_END_TIME_DATE}")
message(STATUS "Due to CI mode, Set end time for the ctest test runs to ${stop_time}")
EndIf()
Ctest_Test(BUILD "${CTEST_BINARY_DIRECTORY}"
PARALLEL_LEVEL $ENV{number_of_processors_for_test}
${repeat}
${stop_time}
RETURN_VALUE _ctest_test_ret_val
)
If($ENV{ctest_model} MATCHES Continuous)
CTest_Submit(PARTS Test)
If(${_CMakeModel} MATCHES Continuous)
CTest_Submit(PARTS Test
BUILD_ID cdash_build_id
)
EndIf()
If(GCOV_COMMAND)
Ctest_Coverage(BUILD "${CTEST_BINARY_DIRECTORY}")
If($ENV{ctest_model} MATCHES Continuous)
CTest_Submit(PARTS Coverage)
If(${_CMakeModel} MATCHES Continuous)
CTest_Submit(PARTS Coverage
BUILD_ID cdash_build_id
)
EndIf()
EndIf()
Ctest_Upload(FILES ${CTEST_NOTES_FILES})
If(NOT $ENV{ctest_model} MATCHES Continuous)
Ctest_Submit()
If(NOT ${_CMakeModel} MATCHES Continuous)
Ctest_Submit(BUILD_ID cdash_build_id)
EndIf()
If(EXTRA_FLAGS MATCHES "CBM_TEST_INSTALL" AND NOT _ctest_test_ret_val)
# If(EXTRA_FLAGS MATCHES "INSTALL_PREFIX" AND EXTRA_FLAGS MATCHES "CBM_TEST_INSTALL" AND NOT _ctest_test_ret_val)
Message("Testing Installation")
execute_process(COMMAND ${BUILD_COMMAND} install -j$ENV{number_of_processors} WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
RESULTS_VARIABLE _install_ret_value
)
if (NOT _install_ret_value)
message("executing test suite in ${CTEST_BINARY_DIRECTORY}/install with source folder available")
execute_process(COMMAND ${CTEST_SOURCE_DIRECTORY}/cmake/scripts/execute_installation_test.sh ${CTEST_SOURCE_DIRECTORY}/install
RESULTS_VARIABLE _install_ret_value
)
execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E rm -R build MQ algo analysis core external fles reco sim
WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY}
)
message("executing test suite in ${CTEST_BINARY_DIRECTORY}/install wihout source folder available")
execute_process(COMMAND ${CTEST_SOURCE_DIRECTORY}/cmake/scripts/execute_installation_test.sh ${CTEST_SOURCE_DIRECTORY}/install
RESULTS_VARIABLE _install_ret_value
)
endif()
Else()
# if installation isn't tested the return value should be 0
set(_install_ret_value false)
EndIf()
Message("_ctest_test_ret_val: ${_ctest_test_ret_val}")
Message("_install_ret_value: ${_install_ret_value}")
# Pipeline should fail also in case of failed tests
if (_ctest_test_ret_val)
if (_ctest_test_ret_val OR _install_ret_value)
message(STATUS " ")
message(STATUS " You can find the produced results on the CDash server")
message(STATUS " ")
message(STATUS " CDash Build Summary ..: "
"${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/buildSummary.php?buildid=${cdash_build_id}"
)
message(STATUS " CDash Test List ......: "
"${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/viewTest.php?buildid=${cdash_build_id}"
)
message(STATUS " ")
Message(FATAL_ERROR "Some tests failed.")
endif()
Else()
CTest_Submit()
CTest_Submit(BUILD_ID cdash_build_id)
EndIf()
message(STATUS " ")
message(STATUS " You can find the produced results on the CDash server")
message(STATUS " ")
message(STATUS " CDash Build Summary ..: "
"${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/buildSummary.php?buildid=${cdash_build_id}"
)
message(STATUS " CDash Test List ......: "
"${CTEST_DROP_METHOD}://${CTEST_DROP_SITE}/viewTest.php?buildid=${cdash_build_id}"
)
message(STATUS " ")
#!/bin/bash
# Copyright (C) 2007 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
# SPDX-License-Identifier: GPL-3.0-only
# First commited by Florian Uhlig
function print_example(){
echo "##################################################################"
......@@ -61,7 +65,8 @@ else
fi
# set the ctest model to command line parameter
export ctest_model=$1
#export ctest_model=$1
ctest_model=$1
# test for architecture
arch=$(uname -s | tr '[A-Z]' '[a-z]')
......@@ -114,14 +119,22 @@ then
fi
fi
if [ -z $NCPU4TEST ]; then
export number_of_processors_for_test=$number_of_processors
else
export number_of_processors_for_test=$NCPU4TEST
fi
echo "************************"
date
echo "LABEL: " $LABEL
echo "SITE: " $SITE
echo "Model: " ${ctest_model}
echo "Nr. of processes: " $number_of_processors
echo "Nr. of processes for build: " $number_of_processors
echo "Nr. of processes for test: " $number_of_processors_for_test
echo "************************"
cd $SOURCEDIR
ctest -S $SOURCEDIR/CbmRoot_test.cmake -V --VV
ctest -S $SOURCEDIR/CbmRoot_test.cmake -V -DCBM_TEST_MODEL=${ctest_model}
#ctest -S $SOURCEDIR/CbmRoot_test.cmake -V --VV
Installation Instructionsfor for CbmRoot
*****************************************
1. Dependencies
1.1 Compiler
To be able to compile CbmRoot a compiler with full C++11 support is needed.
GCC since version 4.8 and clang since version 3.4 are known to work without
problems.
1.2 FairSoft
To install, compile, and run CbmRoot several external programs are required.
This are for example Root, Geant3 or Geant4. The complete list can be found
on the FairRoot webpage (fairroot.gsi.de). Since most of these programs can't
be installed using the package manager of the used Linux distribution, or at
least can't be installed in the required version, the FairRoot team provides
a GIT repository with all needed packages and some scripts to automatically
build and install these so called external packages.
Detailed instructions how to get and compile FairSoft (aka external packages)
can be found at the following webpage
https://redmine.cbm.gsi.de/projects/cbmroot/wiki/Install_External_Packages
If you are working at GSI there are always ready-to-use versions available.
For detailed information please check the following wiki page
https://redmine.cbm.gsi.de/projects/cbmroot/wiki/RunCbmGSI
1.3 FairRoot
CbmRoot is based on FairRoot, a package which meanwhile serves several
experiments as base for their developments. Beside FairSoft you need also
to install FairRoot to be able to compile CbmRoot
Detailed instructions how to get and compile FairRoot can be found at the
following webpage
https://redmine.cbm.gsi.de/projects/cbmroot/wiki/InstallFairRoot
2. Recommended versions
GCC : >= 4.8
or
Clang: >= 3.4
FairSoft: may16p1
FairRoot: v-16.06b
3. Automatic installation
To make the installation more easy we provide a script which automatically
gets and installs FairSoft, FairRoot, and CbmRoot in one go. The script
always take the correct FairSoft and FairRoot versions.
The full description of this process is at
https://redmine.cbm.gsi.de/projects/cbmroot/wiki/InstallCbmRootAuto
The one line command which has to be executed inside the CbmRoot source
directory is
./autoinstall_framework.sh 1 1 1
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
If(FairSoft_VERSION VERSION_LESS 18.6.0)
Add_Definitions(-DHAVE_FAIRMQSTATEMACHINE)
EndIf()
Set(FAIRMQ_LIBS FairMQStateMachine FairMQ)
# RPATH information should be present for executables in the build as well
# as in the installation directory
# use, i.e. don't skip the full RPATH for the build tree
set(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
add_subdirectory(base)
add_subdirectory(source)
add_subdirectory(sink)
#add_subdirectory(unpacker)
add_subdirectory(unpacker)
add_subdirectory(monitor)
add_subdirectory(histoServer)
......@@ -15,9 +31,5 @@ add_subdirectory(mcbm)
#add_subdirectory(sts)
#add_subdirectory(test)
# The following subdirectories contain files which do not compile with
# FairRoot v18
# Don't compile it for the time being
# TODO: Fix the compilation problems
add_subdirectory(parmq)
# add_subdirectory(hitbuilder)
add_subdirectory(parmq)
add_subdirectory(hitbuilder)
set(INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/MQ/base
)
Set(SYSTEM_INCLUDE_DIRECTORIES
${SYSTEM_INCLUDE_DIRECTORIES}
${FAIRMQ_INCLUDE_DIR}
)
include_directories(${INCLUDE_DIRECTORIES})
include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES})
set(LINK_DIRECTORIES
${FAIRMQ_LIBRARY_DIR}
)
link_directories(${LINK_DIRECTORIES})
set(FAIR_LIBS
FairMQ
)
If(FAIRLOGGER_FOUND)
set(FAIR_LIBS
${FAIR_LIBS}
FairLogger
)
EndIf()
${CMAKE_CURRENT_SOURCE_DIR}
)
set(SRCS
CbmMQChannels.cxx
)
)
set(LIBRARY_NAME CbmMQBase)
set(PUBLIC_DEPENDENCIES
FairMQ::FairMQ
)
Set(LIBRARY_NAME CbmMQBase)
Set(DEPENDENCIES
${FAIR_LIBS}
)
set(INTERFACE_DEPENDENCIES
ROOT::Net
)
GENERATE_LIBRARY()
generate_cbm_library()