codecov.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: Codecov
  2. on:
  3. push:
  4. branches: [ "master" ]
  5. pull_request:
  6. # The branches below must be a subset of the branches above
  7. branches: [ "master" ]
  8. jobs:
  9. build:
  10. if: startsWith(github.event.head_commit.message, '[SKIP]') == false
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v3
  14. - name: Install gtest
  15. run: |
  16. mkdir build && cd build
  17. git clone -b release-1.11.0 --depth=1 https://github.com/google/googletest.git googletest
  18. cd googletest && mkdir gtest_build && cd gtest_build
  19. sudo cmake .. && sudo make
  20. sudo make install
  21. - name: Compile
  22. if: ${{ success() }}
  23. shell: bash
  24. run: |
  25. gcc --version
  26. cd build
  27. cmake -DASAN=ON -DCOVERAGE=ON -DSTRICT_ERROR=ON ..
  28. make
  29. - name: Run Testcase
  30. run: ./build/bin/Cbox-test
  31. - name: Repo covered
  32. if: github.ref == 'refs/heads/master'
  33. uses: codecov/codecov-action@v3
  34. with:
  35. token: ${{ secrets.CODECOV_TOKEN }}
  36. gcov: true
  37. fail_ci_if_error: true