parent
4e9ad80384
commit
fe354a1f51
|
|
@ -100,20 +100,29 @@ jobs:
|
||||||
run: sudo chmod -R 744 .dependencies
|
run: sudo chmod -R 744 .dependencies
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
id: tests_run
|
||||||
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. -G Ninja
|
cmake .. -G Ninja
|
||||||
ninja test_coverage_report
|
ninja test_coverage_report
|
||||||
|
|
||||||
- name: Add PR Comment
|
|
||||||
if: ${{ github.event.pull_request }}
|
|
||||||
uses: mshick/add-pr-comment@v2
|
|
||||||
with:
|
|
||||||
message-path: build/Summary.txt
|
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v3.1.1
|
uses: actions/upload-artifact@v3.1.1
|
||||||
with:
|
with:
|
||||||
name: Coverage
|
name: Coverage
|
||||||
path: build/Coverage
|
path: build/Coverage
|
||||||
|
|
||||||
|
- name: Report failure
|
||||||
|
if: steps.tests_run.outcome == 'failure'
|
||||||
|
run: echo ${{ steps.tests_run.outcome }} && test -n ""
|
||||||
|
|
||||||
|
# We don't PR comment if the tests failed, because
|
||||||
|
# the report isn't a complete picture...
|
||||||
|
- name: Add PR Comment
|
||||||
|
if: ${{ github.event.pull_request }}
|
||||||
|
uses: mshick/add-pr-comment@v2
|
||||||
|
with:
|
||||||
|
message-path: build/Summary.txt
|
||||||
|
|
|
||||||
|
|
@ -55,8 +55,8 @@ if(GCOV_ENABLE)
|
||||||
COMMAND tar -zcvf Coverage.tar.gz Coverage
|
COMMAND tar -zcvf Coverage.tar.gz Coverage
|
||||||
# Cheat and compare a file to itself to check for existence. File-Not-Found is a failure
|
# Cheat and compare a file to itself to check for existence. File-Not-Found is a failure
|
||||||
# code.
|
# code.
|
||||||
COMMAND ${PROJECT_SOURCE_DIR}/utils/gcovr.py -r . -e '../../tests' -e '../../lib/Catch2' | tee
|
COMMAND ${PROJECT_SOURCE_DIR}/utils/gcovr.py -r ${CMAKE_SOURCE_DIR} -e 'tests' -e 'lib/Catch2' |
|
||||||
Summary.txt
|
tee Summary.txt
|
||||||
COMMAND ${CMAKE_COMMAND} -E compare_files ${PROJECT_BINARY_DIR}/.ctest-finished
|
COMMAND ${CMAKE_COMMAND} -E compare_files ${PROJECT_BINARY_DIR}/.ctest-finished
|
||||||
${PROJECT_BINARY_DIR}/.ctest-finished
|
${PROJECT_BINARY_DIR}/.ctest-finished
|
||||||
BYPRODUCTS ${PROJECT_BINARY_DIR}/Summary.txt ${PROJECT_BINARY_DIR}/Coverage.tar.gz
|
BYPRODUCTS ${PROJECT_BINARY_DIR}/Summary.txt ${PROJECT_BINARY_DIR}/Coverage.tar.gz
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue