WIP automatic deployment

This commit is contained in:
Antonin Descampe 2016-05-15 13:52:55 +02:00
parent 7c41a1e393
commit 517d57ef1f
2 changed files with 11 additions and 1 deletions

View File

@ -123,6 +123,12 @@ endif()
set( CTEST_SOURCE_DIRECTORY "$ENV{OPJ_SOURCE_DIR}") set( CTEST_SOURCE_DIRECTORY "$ENV{OPJ_SOURCE_DIR}")
set( CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}") set( CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}")
#----------------------
# Package parameters in case of deployment
# Might add more parameters later on
set( CPACK_GENERATOR "ZIP" )
#--------------------- #---------------------
# Files to submit to the dashboard # Files to submit to the dashboard
set (CTEST_NOTES_FILES set (CTEST_NOTES_FILES
@ -147,5 +153,9 @@ endif()
if ("$ENV{OPJ_DO_SUBMIT}" STREQUAL "1") if ("$ENV{OPJ_DO_SUBMIT}" STREQUAL "1")
ctest_submit() ctest_submit()
endif() endif()
# # Generate package if deployment
# if( "$ENV{OPJ_CI_DEPLOY}" STREQUAL "1")
# ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" TARGET "package")
# endif()
# Do not clean, we'll parse the log for known failure # Do not clean, we'll parse the log for known failure
#ctest_empty_binary_directory( "${CTEST_BINARY_DIRECTORY}" ) #ctest_empty_binary_directory( "${CTEST_BINARY_DIRECTORY}" )

View File

@ -193,7 +193,7 @@ set +x
#if [ "${OPJ_CI_INCLUDE_IF_DEPLOY:-}" == "1" ] && [ [ "${TRAVIS_TAG:-}" != "" ] || [ "${APPVEYOR_REPO_TAG:-}" == "true" ] ]; then #if [ "${OPJ_CI_INCLUDE_IF_DEPLOY:-}" == "1" ] && [ [ "${TRAVIS_TAG:-}" != "" ] || [ "${APPVEYOR_REPO_TAG:-}" == "true" ] ]; then
if [ "${OPJ_CI_INCLUDE_IF_DEPLOY:-}" == "1" ]; then if [ "${OPJ_CI_INCLUDE_IF_DEPLOY:-}" == "1" ]; then
OPJ_CI_DEPLOY=1 OPJ_CI_DEPLOY=1
cmake --build ${OPJ_BINARY_DIR} --target package -D CPACK_GENERATOR:STRING="ZIP" cmake --build ${OPJ_BINARY_DIR} --target package
echo "ready to deploy $(ls ${OPJ_BINARY_DIR}/openjpeg*.zip) to GitHub releases" echo "ready to deploy $(ls ${OPJ_BINARY_DIR}/openjpeg*.zip) to GitHub releases"
if [ "${APPVEYOR_REPO_TAG:-}" == "true" ]; then if [ "${APPVEYOR_REPO_TAG:-}" == "true" ]; then
appveyor PushArtifact "${OPJ_BINARY_DIR}/openjpeg-*.zip" appveyor PushArtifact "${OPJ_BINARY_DIR}/openjpeg-*.zip"