File tree Expand file tree Collapse file tree 3 files changed +25
-4
lines changed Expand file tree Collapse file tree 3 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 31
31
include :
32
32
- stage : build for cache
33
33
script : ./programs/build_helpers/build_protocol
34
- - stage : build and test
34
+ - stage : build, test and scan partly with sonar
35
35
script : ./programs/build_helpers/build_and_test
36
+ - stage : scan fully with sonar
37
+ script : ./programs/build_helpers/scan_with_sonar
Original file line number Diff line number Diff line change @@ -14,10 +14,7 @@ du -hs sonar_cache
14
14
# The first pass, skip some files. This will remove the skipped files from the cache, but is an acceptable trade-off
15
15
programs/build_helpers/buildstep prepare.sonar.part 1 " cp sonar-project.properties sonar-project.properties.bak; sed -i '/sonar\.exclusions=/d;s/#sonar\.exclusions.part/sonar.exclusions/' sonar-project.properties"
16
16
programs/build_helpers/buildstep run.sonar.part 1500 " which sonar-scanner && sonar-scanner"
17
- du -hs sonar_cache
18
- # The second pass, scan all files
19
17
programs/build_helpers/buildstep prepare.sonar.full 1 " cp sonar-project.properties.bak sonar-project.properties"
20
- programs/build_helpers/buildstep run.sonar.full 2000 " which sonar-scanner && sonar-scanner"
21
18
du -hs sonar_cache
22
19
programs/build_helpers/buildstep end 0
23
20
ccache -s
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ programs/build_helpers/buildstep -s 3500
5
+ ccache -s
6
+ programs/build_helpers/buildstep Prepare 1 " sed -i '/tests/d' libraries/fc/CMakeLists.txt"
7
+ programs/build_helpers/buildstep cmake 5 " cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=--coverage -DCMAKE_CXX_FLAGS=--coverage -DBoost_USE_STATIC_LIBS=OFF -DCMAKE_CXX_OUTPUT_EXTENSION_REPLACE=ON ."
8
+ programs/build_helpers/buildstep make.everything 2400 " programs/build_helpers/make_with_sonar bw-output -j 2 witness_node chain_test cli_test"
9
+ set -o pipefail
10
+ programs/build_helpers/buildstep prepare.sonar 20 " find libraries/[acdenptuw]*/CMakeFiles/*.dir programs/[cdgjsw]*/CMakeFiles/*.dir -type d -print | while read d; do gcov -o \"\$ d\" \"\$ {d/CMakeFiles*.dir//}\" /*.cpp; done >/dev/null; programs/build_helpers/set_sonar_branch sonar-project.properties"
11
+ du -hs sonar_cache
12
+ # The first pass, skip some files. This will remove the skipped files from the cache, but is an acceptable trade-off
13
+ programs/build_helpers/buildstep prepare.sonar.part 1 " cp sonar-project.properties sonar-project.properties.bak; sed -i '/sonar\.exclusions=/d;s/#sonar\.exclusions.part/sonar.exclusions/' sonar-project.properties"
14
+ programs/build_helpers/buildstep run.sonar.part 1500 " which sonar-scanner && sonar-scanner"
15
+ programs/build_helpers/buildstep prepare.sonar.full 1 " cp sonar-project.properties.bak sonar-project.properties"
16
+ du -hs sonar_cache
17
+ # The second pass, scan all files
18
+ programs/build_helpers/buildstep run.sonar.full 2000 " which sonar-scanner && sonar-scanner"
19
+ du -hs sonar_cache
20
+ programs/build_helpers/buildstep end 0
21
+ ccache -s
22
+
You can’t perform that action at this time.
0 commit comments