mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-22 02:12:45 +01:00
ctest: allow script_ci.sh to run on non CI machine
This commit is contained in:
parent
0c3dc78916
commit
1839b9c29d
@ -37,7 +37,7 @@ set(ERROR_MESSAGES)
|
||||
set(SEPARATE_TEST_SUITES FALSE)
|
||||
set(RUN_COVERAGE FALSE)
|
||||
set(RUN_MEMCHECK FALSE)
|
||||
set(SUBMIT TRUE)
|
||||
openrw_should_submit_ci(SUBMIT)
|
||||
|
||||
# Build with no data and test
|
||||
set(BUILDER_NAME "${BUILDER_NAME_BASE}-nodata")
|
||||
|
@ -43,10 +43,10 @@ endif()
|
||||
set(RUN_MEMCHECK FALSE) #TODO
|
||||
|
||||
set(APPEND_RESULTS FALSE)
|
||||
if($ENV{SUBMIT})
|
||||
set(SUBMIT TRUE)
|
||||
if($ENV{USE_CONAN})
|
||||
set(RES TRUE)
|
||||
else()
|
||||
set(SUBMIT FALSE)
|
||||
set(RES FALSE)
|
||||
endif()
|
||||
|
||||
set(EMPTY_BINARY_DIR TRUE)
|
||||
|
@ -50,6 +50,7 @@ function(openrw_build_name BUILDER_NAME_RES BUILD_NAME_RES)
|
||||
set(REPO_BRANCH "$ENV{TRAVIS_BRANCH}")
|
||||
set(GIT_HASH "$ENV{TRAVIS_COMMIT}")
|
||||
set(_EVENT_TYPE "$ENV{TRAVIS_EVENT_TYPE}")
|
||||
set(SUBMIT TRUE)
|
||||
elseif("$ENV{APPVEYOR}")
|
||||
message(STATUS "AppVeyor detected")
|
||||
set(BUILDER_NAME "AppVeyor")
|
||||
@ -61,8 +62,15 @@ function(openrw_build_name BUILDER_NAME_RES BUILD_NAME_RES)
|
||||
else()
|
||||
set(_EVENT_TYPE "push")
|
||||
endif()
|
||||
set(SUBMIT TRUE)
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown CI")
|
||||
message("Unknown CI")
|
||||
set(BUILDER_NAME "unknown")
|
||||
set(REPO_NAME "repo_name")
|
||||
set(REPO_BRANCH "branch")
|
||||
set(GIT_HASH "git_hash")
|
||||
set(_EVENT_TYPE "nop")
|
||||
set(SUBMIT FALSE)
|
||||
endif()
|
||||
string(SUBSTRING "${GIT_HASH}" 0 8 GIT_HASH_SHORT)
|
||||
set(BUILD_NAME "${REPO_NAME}/${REPO_BRANCH}/${_EVENT_TYPE}/${GIT_HASH_SHORT}")
|
||||
@ -75,3 +83,14 @@ function(openrw_build_name BUILDER_NAME_RES BUILD_NAME_RES)
|
||||
set("${BUILDER_NAME_RES}" "${BUILDER_NAME}" PARENT_SCOPE)
|
||||
set("${BUILD_NAME_RES}" "${BUILD_NAME}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(openrw_should_submit_ci SHOULD_SUBMIT)
|
||||
if("$ENV{TRAVIS}")
|
||||
set(RES TRUE)
|
||||
elseif("$ENV{APPVEYOR}")
|
||||
set(RES TRUE)
|
||||
else()
|
||||
set(RES FALSE)
|
||||
endif()
|
||||
set("${SHOULD_SUBMIT}" "${RES}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
Loading…
Reference in New Issue
Block a user