summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAntonin Descampe <antonin@gmail.com>2016-05-15 16:01:20 +0200
committerAntonin Descampe <antonin@gmail.com>2016-05-15 16:01:20 +0200
commite0d2a7bd8c49ba3a1d3ff0ee7842936ab0d9508d (patch)
treeb8463bd7a18abc7f133b22141977c9abe0f0bd12 /tools
parent177fdd94c096cbc3a12c203bb83f1139af4966a0 (diff)
WIP automatic deployment
Diffstat (limited to 'tools')
-rw-r--r--tools/ctest_scripts/travis-ci.cmake10
-rwxr-xr-xtools/travis-ci/run.sh22
2 files changed, 18 insertions, 14 deletions
diff --git a/tools/ctest_scripts/travis-ci.cmake b/tools/ctest_scripts/travis-ci.cmake
index 93d65bc0..f8c50e5b 100644
--- a/tools/ctest_scripts/travis-ci.cmake
+++ b/tools/ctest_scripts/travis-ci.cmake
@@ -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}" )
diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh
index f0d39a87..245ad88b 100755
--- a/tools/travis-ci/run.sh
+++ b/tools/travis-ci/run.sh
@@ -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