-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Update coverage.yml to include CPU core count in build and test commands * chore: Update coverage.yml to remove unnecessary coverage exclusion * Fix coverage exclusion * Update codecov.yml
- Loading branch information
Showing
2 changed files
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ on: | |
- 'src/**' | ||
- 'tests/**' | ||
- 'CMakeLists.txt' | ||
- 'codecov.yml' | ||
|
||
jobs: | ||
Coverage: | ||
|
@@ -28,6 +29,10 @@ jobs: | |
sudo apt-get install ccache lcov | ||
echo 'CACHE_PATH=~/.cache/ccache' >> "$GITHUB_ENV" | ||
- name: Get number of CPU cores | ||
uses: SimenB/[email protected] | ||
id: cpu-cores | ||
|
||
- name: Cache Build | ||
id: cache-build | ||
uses: actions/[email protected] | ||
|
@@ -51,14 +56,16 @@ jobs: | |
-DCMAKE_BUILD_TYPE=Release \ | ||
- name: Build | ||
run: cd build; make -j2; ccache --show-stats | ||
run: | | ||
cmake --build build -j ${{ steps.cpu-cores.outputs.count }} | ||
ccache --show-stats | ||
- name: Run Coverage | ||
run: | | ||
cd build | ||
ctest --verbose --output-on-failure | ||
ctest --verbose -j ${{ steps.cpu-cores.outputs.count }} | ||
lcov --directory . --capture --output-file coverage.info | ||
lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' '*tests/*' --output-file coverage.info | ||
lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' 'tests/CMakeFiles/ipc_toolkit_tests.dir/src/tests/*' --output-file coverage.info | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ coverage: | |
target: 75% | ||
threshold: 5% | ||
only_pulls: true | ||
ignore: | ||
- "tests/*" |