coverage.yml 992 B

12345678910111213141516171819202122232425262728293031323334353637
  1. name: coverage
  2. on: [push, pull_request]
  3. jobs:
  4. coveralls:
  5. timeout-minutes: 5
  6. runs-on: ubuntu-latest
  7. steps:
  8. - uses: actions/checkout@v1
  9. - name: Compile tests
  10. working-directory: build
  11. env:
  12. CXXFLAGS: "-O0 --coverage -fno-inline -fno-inline-small-functions -fno-default-inline"
  13. CXX: g++
  14. run: |
  15. cmake -DBUILD_TESTING=ON -DBUILD_LIB=ON ..
  16. make -j4
  17. - name: Run tests
  18. working-directory: build
  19. env:
  20. CTEST_OUTPUT_ON_FAILURE: 1
  21. run: ctest --timeout 5 -C Debug -j4
  22. - name: Setup Python
  23. uses: actions/setup-python@master
  24. with:
  25. version: 3.7
  26. - name: Update coveralls
  27. env:
  28. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  29. COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
  30. run: |
  31. pip install --upgrade wheel
  32. pip install cpp-coveralls
  33. coveralls --gcov gcov-7 --gcov-options '\-lp' -r . -b build -x cpp -x hpp -e deps -i src