Commit 6fec1258 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'master' of ssh://gitlab.cern.ch:7999/corryvreckan/corryvreckan into typo

parents 75e9d283 35f3bca8
Pipeline #2150190 passed with stages
in 13 minutes and 54 seconds
......@@ -14,15 +14,14 @@ stages:
# Compilation targets #
#######################
cmp:slc6-gcc:
# Hidden key to define the default compile job:
.compile:
stage: compilation
needs: []
tags:
- docker
image: gitlab-registry.cern.ch/sft/docker/slc6:latest
script:
- export COMPILER_TYPE="gcc"
- source .gitlab-ci.d/init_x86_64.sh
- source .gitlab-ci.d/load_deps.sh
- mkdir build
- cd build
- cmake -GNinja -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DEigen3_DIR=$Eigen3_DIR ..
......@@ -33,89 +32,59 @@ cmp:slc6-gcc:
- build
- bin
- lib
expire_in: 3 hour
expire_in: 24 hour
cmp:slc6-gcc:
extends: .compile
image: gitlab-registry.cern.ch/sft/docker/slc6:latest
before_script:
- export COMPILER_TYPE="gcc"
- source .gitlab/ci/init_x86_64.sh
- source .gitlab/ci/load_deps.sh
cmp:cc7-gcc:
stage: compilation
tags:
- docker
extends: .compile
image: gitlab-registry.cern.ch/sft/docker/centos7:latest
script:
before_script:
- export COMPILER_TYPE="gcc"
- source .gitlab-ci.d/init_x86_64.sh
- source .gitlab-ci.d/load_deps.sh
- mkdir build
- cd build
- cmake -GNinja -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DEigen3_DIR=$Eigen3_DIR ..
- ninja -k0
- ninja install
artifacts:
paths:
- build
- bin
- lib
expire_in: 3 hour
- source .gitlab/ci/init_x86_64.sh
- source .gitlab/ci/load_deps.sh
cmp:cc7-docker:
stage: compilation
tags:
- docker
extends: .compile
image:
name: gitlab-registry.cern.ch/corryvreckan/corryvreckan/corryvreckan-deps
entrypoint: [""]
before_script:
- source scl_source enable devtoolset-7 || echo " "
- source scl_source enable devtoolset-8 || echo " "
script:
- mkdir build
- cd build
- cmake3 -DCMAKE_CXX_FLAGS="-Werror" -DBUILD_EventLoaderEUDAQ2=ON -DBUILD_EventDefinitionM26=ON -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DEigen3_DIR=$Eigen3_DIR -Deudaq_DIR=/opt/eudaq2/cmake ..
- make
- make install
artifacts:
paths:
- build
- bin
- lib
expire_in: 3 hour
cmp:cc7-llvm:
stage: compilation
tags:
- docker
extends: .compile
image: gitlab-registry.cern.ch/sft/docker/centos7:latest
script:
before_script:
- export COMPILER_TYPE="llvm"
- source .gitlab-ci.d/init_x86_64.sh
- mkdir build
- cd build
- cmake -GNinja -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DEigen3_DIR=$Eigen3_DIR ..
- ninja -k0
- ninja install
artifacts:
paths:
- build
- bin
- lib
expire_in: 3 hour
- source .gitlab/ci/init_x86_64.sh
cmp:mac1015-clang:
stage: compilation
extends: .compile
tags:
- mac
before_script:
- source .gitlab/ci/init_x86_64.sh
- source .gitlab/ci/load_deps.sh
script:
- source .gitlab-ci.d/init_x86_64.sh
- source .gitlab-ci.d/load_deps.sh
- mkdir build
- cd build
- cmake -GNinja -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DCMAKE_USE_RELATIVE_PATHS=TRUE -DEigen3_DIR=$Eigen3_DIR ..
- ninja -k0
- ninja install
artifacts:
paths:
- build
- bin
- lib
expire_in: 3 hour
##############
# Unit tests #
......@@ -125,118 +94,135 @@ cmp:mac1015-clang:
stage: testing
tags:
- docker
dependencies:
- cmp:cc7-docker
needs:
- job: cmp:cc7-docker
artifacts: true
image:
name: gitlab-registry.cern.ch/corryvreckan/corryvreckan/corryvreckan-deps
entrypoint: [""]
before_script:
- source scl_source enable devtoolset-7 || echo " "
- source scl_source enable devtoolset-8 || echo " "
after_script:
- ./.gitlab/ci/transform_ctest_junit.py build/Testing/`head -n 1 build/Testing/TAG`/Test.xml .gitlab/ci/ctest-to-junit.xsl corry-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}.xml
artifacts:
when: always
expire_in: 1 day
name: "corry-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
paths:
- corry-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}.xml
reports:
junit: corry-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}.xml
tst:tracking:
extends: .test
script:
- cd build/
- mkdir -p ../testing/data
- ctest -R test_tracking --output-on-failure -j1
- ctest -R test_tracking --no-compress-output --test-action Test -j1
tst:align:
extends: .test
script:
- cd build/
- mkdir -p ../testing/data
- ctest -R test_align --output-on-failure -j1
- ctest -R test_align --no-compress-output --test-action Test -j1
tst:io:
extends: .test
script:
- cd build/
- mkdir -p ../testing/data
- ctest -R test_io --output-on-failure -j1
- ctest -R test_io --no-compress-output --test-action Test -j1
tst:sim:
extends: .test
script:
- cd build/
- mkdir -p ../testing/data
- ctest -R test_sim --output-on-failure -j1
- ctest -R test_sim --no-compress-output --test-action Test -j1
############################
# Format and Lint Checking #
############################
fmt:centos7-llvm-format:
# Hidden key to define the basis for linting and formatting:
.format:
stage: formatting
tags:
- docker
dependencies:
- cmp:cc7-llvm
image: gitlab-registry.cern.ch/sft/docker/centos7:latest
script:
before_script:
- export COMPILER_TYPE="llvm"
- source .gitlab-ci.d/init_x86_64.sh
- source .gitlab/ci/init_x86_64.sh
fmt:centos7-llvm-format:
extends: .format
needs: []
dependencies: []
script:
- mkdir -p build
- cd build/
- cmake -GNinja -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DEigen3_DIR=$Eigen3_DIR ..
- ninja check-format
fmt:cc7-llvm-lint:
stage: formatting
tags:
- docker
dependencies:
- cmp:cc7-llvm
image: gitlab-registry.cern.ch/sft/docker/centos7:latest
extends: .format
needs: []
dependencies: []
script:
- export COMPILER_TYPE="llvm"
- source .gitlab-ci.d/init_x86_64.sh
- mkdir -p build
- cd build/
- cmake -GNinja -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_BUILD_TYPE=RELEASE -DROOT_DIR=$ROOTSYS -DEigen3_DIR=$Eigen3_DIR ..
- ninja check-lint
fmt:codespell:
stage: formatting
tags:
- docker
image: gitlab-registry.cern.ch/sft/docker/centos7:latest
extends: .format
needs: []
dependencies: []
script:
before_script:
- export COMPILER_TYPE="gcc"
- source .gitlab-ci.d/init_x86_64.sh
- source .gitlab/ci/init_x86_64.sh
- export PATH=~/.local/bin:$PATH
- pip install --trusted-host=pypi.org --user codespell
- codespell --ignore-words .gitlab-ci.d/codespell_ignored_words.txt --quiet-level 2 --skip ".git,.gitlab,cmake,3rdparty,*.svg"
script:
- codespell --ignore-words .gitlab/ci/codespell_ignored_words.txt --quiet-level 2 --skip ".git,.gitlab,cmake,3rdparty,*.svg"
#############################
# Documentation Compilation #
#############################
# Compile Doxygen reference
cmp:doxygen:
.doc:
stage: documentation
needs: []
dependencies: []
tags:
- docker
artifacts:
paths:
- public
expire_in: 24 hour
# Compile Doxygen reference
cmp:doxygen:
extends: .doc
image: gitlab-registry.cern.ch/sft/docker/centos7:latest
dependencies: []
before_script:
- source .gitlab/ci/init_x86_64.sh
- source .gitlab/ci/load_deps.sh
script:
- source .gitlab-ci.d/init_x86_64.sh
- source .gitlab-ci.d/load_deps.sh
- mkdir -p public/usermanual
- mkdir build
- cd build
- cmake -DBUILD_DOCS_ONLY=ON ..
- make reference
- make Corryvreckan-reference
- mv reference/html ../public/reference
artifacts:
paths:
- public
expire_in: 24 hour
# Compile LaTeX user manual:
cmp:usermanual:
stage: documentation
tags:
- docker
extends: .doc
image: gitlab-registry.cern.ch/clicdp/publications/templates/custom_ci_worker:fedora-latex-latest
dependencies: []
script:
- mkdir -p public/usermanual
- mkdir build
......@@ -244,29 +230,25 @@ cmp:usermanual:
- cmake -DBUILD_DOCS_ONLY=ON ..
- make pdf
- mv usermanual/corryvreckan-manual.pdf ../public/usermanual
artifacts:
paths:
- public
expire_in: 24 hour
################################
# Packaging of Binary Tarballs #
################################
pkg:slc6-gcc:
.pack:
stage: packaging
tags:
- docker
image: gitlab-registry.cern.ch/sft/docker/slc6:latest
only:
- tags
- schedules
dependencies:
- cmp:slc6-gcc
script:
- tags@corryvreckan/corryvreckan
- schedules@corryvreckan/corryvreckan
before_script:
- export COMPILER_TYPE="gcc"
- source .gitlab-ci.d/init_x86_64.sh
- source .gitlab-ci.d/load_deps.sh
- source .gitlab/ci/init_x86_64.sh
- source .gitlab/ci/load_deps.sh
script:
- mkdir -p public/releases
- cd build
- cmake -GNinja -DCMAKE_SKIP_RPATH=ON -DCMAKE_INSTALL_PREFIX=/tmp ..
......@@ -277,29 +259,20 @@ pkg:slc6-gcc:
- public
expire_in: 24 hour
pkg:slc6-gcc:
extends: .pack
image: gitlab-registry.cern.ch/sft/docker/slc6:latest
needs:
- job: cmp:slc6-gcc
artifacts: true
pkg:cc7-gcc:
stage: packaging
tags:
- docker
extends: .pack
image: gitlab-registry.cern.ch/sft/docker/centos7:latest
only:
- tags
- schedules
dependencies:
- cmp:cc7-gcc
script:
- export COMPILER_TYPE="gcc"
- source .gitlab-ci.d/init_x86_64.sh
- source .gitlab-ci.d/load_deps.sh
- mkdir -p public/releases
- cd build
- cmake -GNinja -DCMAKE_SKIP_RPATH=ON -DCMAKE_INSTALL_PREFIX=/tmp ..
- ninja package
- mv *.tar.gz ../public/releases
artifacts:
paths:
- public
expire_in: 24 hour
needs:
- job: cmp:cc7-gcc
artifacts: true
########################
# Automatic Deployment #
......@@ -315,7 +288,7 @@ deploy-documentation:
GIT_STRATEGY: none
# Only run for new tags:
only:
- tags
- tags@corryvreckan/corryvreckan
dependencies:
- cmp:usermanual
- cmp:doxygen
......@@ -335,8 +308,8 @@ deploy-eos:
GIT_STRATEGY: none
# Only run for new tags:
only:
- tags
- schedules # Only execute this on scheduled "nightly" pipelines
- tags@corryvreckan/corryvreckan
- schedules@corryvreckan/corryvreckan
dependencies:
- pkg:cc7-gcc
- pkg:slc6-gcc
......@@ -356,13 +329,13 @@ deploy-cvmfs:
tags:
- cvmfs-deploy
only:
- tags
- schedules # Only execute this on scheduled "nightly" pipelines
- tags@corryvreckan/corryvreckan
- schedules@corryvreckan/corryvreckan
script:
- ./.gitlab-ci.d/download_artifacts.py $API_TOKEN $CI_PROJECT_ID $CI_PIPELINE_ID
- ./.gitlab/ci/download_artifacts.py $API_TOKEN $CI_PROJECT_ID $CI_PIPELINE_ID
- export RUNNER_LOCATION=$(pwd)
- if [ -z ${CI_COMMIT_TAG} ]; then export BUILD_PATH='latest'; else export BUILD_PATH=${CI_COMMIT_TAG}; fi
- sudo -u cvclicdp -i $RUNNER_LOCATION/.gitlab-ci.d/gitlab_deploy.sh $RUNNER_LOCATION $BUILD_PATH
- sudo -u cvclicdp -i $RUNNER_LOCATION/.gitlab/ci/gitlab_deploy.sh $RUNNER_LOCATION $BUILD_PATH
- rm -f corryvreckan-*.tar.gz
retry: 1
......@@ -372,7 +345,7 @@ deploy-docker-latest:
- docker-image-build
dependencies: []
only:
- schedules # Only execute this on scheduled "nightly" pipelines
- schedules@corryvreckan/corryvreckan
script:
- "echo" # unused but this line is required by GitLab CI
variables:
......@@ -384,7 +357,7 @@ deploy-docker-tag:
- docker-image-build
dependencies: []
only:
- tags
- tags@corryvreckan/corryvreckan
script:
- "echo" # unused but this line is required by GitLab CI
variables:
......
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />
<xsl:template match="/">
<testsuites>
<xsl:variable name="buildName" select="//Site/@BuildName"/>
<xsl:variable name="numberOfTests" select="count(//Site/Testing/Test)"/>
<xsl:variable name="numberOfFailures" select="count(//Site/Testing/Test[@Status!='passed'])" />
<testsuite name="CTest"
tests="{$numberOfTests}" time="0"
failures="{$numberOfFailures}" errors="0"
skipped="0">
<xsl:for-each select="//Site/Testing/Test">
<xsl:variable name="testName" select="translate(Name, '-', '_')"/>
<xsl:variable name="duration" select="Results/NamedMeasurement[@name='Execution Time']/Value"/>
<xsl:variable name="status" select="@Status"/>
<xsl:variable name="output" select="Results/Measurement/Value"/>
<xsl:variable name="className" select="translate(Path, '/.', '.')"/>
<testcase classname="projectroot{$className}"
name="{$testName}"
time="{$duration}">
<xsl:if test="@Status!='passed'">
<failure>
<xsl:value-of select="$output" />
</failure>
</xsl:if>
<system-out>
<xsl:value-of select="$output" />
</system-out>
</testcase>
</xsl:for-each>
</testsuite>
</testsuites>
</xsl:template>
</xsl:stylesheet>
......@@ -17,7 +17,7 @@ if [[ $clicdp_status == *"(stratum0 / S3)"* ]]; then
cd /home/cvclicdp/
# Extract artifact tars
echo "Extracting artifact tarballs"
echo "Extract artifact tarballs"
for filename in $1/*.tar.gz; do
echo " - $filename"
......@@ -73,7 +73,7 @@ if [[ $clicdp_status == *"(stratum0 / S3)"* ]]; then
else
(>&2 echo "#################################")
(>&2 echo "### CVMFS Transaction ongoing ###")
(>&2 echo "####### Deploy cancelled #######")
(>&2 echo "######## Deploy cancelled #######")
(>&2 echo "#################################")
exit 1
fi
......@@ -39,11 +39,7 @@ fi
# Determine which LCG version to use
if [ "$(uname)" == "Darwin" ]; then
DEFAULT_LCG="LCG_97python3"
else
DEFAULT_LCG="LCG_96b"
fi
DEFAULT_LCG="LCG_98python3"
if [ -z ${CORRY_LCG_VERSION} ]; then
echo "No explicit LCG version set, using ${DEFAULT_LCG}."
......@@ -61,14 +57,18 @@ if [ -z ${COMPILER_TYPE} ]; then
fi
fi
if [ ${COMPILER_TYPE} == "gcc" ]; then
COMPILER_VERSION="gcc8"
if [ ${OS} == "slc6" ]; then
COMPILER_VERSION="gcc8"
else
COMPILER_VERSION="gcc10"
fi
echo "Compiler type set to GCC, version ${COMPILER_VERSION}."
fi
if [ ${COMPILER_TYPE} == "llvm" ]; then
if [ "$(uname)" == "Darwin" ]; then
COMPILER_VERSION="clang110"
else
COMPILER_VERSION="clang8"
COMPILER_VERSION="clang10"
fi
echo "Compiler type set to LLVM, version ${COMPILER_VERSION}."
fi
......
#!/usr/bin/env python
import sys
import lxml.etree as et
# Check if we got token:
if len(sys.argv) != 4:
sys.exit(1)
input_xml = sys.argv[1]
input_xsl = sys.argv[2]
output_xml = sys.argv[3]
print("Reading XML input file")
dom = et.parse(input_xml)
print("Reading XSLT file")
xslt = et.parse(input_xsl)
print("Transforming DOM")
transform = et.XSLT(xslt)
newdom = transform(dom)
print("Writing XML output file")
newdom.write(output_xml, pretty_print=True)
......@@ -3,6 +3,9 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.4.3 FATAL_ERROR)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW) # change linker path search behaviour
CMAKE_POLICY(SET CMP0048 NEW) # set project version
IF(${CMAKE_VERSION} VERSION_GREATER "3.13")
CMAKE_POLICY(SET CMP0077 NEW) # allow overwriting options with normal variables
ENDIF()
ENDIF(COMMAND CMAKE_POLICY)
# Set default version
......@@ -173,7 +176,9 @@ ADD_RUNTIME_DEP(thisroot.sh)
###################################
# Set the clang-format version required by the CI for correct formatting:
SET(CLANG_FORMAT_VERSION "8")
SET(CLANG_FORMAT_VERSION "10")
# Set the clang-tidy version of the linter required by the CI:
SET(CLANG_TIDY_VERSION "10")
# Set the source files to clang-format (FIXME: determine this better)
FILE(GLOB_RECURSE
......
......@@ -3,6 +3,8 @@
# Corryvreckan
### The Maelstrom for Your Test Beam Data
For more details about the project please have a look at the website at https://cern.ch/corryvreckan.
[![build status](https://gitlab.cern.ch/simonspa/corryvreckan/badges/master/build.svg)](https://gitlab.cern.ch/simonspa/corryvreckan/commits/master)
## Dependencies
......@@ -52,7 +54,9 @@ Corryvreckan has been developed and is maintained by
The following authors, in alphabetical order, have contributed to Corryvreckan:
* Matthew Daniel Buckland, University of Liverpool, @mbucklan
* Carsten Daniel Burgard, DESY, @cburgard
* Manuel Colocci, CERN, @mcolocci
* Chun Cheng, DESY, @chengc
* Dominik Dannheim, CERN, @dannheim
* Katharina Dort, University of Giessen/CERN, @kdort
* Alexander Ferk, CERN, @aferk
......@@ -62,6 +66,7 @@ The following authors, in alphabetical order, have contributed to Corryvreckan:
* Andreas Matthias Nürnberg, KIT, @nurnberg
* Florian Pitters, HEPHY, @fpipper
* Tomas Vanat, CERN, @tvanat
* Jin Zhang, DESY, @jinz
## Contributing
All types of contributions, being it minor and major, are very welcome. Please refer to our [contribution guidelines](CONTRIBUTING.md) for a description on how to get started.
......
# Additional targets to perform clang-format/clang-tidy/cppcheck
# Check if the git pre-commit hook for formatting is installed:
# Check if the git hooks are installed and up-to-date:
IF(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.git)
SET(HOOK_SRC "${CMAKE_SOURCE_DIR}/etc/git-hooks/pre-commit-clang-format-hook")
SET(HOOK_DST "${CMAKE_SOURCE_DIR}/.git/hooks/pre-commit-clang-format")
IF(NOT EXISTS ${HOOK_DST})
MESSAGE(WARNING "Git hooks are not installed - consider installing them via ${CMAKE_SOURCE_DIR}/etc/git-hooks/install-hooks.sh")
ELSE()
EXECUTE_PROCESS(COMMAND "cmake" "-E" "compare_files" ${HOOK_SRC} ${HOOK_DST} RESULT_VARIABLE HOOKS_DIFFER)
IF(${HOOKS_DIFFER})
MESSAGE(WARNING "Git hooks are outdated - consider updating them via ${CMAKE_SOURCE_DIR}/etc/git-hooks/install-hooks.sh")
SET(HOOK_MISSING OFF)
SET(HOOK_OUTDATED OFF)
FOREACH(HOOK pre-commit-clang-format pre-push-tag-version)
SET(HOOK_SRC "${CMAKE_SOURCE_DIR}/etc/git-hooks/${HOOK}-hook")
SET(HOOK_DST "${CMAKE_SOURCE_DIR}/.git/hooks/${HOOK}")
IF(NOT EXISTS ${HOOK_DST})
SET(HOOK_MISSING ON)
ELSE()
EXECUTE_PROCESS(COMMAND "cmake" "-E" "compare_files" ${HOOK_SRC} ${HOOK_DST} RESULT_VARIABLE HOOKS_DIFFER)
IF(${HOOKS_DIFFER})
SET(HOOK_OUTDATED ON)
ENDIF()