Skip to content

Commit b066ea2

Browse files
Arnfinnrobertodr
authored andcommitted
Restore code coverage
- Replaced coveralls with codecov Co-authored-by: Roberto Di Remigio <[email protected]>
1 parent 9295432 commit b066ea2

18 files changed

+134
-86
lines changed

.ci/Dangerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ end
2020
commit_lint.check disable: [:subject_cap, :subject_period]
2121

2222
# Check code style with clang-format
23-
code_style_validation.check file_extensions: ['.hpp', '.cpp', '.h'], ignore_file_patterns: [/^external\//]
23+
code_style_validation.check file_extensions: ['.hpp', '.cpp', '.h'],
24+
ignore_file_patterns: [/^external\//]
25+
26+
# Check code style with YAPF
27+
code_style_validation.check validator: 'yapf',
28+
file_extensions: ['.py'],
29+
ignore_file_patterns: [/^external\//]
2430

2531
# ------------------------------------------------------------------------------
2632
# What changed?

.ci/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ source "https://rubygems.org"
44
gem "danger"
55
gem "danger-commit_lint"
66
gem "danger-lgtm"
7-
gem 'danger-code_style_validation', '0.1.0' , :git => 'https://github.com/flix-tech/danger-code_style_validation.git'
7+
gem 'danger-code_style_validation', '0.3.0' , :git => 'https://github.com/flix-tech/danger-code_style_validation.git'

.ci/Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
GIT
22
remote: https://github.com/flix-tech/danger-code_style_validation.git
3-
revision: 05925775fa1ba9cd3eda09437c8c7efba31ef59e
3+
revision: f1ffb28af0f4d6f27711639abcd1e29ed065e232
44
specs:
5-
danger-code_style_validation (0.1.0)
5+
danger-code_style_validation (0.3.0)
66
danger-plugin-api (~> 1.0)
77

88
GEM
@@ -59,9 +59,9 @@ PLATFORMS
5959

6060
DEPENDENCIES
6161
danger
62-
danger-code_style_validation (= 0.1.0)!
62+
danger-code_style_validation (= 0.3.0)!
6363
danger-commit_lint
6464
danger-lgtm
6565

6666
BUNDLED WITH
67-
1.14.4
67+
1.14.6

.travis.yml

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ branches:
2323
matrix:
2424
include:
2525
- os: linux
26-
addons: &1
26+
addons:
2727
apt:
2828
packages:
2929
- cmake3
@@ -77,22 +77,20 @@ matrix:
7777
- PYTHON='python3'
7878
- RUN_DANGER=true
7979
- os: linux
80-
addons: *1
81-
env:
82-
- CXX_COMPILER='g++-4.6'
83-
- C_COMPILER='gcc-4.6'
84-
- Fortran_COMPILER='gfortran-4.6'
85-
- BUILD_TYPE='debug'
86-
- PYTHON='python2'
87-
- COVERAGE='--coverage'
88-
- RUN_DANGER=false
89-
allow_failures:
90-
- os: linux
91-
addons: *1
80+
addons:
81+
apt:
82+
packages:
83+
- cmake3
84+
- cmake3-data
85+
- g++-4.8
86+
- gcc-4.8
87+
- gfortran-4.8
88+
- libboost-math-dev
89+
- lcov
9290
env:
93-
- CXX_COMPILER='g++-4.6'
94-
- C_COMPILER='gcc-4.6'
95-
- Fortran_COMPILER='gfortran-4.6'
91+
- CXX_COMPILER='g++-4.8'
92+
- C_COMPILER='gcc-4.8'
93+
- Fortran_COMPILER='gfortran-4.8'
9694
- BUILD_TYPE='debug'
9795
- PYTHON='python2'
9896
- COVERAGE='--coverage'
@@ -121,10 +119,17 @@ script:
121119
- python setup.py --cxx=${CXX_COMPILER} --cc=${C_COMPILER} --fc=${Fortran_COMPILER} --type=${BUILD_TYPE} ${STATIC} ${COVERAGE}
122120
- cd build
123121
- ../.ci/ci_build.sh
124-
- python ../.ci/ci_test.py ctest --output-on-failure --verbose
122+
- travis_wait python ../.ci/ci_test.py ctest --output-on-failure --verbose --parallel 2
125123
- python ../.ci/ci_print_failing.py
126124
after_success:
127125
- |
128-
if [[ "${COVERAGE}" = true ]]; then
129-
coveralls --root .. -E ".*external.*" -E ".*CMakeFiles.*" -E ".*generated.*" -E ".*tests*" -E ".*tools.*" -E ".*cmake*" -E ".*doc*" -E ".*examples*" || echo 'coveralls upload failed.'
126+
if [[ "$COVERAGE" = "--coverage" ]]; then
127+
cd $TRAVIS_BUILD_DIR
128+
lcov --version
129+
lcov --directory . --capture --output-file coverage.info
130+
lcov --remove coverage.info '/usr/*' --output-file coverage.info
131+
lcov --remove coverage.info 'external/*' --output-file coverage.info
132+
lcov --remove coverage.info 'tests/*' --output-file coverage.info
133+
lcov --list coverage.info
134+
bash <(curl -s https://codecov.io/bash) -X gcov || echo "Codecov did not collect coverage reports"
130135
fi

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
`<build_dir>/lib64` (or `<build_dir>/lib`) as path to `libpcm.so.1`.
1919
For the executable in `<install_prefix>/bin` the `RPATH` will contain
2020
`<install_prefix>/lib64` (or `<install_prefix>/lib`) as path to `libpcm.so.1`.
21+
- Code coverage analysis was restored. We now use
22+
[Codecov](https://codecov.io). Thanks @arnfinn :tada:
2123

2224
### Changed
2325

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ include(autocmake_custom_color_messages)
3333
include(autocmake_ccache)
3434
include(windows)
3535
include(autocmake_definitions)
36-
include(autocmake_code_coverage)
36+
include(code_coverage)
3737
include(autocmake_int64)
3838
include(autocmake_omp)
3939
include(autocmake_safeguards)

Pipfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ name = "pypi"
88
[packages]
99

1010
breathe = "*"
11-
cpp-coveralls = "*"
1211
matplotlib = "*"
1312
"pep8" = "*"
1413
Pygments = "*"

Pipfile.lock

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![DOI](https://zenodo.org/badge/23794148.svg)](https://zenodo.org/badge/latestdoi/23794148)
22
[![Travis CI build status](https://travis-ci.org/PCMSolver/pcmsolver.svg?branch=release%2F1.Y)](https://travis-ci.org/PCMSolver/pcmsolver)
33
[![Documentation Status](https://readthedocs.org/projects/pcmsolver/badge/?version=stable)](http://pcmsolver.readthedocs.org/en/latest/?badge=latest)
4-
[![Coverage Status](https://coveralls.io/repos/PCMSolver/pcmsolver/badge.svg?branch=release%2F1.Y)](https://coveralls.io/r/PCMSolver/pcmsolver?branch=release)
4+
[![Coverage Status](https://codecov.io/gh/PCMSolver/pcmsolver/branch/release%2F1.Y/graph/badge.svg)](https://codecov.io/gh/PCMSolver/pcmsolver)
55
[![Coverity Scan Build](https://scan.coverity.com/projects/3046/badge.svg)](https://scan.coverity.com/projects/3046)
66

77
PCMSolver
@@ -31,12 +31,13 @@ using the `Pipfile` and `Pipfile.lock` files. The following
3131
compilers are used:
3232

3333
1. GCC 4.6, Python 2.7 This build generates _both_ the shared and static
34-
libraries, linking executables to the former. The build is run with and
35-
without coverage analysis, the latter being a _debug_ build.
34+
libraries, linking executables to the former.
3635
2. GCC 6.3.0, Python 2.7 This build generates _only_ the static library.
3736
3. Clang 3.5, GFortran 4.6, Python 3.5 This build generates _both_ the shared and static
38-
libraries, linking executables to the former. The build is run with and
39-
without coverage analysis, the latter being a _debug_ build.
37+
libraries, linking executables to the former.
38+
4. GCC 4.8, Python 2.7 This is a _debug_ build generating _both_ the shared and static
39+
libraries, linking executables to the former. The build is run with
40+
coverage analysis for submission to [Codecov](https://codecov.io).
4041

4142
The build needed for submission to [Coverity scan](https://scan.coverity.com/)
4243
is triggered by pushes to the `coverity_scan` branch. It is run on

api/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ install(FILES ${PROJECT_SOURCE_DIR}/api/PCMInput.h DESTINATION ${CMAKE_INSTALL_I
33

44
if(ENABLE_Fortran_API)
55
add_library(fortran_bindings OBJECT ${PROJECT_SOURCE_DIR}/api/pcmsolver.f90)
6-
set_target_properties(fortran_bindings PROPERTIES INCLUDE_DIRECTORIES "")
6+
set_target_properties(fortran_bindings
7+
PROPERTIES
8+
INCLUDE_DIRECTORIES ""
9+
POSITION_INDEPENDENT_CODE 1
10+
)
711
list(APPEND _objects $<TARGET_OBJECTS:fortran_bindings>)
812
endif()

0 commit comments

Comments
 (0)