log: rlib::oneLog so no using in usr code #864
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
# req: failed log available in detail | |
name: UT + valgrind | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
schedule: | |
- cron: '51-54 2 * * 4' # 10:51-54am(BJ) every Thu | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: install valgrind | |
run: sudo apt-get update && sudo apt-get install valgrind | |
- name: install gmock & gtest # 1)always gtest latest 2)--depth 1 is to min download | |
run: cd .. && git clone https://github.com/google/googletest.git --depth 1 | |
- uses: actions/checkout@v4 | |
- name: make ut | |
run: cmake -Dci=cov -DCMAKE_CXX_COMPILER="g++" . && make -j | |
- name: ut | |
run: SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --log-file=ut/gcovr/cov.valgrind.log --error-exitcode=6 ./ut_exe --gtest_brief=1 | |
- name: install gcovr | |
run: pip install gcovr | |
- name: ut coverage (ret=2 is fail-under-line, =4 is fail-under-branch) | |
run: gcovr -k --config=ut/gcovr/gcovr.cfg && ls -lR . | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: coverage-report | |
path: | | |
./ut/gcovr/cov.* | |
./*gcov | |
./ut/CMakeFiles/UtLib.dir/domino/*PriDom* | |
- uses: codecov/codecov-action@v4 | |
if: always() | |
with: | |
file: ut/gcovr/cov.xml # optional | |
flags: ci_main # optional | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |