Skip to content
Permalink
Browse files

configure CTEST for GH workflow

  • Loading branch information
3nids committed Nov 13, 2020
1 parent fbe56e1 commit 3dbe370cf7c1c0b335095b08ddc287fceb952bec
Showing with 6 additions and 7 deletions.
  1. +2 −7 .ci/config.ctest
  2. +4 −0 .github/workflows/run-tests.yml
@@ -6,12 +6,7 @@ SET (CTEST_BINARY_DIRECTORY $ENV{CTEST_BUILD_DIR}/build)
SET (CTEST_CMAKE_COMMAND "cmake")
SET (CTEST_BUILD_COMMAND $ENV{CTEST_BUILD_COMMAND})
SET (CTEST_SITE "github.com")
IF ($ENV{TRAVIS_PULL_REQUEST} STREQUAL "false")
# No pull request
SET (CTEST_BUILD_NAME "$ENV{TRAVIS_BRANCH} ($ENV{BUILD}) ($ENV{TRAVIS_COMMIT})")
ELSE()
SET (CTEST_BUILD_NAME "PR: $ENV{TRAVIS_PULL_REQUEST} / $ENV{TRAVIS_BRANCH} ($ENV{BUILD}) ($ENV{TRAVIS_COMMIT})")
ENDIF()
SET (CTEST_BUILD_NAME "$ENV{CTEST_BUILD_NAME}")
SET (CTEST_BUILD_CONFIGURATION "Release")
SET (CTEST_TEST_TIMEOUT 60) # 60 seconds
IF(DEFINED ENV{CTEST_PARALLEL_LEVEL})
@@ -60,7 +55,7 @@ ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE BUILDRES NUMBER_WARN
# CDash on OTB requires the date to be set for the search to work and that's the timezone this requires
SET(ENV{TZ} "UTC-6")
EXECUTE_PROCESS(COMMAND date +%Y-%m-%d OUTPUT_VARIABLE CDASH_DATE)
SET(RESULT_LINK "http://cdash.orfeo-toolbox.org/index.php?project=QGIS&filtercount=1&showfilters=1&field1=buildname/string&compare1=63&value1=$ENV{TRAVIS_COMMIT}&date=${CDASH_DATE}")
SET(RESULT_LINK "http://cdash.orfeo-toolbox.org/index.php?project=QGIS&filtercount=1&showfilters=1&field1=buildname/string&compare1=63&value1=$ENV{GITHUB_SHA}&date=${CDASH_DATE}")
EXECUTE_PROCESS(COMMAND curl --data-urlencode "url=${RESULT_LINK}" -s http://tinyurl.com/api-create.php
OUTPUT_VARIABLE SHORTURL)

@@ -41,13 +41,17 @@ jobs:
env:
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_REF: ${{ github.ref }}
GITHUB_PR_NUMBER: ${{github.event.number}}
run: |
DOCKER_TAG=$( [[ ${GITHUB_EVENT_NAME} =~ ^pull_request$ ]] && echo ${GITHUB_BASE_REF} || echo ${GITHUB_REF##*/} )
CTEST_BUILD_NAME=$( [[ ${GITHUB_EVENT_NAME} =~ ^pull_request$ ]] && echo PR ${GITHUB_PR_NUMBER} || echo ${GITHUB_REF##*/} )" (${GITHUB_SHA})"
echo "DOCKER_TAG=${DOCKER_TAG}" >> $GITHUB_ENV
echo "CTEST_BUILD_NAME=${CTEST_BUILD_NAME}" >> $GITHUB_ENV
- name: Print vars
run: |
echo DOCKER_TAG: ${DOCKER_TAG}
echo CTEST_BUILD_NAME: ${CTEST_BUILD_NAME}
- name: Build deps
run: |

0 comments on commit 3dbe370

Please sign in to comment.
You can’t perform that action at this time.