@@ -9,9 +9,10 @@ defaults:
99 upload-hunter-cache : &upload-hunter-cache
1010 run :
1111 name : " Upload Hunter cache"
12+ working_directory : ~/build
1213 command : | # Upload Hunter cache if not PR build.
1314 if [ ! "$CIRCLE_PR_NUMBER" ]; then
14- cmake --build build --target hunter_upload_cache
15+ cmake --build . --target hunter_upload_cache
1516 fi
1617
1718 environment-info : &environment-info
@@ -25,19 +26,22 @@ defaults:
2526 configure : &configure
2627 run :
2728 name : " Configure"
29+ # Build "out-of-source" to have better coverage report
30+ # (ninja is using relative paths otherwise).
31+ working_directory : ~/build
2832 command : |
29- mkdir -p build && cd build
30- cmake .. -G "$GENERATOR" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCOVERAGE=ON $CMAKE_OPTIONS
33+ cmake ../project -G "$GENERATOR" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCOVERAGE=ON $CMAKE_OPTIONS
3134
3235 build : &build
3336 run :
3437 name : " Build"
35- command : cmake --build build -- -j $BUILD_PARALLEL_JOBS
38+ working_directory : ~/build
39+ command : cmake --build . -- -j $BUILD_PARALLEL_JOBS
3640
3741 test : &test
3842 run :
3943 name : " Test"
40- pwd : build
44+ working_directory : ~/ build
4145 command : |
4246 if [ $(uname) = Linux ]; then
4347 export TMPDIR=/dev/shm
@@ -84,8 +88,10 @@ defaults:
8488 upload-coverage-data : &upload-coverage-data
8589 run :
8690 name : " Upload coverage data"
87- pwd : build
88- command : codecov
91+ command : |
92+ pwd
93+ $GCOV --version
94+ codecov --required --gcov-exec "$GCOV" --gcov-root ~/build
8995
9096 linux-steps : &linux-steps
9197 - checkout
@@ -110,6 +116,7 @@ jobs:
110116 environment :
111117 - CXX : clang++-5.0
112118 - CC : clang-5.0
119+ - GCOV : llvm-cov-5.0 gcov
113120 - GENERATOR : Ninja
114121 - BUILD_PARALLEL_JOBS : 8
115122 - TEST_PARALLEL_JOBS : 8
@@ -122,6 +129,7 @@ jobs:
122129 - BUILD_TYPE : Debug
123130 - CXX : g++-6
124131 - CC : gcc-6
132+ - GCOV : gcov-6
125133 - GENERATOR : Ninja
126134 - BUILD_PARALLEL_JOBS : 4
127135 - TEST_PARALLEL_JOBS : 4
@@ -135,6 +143,7 @@ jobs:
135143 macOS-XCode9 :
136144 environment :
137145 - CXX : clang++
146+ - GCOV : gcov
138147 - GENERATOR : Ninja
139148 - BUILD_PARALLEL_JOBS : 8
140149 - TEST_PARALLEL_JOBS : 8
0 commit comments