IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 6f2aa6ca authored by Ralf Ulrich's avatar Ralf Ulrich
Browse files

CI

parent 111175f0
No related branches found
No related tags found
No related merge requests found
image: corsika/devel:u-18.04
variables: variables:
GIT_SSL_NO_VERIFY: "1" GIT_SSL_NO_VERIFY: "1"
## Runtime options for sanitizers ## Runtime options for sanitizers
...@@ -9,60 +7,201 @@ variables: ...@@ -9,60 +7,201 @@ variables:
LSAN_OPTIONS: "log_threads=1" LSAN_OPTIONS: "log_threads=1"
ASAN_OPTIONS: "detect_leaks=0:detect_stack_use_after_return=1" ASAN_OPTIONS: "detect_leaks=0:detect_stack_use_after_return=1"
build: # normal pipeline for each commit, except for commits to the master # normal multi-step pipeline for each commit
stage: build stages:
- config
- build
- test
- release
- optional
# job/stage to just prepare cmake
config-u-18_04:
image: corsika/devel:u-18.04
stage: config
tags:
- corsika
script:
- mkdir build
- cd build
- cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_PYTHIA=ON
artifacts:
expire_in: 1 day
paths:
- build
except:
- master
# job/stage to just prepare cmake
config-clang-8:
image: corsika/devel:clang-8
stage: config
tags: tags:
- corsika - corsika
script: script:
- mkdir build - mkdir build
- cd build - cd build
- cmake .. -DCMAKE_BUILD_TYPE=Debug - cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_PYTHIA=ON
artifacts:
expire_in: 1 day
paths:
- build
except:
- master
# normal pipeline for each commit
build-u-18_04:
image: corsika/devel:u-18.04
dependencies:
- config-u-18_04
stage: build
tags:
- corsika
script:
- cd build
- cmake --build . -- -j4 - cmake --build . -- -j4
- ctest -j4 -V >& test.log || gzip -v -9 -S .gz test.log
artifacts: artifacts:
expire_in: 1 year expire_in: 1 day
paths:
- build
# normal pipeline for each commit
build-clang-8:
image: corsika/devel:clang-8
dependencies:
- config-clang-8
stage: build
tags:
- corsika
script:
- cd build
- cmake --build . -- -j4
artifacts:
expire_in: 1 day
paths:
- build
test-u-18_04:
image: corsika/devel:u-18.04
dependencies:
- build-u-18_04
stage: test
tags:
- corsika
script:
- set -o pipefail
- cd build
- ctest -VV | gzip -v -9 > test.log.gz
artifacts:
expire_in: 3 months
reports:
junit:
- build/test_outputs/junit*.xml
paths: paths:
- build/test.log.gz - build/test.log.gz
test-clang-8:
image: corsika/devel:clang-8
dependencies:
- build-clang-8
stage: test
tags:
- corsika
script:
- set -o pipefail
- cd build
- ctest -VV | gzip -v -9 > test.log.gz
artifacts:
expire_in: 3 months
reports: reports:
junit: junit:
- build/test_outputs/junit*.xml - build/test_outputs/junit*.xml
except: paths:
- master - build/test.log.gz
coverage: # special pipeline for master with coverage report # normal pipeline for each commit
stage: build release-u-18_04:
image: corsika/devel:u-18.04
dependencies:
- config-u-18_04
stage: optional
tags: tags:
- corsika - corsika
script: script:
- mkdir -p build
- cd build - cd build
- cmake .. -DCMAKE_BUILD_TYPE=Coverage - cmake .. -DCMAKE_BUILD_TYPE=Release
- cmake --build . -- -j4 - cmake --build . -- -j4
- ctest -j4 - ctest -j4
- cmake --build . --target coverage && tar czf coverage-report.tar.gz coverage-report when: manual
# normal pipeline for each commit
release-clang-8:
image: corsika/devel:clang-8
dependencies:
- config-clang-8
stage: optional
tags:
- corsika
script:
- cd build
- cmake .. -DCMAKE_BUILD_TYPE=Release
- cmake --build . -- -j4
- ctest -j4
when: manual
coverage: # special manual job to run after normal pipeline finished
image: corsika/devel:u-18.04
dependencies:
- config-u-18_04
stage: optional
tags:
- corsika
script:
- cd build
- cmake .. -DCMAKE_BUILD_TYPE=Coverage
- cmake --build . -- -j4
- ctest -j4 -V > test.log
- cmake --build . --target coverage
- tar czf coverage-report.tar.gz coverage-report
coverage: '/functions.*\s+(\d+\%)\s/'
artifacts: artifacts:
expire_in: 1 year expire_in: 1 year
paths: paths:
- build/coverage-report.tar.gz - build/coverage-report.tar.gz
only: when: manual
- master allow_failure: true
pages: documentation:
stage: build image: corsika/devel:u-18.04
dependencies:
- build-u-18_04
stage: optional
tags: tags:
- corsika - corsika
script: script:
- mkdir build
- cd build - cd build
- cmake .. - cmake --build . --target doxygen -- -j4
- cmake --build . --target doxygen
- mkdir .public - mkdir .public
- cp -r Documentation/Doxygen/html .public/ - cp -r Documentation/Doxygen/html .public/
- mv .public ../public - mv .public ../public
artifacts: artifacts:
expire_in: 3 months
paths: paths:
- public - public
only: when: manual
- tags allow_failure: true
- triggers
- schedules sanity:
image: corsika/devel:u-18.04
dependencies:
- config-u-18_04
stage: optional
tags:
- corsika
script:
- cd build
- cmake .. -DWITH_CORSIKA_SANITIZERS_ENABLED=ON
- cmake --build . -- -j4
when: manual
allow_failure: true
...@@ -18,12 +18,14 @@ project ( ...@@ -18,12 +18,14 @@ project (
# as long as there still are modules using it: # as long as there still are modules using it:
enable_language (Fortran) enable_language (Fortran)
# TEMPORARY: this should be removed, the sanitizers should be always enabled
option (WITH_CORSIKA_SANITIZERS_ENABLED "temporary way to globally disable sanitizers until the currently failing tests are fixed" OFF)
option (WITH_PYTHIA "flag to switch on/off pythia support" OFF)
option (WITH_COAST "flag to switch on/off COAST (reverse) interface" OFF)
# ignore many irrelevant Up-to-date messages during install # ignore many irrelevant Up-to-date messages during install
set (CMAKE_INSTALL_MESSAGE LAZY) set (CMAKE_INSTALL_MESSAGE LAZY)
# TEMPORARY: this should be removed, the sanitizers should be always enabled
option(CORSIKA_SANITIZERS_ENABLED "temporary way to globally disable sanitizers until the currently failing tests are fixed" OFF)
# directory for local cmake modules # directory for local cmake modules
set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules) set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
include (CorsikaUtilities) # a few cmake function include (CorsikaUtilities) # a few cmake function
...@@ -105,7 +107,7 @@ if (CMAKE_BUILD_TYPE STREQUAL Coverage) ...@@ -105,7 +107,7 @@ if (CMAKE_BUILD_TYPE STREQUAL Coverage)
COMMAND ${LCOV_BIN_DIR}/genhtml coverage.info -o coverage-report COMMAND ${LCOV_BIN_DIR}/genhtml coverage.info -o coverage-report
DEPENDS coverage.info DEPENDS coverage.info
) )
add_custom_target(coverage DEPENDS coverage-report) add_custom_target (coverage DEPENDS coverage-report)
endif () endif ()
# add call to ./do-copyright.py to run as unit-test-case # add call to ./do-copyright.py to run as unit-test-case
...@@ -114,12 +116,13 @@ add_test (NAME copyright_notices COMMAND ./do-copyright.py WORKING_DIRECTORY ${C ...@@ -114,12 +116,13 @@ add_test (NAME copyright_notices COMMAND ./do-copyright.py WORKING_DIRECTORY ${C
# add call to do-clang-format.sh checking to run as unit-test-case # add call to do-clang-format.sh checking to run as unit-test-case
add_test (NAME clang_format COMMAND ./do-clang-format.sh check WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) add_test (NAME clang_format COMMAND ./do-clang-format.sh check WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
find_package (Pythia8) # optional if (WITH_PYTHIA)
find_package (Pythia8) # optional
endif (WITH_PYTHIA)
find_package (Eigen3 REQUIRED) find_package (Eigen3 REQUIRED)
# order of subdirectories # order of subdirectories
add_subdirectory (ThirdParty) add_subdirectory (ThirdParty)
#add_subdirectory (Utilities)
add_subdirectory (Framework) add_subdirectory (Framework)
add_subdirectory (Environment) add_subdirectory (Environment)
add_subdirectory (Stack) add_subdirectory (Stack)
...@@ -130,4 +133,4 @@ add_subdirectory (Main) ...@@ -130,4 +133,4 @@ add_subdirectory (Main)
add_subdirectory (Tools) add_subdirectory (Tools)
if (WITH_COAST) if (WITH_COAST)
add_subdirectory (COAST) add_subdirectory (COAST)
endif() endif ()
...@@ -151,5 +151,5 @@ function (CORSIKA_ADD_TEST) ...@@ -151,5 +151,5 @@ function (CORSIKA_ADD_TEST)
target_compile_options(${name} PRIVATE -O1 -fno-omit-frame-pointer -fsanitize=${sanitize} -fno-sanitize-recover=all) target_compile_options(${name} PRIVATE -O1 -fno-omit-frame-pointer -fsanitize=${sanitize} -fno-sanitize-recover=all)
set_target_properties(${name} PROPERTIES LINK_FLAGS "-fsanitize=${sanitize}") set_target_properties(${name} PROPERTIES LINK_FLAGS "-fsanitize=${sanitize}")
endif() endif()
add_test (NAME ${name} COMMAND ${name} -o ${PROJECT_BINARY_DIR}/test_outputs/junit-${name}.xml -r junit) add_test (NAME ${name} COMMAND ${name} -o ${PROJECT_BINARY_DIR}/test_outputs/junit-${name}.xml -s -r junit)
endfunction (CORSIKA_ADD_TEST) endfunction (CORSIKA_ADD_TEST)
/* /*
* (c) Copyright 2019 CORSIKA Project, corsika-project@lists.kit.edu * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
* *
* See file AUTHORS for a list of contributors. * See file AUTHORS for a list of contributors.
* *
......
/* /*
* (c) Copyright 2019 CORSIKA Project, corsika-project@lists.kit.edu * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
* *
* See file AUTHORS for a list of contributors. * See file AUTHORS for a list of contributors.
* *
......
...@@ -60,12 +60,12 @@ namespace corsika::process { ...@@ -60,12 +60,12 @@ namespace corsika::process {
template <typename T> template <typename T>
struct is_switch_process : std::false_type {}; struct is_switch_process : std::false_type {};
template <typename A, typename B>
struct is_switch_process<switch_process::SwitchProcess<A, B>> : std::true_type {};
template <typename T> template <typename T>
bool constexpr is_switch_process_v = is_switch_process<T>::value; bool constexpr is_switch_process_v = is_switch_process<T>::value;
template <typename A, typename B>
struct is_process_sequence<switch_process::SwitchProcess<A, B>> : std::true_type {};
/** /**
T1 and T2 are both references if possible (lvalue), otherwise T1 and T2 are both references if possible (lvalue), otherwise
(rvalue) they are just classes. This allows us to handle both, (rvalue) they are just classes. This allows us to handle both,
......
/*
* (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
*
* See file AUTHORS for a list of contributors.
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#ifndef _utilities_sgn_h #ifndef _utilities_sgn_h
#define _utilities_sgn_h #define _utilities_sgn_h
......
...@@ -12,7 +12,6 @@ add_subdirectory (UrQMD) ...@@ -12,7 +12,6 @@ add_subdirectory (UrQMD)
add_subdirectory (SwitchProcess) add_subdirectory (SwitchProcess)
add_subdirectory (ParticleCut) add_subdirectory (ParticleCut)
#add_custom_target(CORSIKAprocesses)
add_library (CORSIKAprocesses INTERFACE) add_library (CORSIKAprocesses INTERFACE)
add_dependencies(CORSIKAprocesses ProcessNullModel) add_dependencies(CORSIKAprocesses ProcessNullModel)
add_dependencies(CORSIKAprocesses ProcessSibyll) add_dependencies(CORSIKAprocesses ProcessSibyll)
......
...@@ -98,7 +98,6 @@ TEST_CASE("pythia process") { ...@@ -98,7 +98,6 @@ TEST_CASE("pythia process") {
// setup environment, geometry // setup environment, geometry
environment::Environment<environment::IMediumModel> env; environment::Environment<environment::IMediumModel> env;
auto& universe = *(env.GetUniverse());
geometry::CoordinateSystem const& cs = env.GetCoordinateSystem(); geometry::CoordinateSystem const& cs = env.GetCoordinateSystem();
...@@ -115,7 +114,6 @@ TEST_CASE("pythia process") { ...@@ -115,7 +114,6 @@ TEST_CASE("pythia process") {
std::vector<float>{1.})); std::vector<float>{1.}));
auto const* nodePtr = theMedium.get(); // save the medium for later use before moving it auto const* nodePtr = theMedium.get(); // save the medium for later use before moving it
universe.AddChild(std::move(theMedium));
SECTION("pythia decay") { SECTION("pythia decay") {
...@@ -141,7 +139,7 @@ TEST_CASE("pythia process") { ...@@ -141,7 +139,7 @@ TEST_CASE("pythia process") {
process::pythia::Decay model(particleList); process::pythia::Decay model(particleList);
model.Init(); model.Init();
/*[[maybe_unused]] const process::EProcessReturn ret =*/model.DoDecay(projectile); model.DoDecay(projectile);
[[maybe_unused]] const TimeType time = model.GetLifetime(particle); [[maybe_unused]] const TimeType time = model.GetLifetime(particle);
} }
......
/* /*
* (c) Copyright 2019 CORSIKA Project, corsika-project@lists.kit.edu * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
* *
* See file AUTHORS for a list of contributors. * See file AUTHORS for a list of contributors.
* *
......
/* /*
* (c) Copyright 2019 CORSIKA Project, corsika-project@lists.kit.edu * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
* *
* See file AUTHORS for a list of contributors. * See file AUTHORS for a list of contributors.
* *
......
/* /*
* (c) Copyright 2019 CORSIKA Project, corsika-project@lists.kit.edu * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
* *
* See file AUTHORS for a list of contributors. * See file AUTHORS for a list of contributors.
* *
......
/* /*
* (c) Copyright 2019 CORSIKA Project, corsika-project@lists.kit.edu * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
* *
* See file AUTHORS for a list of contributors. * See file AUTHORS for a list of contributors.
* *
......
/* /*
* (c) Copyright 2019 CORSIKA Project, corsika-project@lists.kit.edu * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
* *
* See file AUTHORS for a list of contributors. * See file AUTHORS for a list of contributors.
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment