IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antonio Augusto Alves Junior
corsika
Compare revisions
master to d7d5acf79d32ef21197b00e5472c894040d5b51c
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
AAAlvesJr/corsika
Select target project
No results found
d7d5acf79d32ef21197b00e5472c894040d5b51c
Select Git revision
Swap
Target
AirShowerPhysics/corsika
Select target project
AirShowerPhysics/corsika
rulrich/corsika
AAAlvesJr/corsika
Andre/corsika
arrabito/corsika
Nikos/corsika
olheiser73/corsika
AirShowerPhysics/papers/corsika
pranav/corsika
9 results
master
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
init
· 89a48519
Hans Dembinski
authored
5 years ago
89a48519
generating report and publish as artefact
· d7d5acf7
Hans Dembinski
authored
5 years ago
d7d5acf7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+9
-4
9 additions, 4 deletions
.gitlab-ci.yml
CMakeLists.txt
+12
-13
12 additions, 13 deletions
CMakeLists.txt
Tools/coverage.sh
+33
-0
33 additions, 0 deletions
Tools/coverage.sh
with
54 additions
and
17 deletions
.gitlab-ci.yml
View file @
d7d5acf7
...
...
@@ -10,22 +10,27 @@ build:
script
:
-
mkdir build
-
cd build
-
cmake ..
-
cmake ..
-DCOVERAGE=ON
-
cmake --build . -- -j 4
-
ctest -j4 -V >& test.log
-
../Tools/coverage.sh
after_script
:
-
cd build
-
ls
-
gzip -v -9 -S .gz test.log
-
tar cjf coverage-report.tar.bz2 coverage-report
-
pwd
artifacts
:
expire_in
:
1 week
paths
:
-
build/test.log.gz
when
:
on_failure
reports
:
junit
:
-
build/test_outputs/junit*.xml
reports
:
junit
:
-
build/test_outputs/junit*.xml
when
:
on_success
paths
:
-
build/coverage-report.tar.bz2
pages
:
stage
:
build
...
...
This diff is collapsed.
Click to expand it.
CMakeLists.txt
View file @
d7d5acf7
...
...
@@ -22,12 +22,17 @@ set (CMAKE_CXX_EXTENSIONS OFF)
enable_testing
()
set
(
CTEST_OUTPUT_ON_FAILURE 1
)
option
(
COVERAGE
"Generate coverage data"
OFF
)
if
(
COVERAGE
)
set
(
CMAKE_BUILD_TYPE
"Debug"
)
endif
()
# Set a default build type if none was specified
set
(
default_build_type
"Release"
)
if
(
EXISTS
"
${
CMAKE_SOURCE_DIR
}
/.git"
)
set
(
default_build_type
"Debug"
)
endif
()
if
(
NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES
)
message
(
STATUS
"Setting build type to '
${
default_build_type
}
' as no other was specified."
)
set
(
CMAKE_BUILD_TYPE
"
${
default_build_type
}
"
CACHE
...
...
@@ -37,11 +42,17 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
"Debug"
"Release"
"MinSizeRel"
"RelWithDebInfo"
)
endif
(
NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES
)
# enable warnings and disallow non-standard language
set
(
CMAKE_CXX_FLAGS
"-Wall -pedantic -Wextra -Wno-ignored-qualifiers"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-O0 -g"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"-O3 -g"
)
# -O2 would not trade speed for size, neither O2/3 use fast-math
set
(
CMAKE_Fortran_FLAGS
"-std=legacy"
)
if
(
COVERAGE
)
set
(
CMAKE_CXX_FLAGS
"--coverage"
)
set
(
CMAKE_EXE_LINKER_FLAGS
"--coverage"
)
set
(
CMAKE_SHARED_LINKER_FLAGS
"--coverage"
)
endif
()
# clang produces a lot of unecessary warnings without this:
add_compile_options
(
"$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wno-nonportable-include-path>"
)
...
...
@@ -52,18 +63,6 @@ if (WITH_COAST)
add_compile_options
(
"-fPIC"
)
endif
()
# unit testing coverage, does not work yet
#include (CodeCoverage)
##set(COVERAGE_LCOV_EXCLUDES 'Documentation/*')
##setup_target_for_coverage(${PROJECT_NAME}_coverage ${PROJECT_TEST_NAME} coverage)
#SETUP_TARGET_FOR_COVERAGE_GCOVR_HTML (
# NAME corsika_coverage
# EXECUTABLE ctest
# #-j ${PROCESSOR_COUNT}
# # DEPENDENCIES corsika
# )
#add_custom_target (corsika_pre_build)
#add_custom_command (TARGET corsika_pre_build PRE_BUILD COMMAND "${PROJECT_SOURCE_DIR}/pre_compile.py")
...
...
This diff is collapsed.
Click to expand it.
Tools/coverage.sh
0 → 100755
View file @
d7d5acf7
#!/bin/sh
# must be executed in project root folder
if
[
-z
$GCOV
]
;
then
GCOV
=
gcov
fi
LCOV_VERSION
=
"1.13"
LCOV_DIR
=
"lcov-
${
LCOV_VERSION
}
"
if
[
!
-e
$LCOV_DIR
]
;
then
wget
-O
- https://github.com/linux-test-project/lcov/releases/download/v
${
LCOV_VERSION
}
/lcov-
${
LCOV_VERSION
}
.tar.gz |
tar
zxf -
fi
# LCOV="$LCOV_EXE --gcov-tool=${GCOV} --rc lcov_branch_coverage=1"
LCOV
=
"
${
LCOV_DIR
}
/bin/lcov --gcov-tool=
${
GCOV
}
"
# no branch coverage
# collect raw data
$LCOV
--base-directory
`
pwd
`
\
--directory
`
pwd
`
\
--capture
--output-file
coverage.info
# remove uninteresting entries
$LCOV
--extract
coverage.info
"*/corsika/*"
--output-file
coverage.info
# if [ $CI ]; then
# # upload if on CI
# curl -s https://codecov.io/bash | bash -s - -f coverage.info -X gcov -x $GCOV
# else
# # otherwise just print
# $LCOV_DIR/bin/genhtml coverage.info -o coverage-report
# fi
$LCOV_DIR
/bin/genhtml coverage.info
-o
coverage-report
This diff is collapsed.
Click to expand it.