Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos committed Jan 30, 2024
1 parent 1b23bcf commit dd3bc6d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/linux_llvm_cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ jobs:
ls
mkdir build && cd build
CC=clang-17 CXX=clang++-17 cmake .. -DCOVERAGE_TEST=ON -DENABLE_SSL=ON
make -j test_rpc
export LLVM_PROFILE_FILE="test_rpc-%m.profraw"
./tests/test_rpc
llvm-profdata merge -sparse test_rpc-*.profraw -o test_rpc.profdata
llvm-cov show ./tests/test_rpc -instr-profile=test_rpc.profdata -format=html -output-dir=../.coverage_llvm_cov -ignore-filename-regex="thirdparty|asio" -show-instantiations=false
make -j
export LLVM_PROFILE_FILE="test_ylt-%m.profraw"
cd output
./tests/coro_io_test ./tests/coro_rpc_test ./tests/easylog_test ./tests/struct_pack_test ./tests/struct_pack_test_with_optimize
llvm-profdata merge -sparse test_ylt-*.profraw -o test_ylt.profdata
llvm-cov show ./tests/coro_io_test ./tests/coro_rpc_test ./tests/easylog_test ./tests/struct_pack_test ./tests/struct_pack_test_with_optimize -instr-profile=test_ylt.profdata -format=html -output-dir=../.coverage_llvm_cov -ignore-filename-regex="thirdparty|asio" -show-instantiations=false
echo "Done!"
- name: Upload Coverage Results
Expand All @@ -51,7 +52,7 @@ jobs:
echo "Code Coverage Report" > tmp.log
echo "for detail, [goto summary](https://github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}/actions/runs/${{github.run_id}}) download Artifacts `llvm-cov`" >> tmp.log
echo "\`\`\`" >> tmp.log
llvm-cov report ./tests/test_rpc -instr-profile=test_rpc.profdata -ignore-filename-regex="thirdparty|asio" -show-region-summary=false >> tmp.log
llvm-cov report ./tests/coro_io_test ./tests/coro_rpc_test ./tests/easylog_test ./tests/struct_pack_test ./tests/struct_pack_test_with_optimize -instr-profile=test_ylt.profdata -ignore-filename-regex="thirdparty|asio" -show-region-summary=false >> tmp.log
echo "\`\`\`" >> tmp.log
- name: Create Comment
Expand Down

0 comments on commit dd3bc6d

Please sign in to comment.