IAP GITLAB

Commit 6f2aa6ca authored by Ralf Ulrich's avatar Ralf Ulrich

CI

parent 111175f0
image: corsika/devel:u-18.04
variables:
GIT_SSL_NO_VERIFY: "1"
## Runtime options for sanitizers
......@@ -9,60 +7,201 @@ variables:
LSAN_OPTIONS: "log_threads=1"
ASAN_OPTIONS: "detect_leaks=0:detect_stack_use_after_return=1"
build: # normal pipeline for each commit, except for commits to the master
stage: build
# normal multi-step pipeline for each commit
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:
- corsika
script:
- mkdir 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
- ctest -j4 -V >& test.log || gzip -v -9 -S .gz test.log
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:
- 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:
junit:
- build/test_outputs/junit*.xml
except:
- master
paths:
- build/test.log.gz
coverage: # special pipeline for master with coverage report
stage: build
# normal pipeline for each commit
release-u-18_04:
image: corsika/devel:u-18.04
dependencies:
- config-u-18_04
stage: optional
tags:
- corsika
script:
- mkdir -p build
- cd build
- cmake .. -DCMAKE_BUILD_TYPE=Coverage
- cmake .. -DCMAKE_BUILD_TYPE=Release
- cmake --build . -- -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:
expire_in: 1 year
paths:
- build/coverage-report.tar.gz
only:
- master
when: manual
allow_failure: true
pages:
stage: build
documentation:
image: corsika/devel:u-18.04
dependencies:
- build-u-18_04
stage: optional
tags:
- corsika
script:
- mkdir build
- cd build
- cmake ..
- cmake --build . --target doxygen
- cmake --build . --target doxygen -- -j4
- mkdir .public
- cp -r Documentation/Doxygen/html .public/
- mv .public ../public
artifacts:
expire_in: 3 months
paths:
- public
only:
- tags
- triggers
- schedules
when: manual
allow_failure: true
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 (
# as long as there still are modules using it:
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
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
set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
include (CorsikaUtilities) # a few cmake function
......@@ -105,7 +107,7 @@ if (CMAKE_BUILD_TYPE STREQUAL Coverage)
COMMAND ${LCOV_BIN_DIR}/genhtml coverage.info -o coverage-report
DEPENDS coverage.info
)
add_custom_target(coverage DEPENDS coverage-report)
add_custom_target (coverage DEPENDS coverage-report)
endif ()
# 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
# 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})
find_package (Pythia8) # optional
if (WITH_PYTHIA)
find_package (Pythia8) # optional
endif (WITH_PYTHIA)
find_package (Eigen3 REQUIRED)
# order of subdirectories
add_subdirectory (ThirdParty)
#add_subdirectory (Utilities)
add_subdirectory (Framework)
add_subdirectory (Environment)
add_subdirectory (Stack)
......@@ -130,4 +133,4 @@ add_subdirectory (Main)
add_subdirectory (Tools)
if (WITH_COAST)
add_subdirectory (COAST)
endif()
endif ()
......@@ -151,5 +151,5 @@ function (CORSIKA_ADD_TEST)
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}")
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)
/*
* (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.
*
......
/*
* (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.
*
......
......@@ -60,12 +60,12 @@ namespace corsika::process {
template <typename T>
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>
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
(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
#define _utilities_sgn_h
......
......@@ -12,7 +12,6 @@ add_subdirectory (UrQMD)
add_subdirectory (SwitchProcess)
add_subdirectory (ParticleCut)
#add_custom_target(CORSIKAprocesses)
add_library (CORSIKAprocesses INTERFACE)
add_dependencies(CORSIKAprocesses ProcessNullModel)
add_dependencies(CORSIKAprocesses ProcessSibyll)
......
......@@ -98,7 +98,6 @@ TEST_CASE("pythia process") {
// setup environment, geometry
environment::Environment<environment::IMediumModel> env;
auto& universe = *(env.GetUniverse());
geometry::CoordinateSystem const& cs = env.GetCoordinateSystem();
......@@ -115,7 +114,6 @@ TEST_CASE("pythia process") {
std::vector<float>{1.}));
auto const* nodePtr = theMedium.get(); // save the medium for later use before moving it
universe.AddChild(std::move(theMedium));
SECTION("pythia decay") {
......@@ -141,7 +139,7 @@ TEST_CASE("pythia process") {
process::pythia::Decay model(particleList);
model.Init();
/*[[maybe_unused]] const process::EProcessReturn ret =*/model.DoDecay(projectile);
model.DoDecay(projectile);
[[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.
*
......
/*
* (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.
*
......
/*
* (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.
*
......
/*
* (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.
*
......
/*
* (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.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment