Skip to content

Commit

Permalink
[build] Moved code coverage testing from travis to github actions (#2874
Browse files Browse the repository at this point in the history
).
  • Loading branch information
yomnes0 authored Feb 19, 2024
1 parent e0d4227 commit ea8ea9f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/cxx11-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"'
Expand Down Expand Up @@ -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
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down
4 changes: 4 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ coverage:
threshold: null
patch: false
changes: false
ignore:
- "testing"
- "apps"
- "example"

0 comments on commit ea8ea9f

Please sign in to comment.