Skip to content

Commit

Permalink
treat GitHub Actions CI like travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Aug 30, 2021
1 parent 93ac07e commit 777f20a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,13 @@ endif()
# determine the (short) hostname of the build machine
################################################################################
set(travis_os $ENV{TRAVIS_OS_NAME})
set(github_ci $ENV{GITHUB_ACTIONS})
if(travis_os)
set(CTEST_SITE "Travis CI")
elseif(appveyor)
set(CTEST_SITE "AppVeyor CI")
elseif(github_ci)
set(CTEST_SITE "GitHub Actions")
else()
execute_process(COMMAND hostname -s RESULT_VARIABLE ok OUTPUT_VARIABLE CTEST_SITE ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT ok EQUAL 0)
Expand Down Expand Up @@ -434,7 +437,7 @@ macro(go)
unset(CTEST_NOTES_FILES) # less clutter in ctest -V output
if(res EQUAL 0)
set(test_results 0)
if(travis_os)
if(travis_os OR (github_ci AND NOT $ENV{RUNNER_OS} MATCHES "Windows"))
set(CTEST_BUILD_COMMAND "${CMAKE_MAKE_PROGRAM} ${MAKE_ARGS}")
ctest_build(
BUILD "${CTEST_BINARY_DIRECTORY}"
Expand Down

0 comments on commit 777f20a

Please sign in to comment.