mirror of
https://github.com/qicosmos/rest_rpc.git
synced 2026-08-29 08:34:47 +08:00
Merge pull request #121 from zhengjian526/master
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
name: Ubuntu 22.04 (llvm cov)
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt-get install openssl
|
||||
sudo apt-get install libssl-dev
|
||||
sudo apt-get install llvm
|
||||
|
||||
# - name: Install newer Clang
|
||||
# run: |
|
||||
# wget https://apt.llvm.org/llvm.sh
|
||||
# chmod +x ./llvm.sh
|
||||
# sudo ./llvm.sh 17
|
||||
|
||||
- name: Run Coverage
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
CC=clang CXX=clang++ cmake .. -DCOVERAGE_TEST=ON -DCINATRA_ENABLE_SSL=OFF
|
||||
make -j test_rest_rpc
|
||||
export LLVM_PROFILE_FILE="test_rest_rpc-%m.profraw"
|
||||
cd tests
|
||||
./test_rest_rpc
|
||||
llvm-profdata merge -sparse test_rest_rpc-*.profraw -o test_rest_rpc.profdata
|
||||
llvm-cov show ./test_rest_rpc -instr-profile=test_rest_rpc.profdata -format=html -output-dir=../.coverage_llvm_cov -ignore-filename-regex="examples|thirdparty|tests" -show-instantiations=false
|
||||
echo "Done!"
|
||||
|
||||
- name: Upload Coverage Results
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: llvm-cov
|
||||
path: ${{ github.workspace }}/build/.coverage_llvm_cov
|
||||
|
||||
- name: Create Code Coverage Report
|
||||
working-directory: ${{github.workspace}}/build/tests
|
||||
run: |
|
||||
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 ./test_rest_rpc -instr-profile=test_rest_rpc.profdata -ignore-filename-regex="examples|thirdparty|tests" -show-region-summary=false >> tmp.log
|
||||
echo "\`\`\`" >> tmp.log
|
||||
|
||||
- name: Create Comment
|
||||
uses: peter-evans/create-or-update-comment@v2
|
||||
with:
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
body-file: '${{github.workspace}}/build/tests/tmp.log'
|
||||
@@ -1,5 +1,11 @@
|
||||
# rest_rpc
|
||||
[](https://travis-ci.org/qicosmos/rest_rpc)
|
||||
|
||||
| OS (Compiler Version) | Status |
|
||||
|------------------------------------------------|----------------------------------------------------------------------------------------------------------|
|
||||
| Ubuntu 22.04 (clang 14.0.0) |  |
|
||||
| Ubuntu 22.04 (gcc 11.2.0) |  |
|
||||
| macOS Monterey 12 (AppleClang 14.0.0.14000029) |  |
|
||||
| Windows Server 2022 (MSVC 19.33.31630.0) |  |
|
||||
|
||||
c++11, high performance, cross platform, easy to use rpc framework.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user