-
-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Fix code coverage and publish on Codecov (#773)
* Add codecov support Signed-off-by: Uilian Ries <[email protected]> * Add codecov to analysis Signed-off-by: Uilian Ries <[email protected]> * Check library coverage Signed-off-by: Uilian Ries <[email protected]> * Add codecov to analysis Signed-off-by: Uilian Ries <[email protected]> * update coverage option Signed-off-by: Uilian Ries <[email protected]> * Fix code coverage steps Signed-off-by: Uilian Ries <[email protected]> --------- Signed-off-by: Uilian Ries <[email protected]>
- Loading branch information
1 parent
bd02a42
commit 467f9d4
Showing
4 changed files
with
32 additions
and
14 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 |
---|---|---|
|
@@ -98,3 +98,8 @@ jobs: | |
run: | | ||
cmake --build --preset=unixlike-clang-debug-${{ matrix.type }} --target run-faker-cxx-basic-example \ | ||
&& cmake --build --preset=unixlike-clang-debug-${{ matrix.type }} --target run-faker-cxx-person-example | ||
- name: Code coverage | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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 |
---|---|---|
|
@@ -81,16 +81,25 @@ jobs: | |
-DCMAKE_TOOLCHAIN_FILE=build/Debug/generators/conan_toolchain.cmake \ | ||
-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld | ||
- name: Build | ||
- name: Build library and tests | ||
run: cmake --build --preset=unixlike-clang-debug-static | ||
|
||
- name: Generate code coverage | ||
- name: Build code coverage | ||
run: cmake --build --preset=unixlike-clang-debug-static --target=faker-ccov-all | ||
|
||
|
||
- name: Generate code coverage report | ||
working-directory: ${{github.workspace}}/build/unixlike-clang-debug-static | ||
run: | | ||
ninja faker-ccov-all \ | ||
&& llvm-cov-18 show `cat ccov/binaries.list` -instr-profile=ccov/all-merged.profdata > coverage.txt \ | ||
llvm-cov-18 show `cat ccov/binaries.list` -instr-profile=ccov/all-merged.profdata > coverage.txt \ | ||
&& llvm-cov-18 report `cat ccov/binaries.list` -instr-profile=ccov/all-merged.profdata | ||
- name: Upload code coverage report to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
directory: ${{github.workspace}}/build/unixlike-clang-debug-static | ||
|
||
- name: Store build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
|
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
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