Skip to content

Commit 89d34c7

Browse files
committed
fix CXX keyerror and codecov
1 parent 1ce68b3 commit 89d34c7

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

‎.codecov.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ comment:
1212
require_base: false # [true :: must have a base report to post]
1313
require_head: false # [true :: must have a head report to post]
1414
hide_project_coverage: false # [true :: only show coverage on the git diff aka patch coverage]
15+
16+
# SCons compiles copies of the sources in build/coverage-<arch>/, map them back to src/
17+
fixes:
18+
- "build/coverage-x86_64/::src/"

‎.github/workflows/tests-on-pr.yml‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,20 @@ jobs:
4444
Import('env')
4545
import os
4646
prefix = os.environ['CONDA_PREFIX']
47-
env.Replace(CXX=os.environ['CXX'])
47+
env.Replace(CXX=os.path.join(prefix, 'bin', 'c++'))
4848
env.Prepend(CCFLAGS=['-isystem' + os.path.join(prefix, 'include')])
4949
env.Append(LIBPATH=os.path.join(prefix, 'lib'))
5050
env.Append(LINKFLAGS='-Wl,-rpath,' + os.path.join(prefix, 'lib'))
5151
EOF
5252
5353
- name: Build and run C++ tests with coverage
54-
run: scons build=coverage test
54+
run: |
55+
"$CONDA_PREFIX/bin/c++" --version
56+
scons build=coverage test
5557
5658
- name: Generate coverage report
5759
run: >-
58-
gcovr --gcov-executable "${CXX%c++}gcov"
60+
gcovr --gcov-executable "$CONDA_PREFIX/bin/gcov"
5961
--root . --filter 'build/coverage-.*/diffpy/'
6062
--xml coverage.xml
6163

‎requirements/tests.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
cxxtest
2+
gcovr

0 commit comments

Comments
 (0)