mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
move all CI logic to ctest2ci
This commit is contained in:
parent
4eed1d29e9
commit
7bc0f19f31
@ -64,11 +64,7 @@ IF(NOT IGNORE_BUILD_FAILURES)
|
||||
IF(NOT ${BUILDRES} EQUAL 0 OR NOT ${NUMERR} EQUAL 0)
|
||||
ctest_submit (RETRY_COUNT 3 RETRY_DELAY 30)
|
||||
MESSAGE("")
|
||||
MESSAGE(" ${Yellow}Test results submitted to${ColorReset}")
|
||||
MESSAGE(" ${BoldYellow}${SHORTURL}${ColorReset}")
|
||||
# Github step output
|
||||
MESSAGE("::set-output name=TESTS_PASS::false")
|
||||
MESSAGE("::set-output name=CDASH_URL::${SHORTURL}")
|
||||
MESSAGE(" ${Yellow}Test results submitted to:${ColorReset} ${SHORTURL}")
|
||||
MESSAGE("")
|
||||
MESSAGE( FATAL_ERROR " ${Red}Build failed. Not running tests.${ColorReset}" )
|
||||
MESSAGE("")
|
||||
@ -78,11 +74,7 @@ ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL ${PARALLEL_LEVEL} R
|
||||
IF(NOT ${NUMWARN} EQUAL 0 OR NOT ${TESTRES} EQUAL 0)
|
||||
ctest_submit (RETRY_COUNT 3 RETRY_DELAY 30)
|
||||
MESSAGE("")
|
||||
MESSAGE(" ${Yellow}Test results submitted to${ColorReset}")
|
||||
MESSAGE(" ${BoldYellow}${SHORTURL}${ColorReset}" )
|
||||
# Github step output
|
||||
MESSAGE("::set-output name=TESTS_PASS::false")
|
||||
MESSAGE("::set-output name=CDASH_URL::${SHORTURL}")
|
||||
MESSAGE(" ${Yellow}Test results submitted to:${ColorReset} ${SHORTURL}" )
|
||||
MESSAGE("")
|
||||
SET(LEVEL "")
|
||||
IF(NOT ${TESTRES} EQUAL 0)
|
||||
@ -103,6 +95,5 @@ IF(NOT ${TESTRES} EQUAL 0)
|
||||
MESSAGE(" ${BoldGreen}Success${ColorReset}")
|
||||
MESSAGE(" ${Green}All tests passed successfully.${ColorReset}")
|
||||
MESSAGE("")
|
||||
MESSAGE("::set-output name=TESTS_PASS::true")
|
||||
MESSAGE("")
|
||||
ENDIF(NOT ${TESTRES} EQUAL 0)
|
||||
|
@ -108,6 +108,8 @@ for line in p.stdout:
|
||||
in_failure = True
|
||||
|
||||
if not in_failing_test and re.search('[0-9]+% tests passed, [0-9]+ tests failed out of', updated_line):
|
||||
tests_failing = re.match(r'([0-9]+) tests failed', updated_line).group(1)
|
||||
updated_line += '\n::set-output name=TESTS_FAILING::{}'.format(tests_failing)
|
||||
end_fold()
|
||||
|
||||
if re.search('100% tests passed', updated_line):
|
||||
@ -116,6 +118,8 @@ for line in p.stdout:
|
||||
if re.match('Submit files', updated_line):
|
||||
start_fold('submit')
|
||||
elif re.search('Test results submitted to', updated_line):
|
||||
cdash_url = re.match(r'(http.*)$', updated_line).group(1)
|
||||
updated_line += '\n::set-output name=CDASH_URL::{}'.format(cdash_url)
|
||||
end_fold()
|
||||
|
||||
sys.stdout.write(updated_line)
|
||||
|
10
.github/workflows/run-tests.yml
vendored
10
.github/workflows/run-tests.yml
vendored
@ -35,9 +35,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
outputs:
|
||||
cdash_url: ${{ steps.tests.outputs.CDASH_URL }}
|
||||
compile_outcome: ${{ steps.compile.outcome }}
|
||||
tests_pass: ${{ steps.tests.outputs.TESTS_PASS }}
|
||||
tests_failing: ${{ steps.tests.outputs.TESTS_FAILING }}
|
||||
cdash_url: ${{ steps.tests.outputs.CDASH_URL }}
|
||||
runners_outcome: ${{ steps.runners.outcome }}
|
||||
|
||||
steps:
|
||||
@ -193,14 +193,14 @@ jobs:
|
||||
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
|
||||
CDASH_URL: ${{ needs.build.outputs.cdash_url }}
|
||||
COMPILE_OUTCOME: ${{ needs.build.outputs.compile_outcome }}
|
||||
TESTS_PASS: ${{ needs.build.outputs.tests_pass }}
|
||||
TESTS_FAILING: ${{ needs.build.outputs.tests_failing }}
|
||||
RUNNERS_OUTCOME: ${{ needs.build.outputs.runners_outcome }}
|
||||
run: |
|
||||
echo "::set-output name=COMMENT_ID::"$([[ "${COMMENT_FOUND}" -eq "0" ]] && echo ${COMMENT_CREATED} || echo ${COMMENT_FOUND})
|
||||
if [[ ${COMPILE_OUTCOME} != "success" ]]; then
|
||||
echo "::set-output name=COMMENT_BODY::${COMMIT_SHA} :scream: compilation failed"
|
||||
elif [[ ${TESTS_PASS} != "true" ]]; then
|
||||
echo "::set-output name=COMMENT_BODY::${COMMIT_SHA} :fire: some unit-tests are failing ${CDASH_URL}"
|
||||
elif [[ ${TESTS_FAILING} != "0" ]]; then
|
||||
echo "::set-output name=COMMENT_BODY::${COMMIT_SHA} :fire: ${TESTS_FAILING} unit-tests are failing ${CDASH_URL}"
|
||||
elif [[ ${RUNNERS_OUTCOME} != "success" ]]; then
|
||||
echo "::set-output name=COMMENT_BODY::${COMMIT_SHA} :broken_heart: QGIS runners test failed"
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user