[build] Moved code coverage testing from travis to github actions (#2874).

This commit is contained in:
yomnes0
2024-02-19 10:04:36 +01:00
committed by GitHub
parent e0d4227ad3
commit ea8ea9f2c2
4 changed files with 13 additions and 13 deletions
+7 -2
View File
@@ -16,8 +16,13 @@ jobs:
- name: configure
run: |
mkdir _build && cd _build
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON -DENABLE_TESTING=ON -DENABLE_EXAMPLES=ON
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_ENCRYPTION=ON -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON -DENABLE_TESTING=ON -DENABLE_EXAMPLES=ON -DENABLE_CODE_COVERAGE=ON
- name: build
run: cd _build && cmake --build ./
- name: test
run: cd _build && ctest --extra-verbose
run: |
cd _build && ctest --extra-verbose
- name: codecov
run: |
source ./scripts/collect-gcov.sh
bash <(curl -s https://codecov.io/bash)
+1 -6
View File
@@ -25,9 +25,8 @@ matrix:
- os: linux
env:
- BUILD_TYPE=Debug
- BUILD_OPTS='-DENABLE_CODE_COVERAGE=ON -DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
- BUILD_OPTS='-DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
- RUN_SONARCUBE=1
- RUN_CODECOV=1
- env:
- BUILD_TYPE=Debug
- BUILD_OPTS='-DENABLE_LOGGING=OFF -DUSE_ENCLIB=mbedtls -DENABLE_MONOTONIC_CLOCK=ON -DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
@@ -100,10 +99,6 @@ script:
test $SUCCESS == 0;
fi
after_success:
- if (( "$RUN_CODECOV" )); then
source ./scripts/collect-gcov.sh;
bash <(curl -s https://codecov.io/bash);
fi
- if (( "$RUN_SONARCUBE" )); then
sonar-scanner -D"sonar.cfamily.gcov.reportPath=.";
fi
+1 -5
View File
@@ -1522,15 +1522,11 @@ if (ENABLE_UNITTESTS AND ENABLE_CXX11)
)
#set_tests_properties(test-srt PROPERTIES RUN_SERIAL TRUE)
else()
gtest_add_tests(
TEST_LIST tests_srt
TARGET test-srt
)
set_tests_properties(${tests_srt} PROPERTIES RUN_SERIAL TRUE)
gtest_discover_tests(test-srt)
endif()
enable_testing()
endif()
+4
View File
@@ -6,3 +6,7 @@ coverage:
threshold: null
patch: false
changes: false
ignore:
- "testing"
- "apps"
- "example"