coverage.yml 881 B

123456789101112131415161718192021222324252627282930313233
  1. name: coverage
  2. on: [push, pull_request]
  3. jobs:
  4. codecov:
  5. timeout-minutes: 10
  6. runs-on: ubuntu-latest
  7. steps:
  8. - uses: actions/checkout@v2
  9. - name: Compile tests
  10. working-directory: build
  11. env:
  12. CXXFLAGS: "--coverage -O0 -fprofile-arcs -fno-inline -fno-inline-small-functions -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 --timeout 5 -C Debug -j4
  22. - name: Upload coverage to Codecov
  23. working-directory: build
  24. env:
  25. CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
  26. run: |
  27. wget https://codecov.io/bash -O codecov
  28. chmod +x codecov
  29. ./codecov -t $CODECOV_TOKEN -B $GITHUB_REF -s .