WIP automatic deployment

This commit is contained in:
Antonin Descampe 2016-05-15 16:01:20 +02:00
parent 177fdd94c0
commit e0d2a7bd8c
3 changed files with 19 additions and 15 deletions

View File

@ -67,7 +67,7 @@ script:
- ./tools/travis-ci/abi-check.sh
before_deploy:
- export OPJ_RELEASE_PKG_FILE=$(ls openjpeg*.zip)
- export OPJ_RELEASE_PKG_FILE=$(ls build/openjpeg-${TRAVIS_TAG}*)
- echo "deploying $OPJ_RELEASE_PKG_FILE to GitHub releases"
deploy:

View File

@ -123,12 +123,6 @@ endif()
set( CTEST_SOURCE_DIRECTORY "$ENV{OPJ_SOURCE_DIR}")
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
set (CTEST_NOTES_FILES
@ -153,9 +147,5 @@ endif()
if ("$ENV{OPJ_DO_SUBMIT}" STREQUAL "1")
ctest_submit()
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
#ctest_empty_binary_directory( "${CTEST_BINARY_DIRECTORY}" )

View File

@ -190,17 +190,31 @@ ctest -S ${OPJ_SOURCE_DIR}/tools/ctest_scripts/travis-ci.cmake -V || true
set +x
# Deployment if needed
#---------------------
#if [ "${OPJ_CI_INCLUDE_IF_DEPLOY:-}" == "1" ] && [ [ "${TRAVIS_TAG:-}" != "" ] || [ "${APPVEYOR_REPO_TAG:-}" == "true" ] ]; then
if [ "${OPJ_CI_INCLUDE_IF_DEPLOY:-}" == "1" ]; then
OPJ_CI_DEPLOY=1
OPJ_CI_DEPLOY=1 # unused for now
OPJ_CUR_DIR=${PWD}
if [ "${TRAVIS_OS_NAME:-}" == "linux"]; then
OPJ_PACK_GENERATOR="TGZ" # ZIP generator currently segfaults on linux
else
OPJ_PACK_GENERATOR="ZIP"
fi
if [ "${TRAVIS_TAG:-}" != "" ]; then
OPJ_TAG_NAME=${TRAVIS_TAG}
elif [ "${APPVEYOR_REPO_TAG:-}" == "true" ]; then
OPJ_TAG_NAME=${APPVEYOR_REPO_TAG_NAME}
else
OPJ_TAG_NAME=test
fi
OPJ_PACK_NAME="openjpeg-${OPJ_TAG_NAME}-${TRAVIS_OS_NAME}-${OPJ_CI_ARCH}"
cd ${OPJ_BINARY_DIR}
cmake -D CPACK_GENERATOR:STRING=ZIP ${OPJ_SOURCE_DIR}
cmake -D CPACK_GENERATOR:STRING=${OPJ_PACK_GENERATOR} -D CPACK_PACKAGE_FILE_NAME:STRING=${OPJ_PACK_NAME} ${OPJ_SOURCE_DIR}
cd ${OPJ_CUR_DIR}
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}/${OPJ_PACK_NAME}*) to GitHub releases"
if [ "${APPVEYOR_REPO_TAG:-}" == "true" ]; then
appveyor PushArtifact "${OPJ_BINARY_DIR}/openjpeg-*.zip"
appveyor PushArtifact "${OPJ_BINARY_DIR}/${OPJ_PACK_NAME}.zip"
fi
else
OPJ_CI_DEPLOY=0