coverage.yml 956 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: coverage
  2. on: [push, pull_request]
  3. jobs:
  4. codecov:
  5. timeout-minutes: 15
  6. runs-on: ubuntu-latest
  7. steps:
  8. - uses: actions/checkout@v4
  9. - name: Compile tests
  10. working-directory: build
  11. env:
  12. CXXFLAGS: "--coverage -fno-elide-constructors -fno-inline -fno-default-inline"
  13. CXX: g++
  14. run: |
  15. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ..
  16. make -j4
  17. - name: Run tests
  18. working-directory: build
  19. env:
  20. CTEST_OUTPUT_ON_FAILURE: 1
  21. run: ctest -C Debug -j4
  22. - name: Collect data
  23. working-directory: build
  24. run: |
  25. sudo apt install lcov
  26. lcov -c -d . -o coverage.info
  27. lcov -l coverage.info
  28. - name: Upload coverage to Codecov
  29. uses: codecov/codecov-action@v3
  30. with:
  31. token: ${{ secrets.CODECOV_TOKEN }}
  32. files: build/coverage.info
  33. name: EnTT
  34. fail_ci_if_error: true