From 1b2ebfc69a4be4dd72561e5be59f1c9063f8fbac Mon Sep 17 00:00:00 2001 From: mayeut Date: Thu, 8 Oct 2015 20:06:59 +0200 Subject: [PATCH 01/50] Add ABI tracker --- .travis.yml | 35 ++------- src/lib/openjp2/openjpeg.h | 2 + tools/abi-tracker/openjpeg.json | 131 ++++++++++++++++++++++++++++++++ tools/travis-ci/abi-check.sh | 45 +++++++++++ tools/travis-ci/install.sh | 112 +++++++++++++-------------- tools/travis-ci/run.sh | 7 +- 6 files changed, 245 insertions(+), 87 deletions(-) create mode 100644 tools/abi-tracker/openjpeg.json create mode 100755 tools/travis-ci/abi-check.sh diff --git a/.travis.yml b/.travis.yml index e5872a31..1c2f5587 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,38 +1,10 @@ language: c os: - linux - - osx compiler: - gcc - - clang - - x86_64-w64-mingw32-gcc env: - - OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release - - OPJ_CI_ARCH=i386 OPJ_CI_BUILD_CONFIGURATION=Release - - OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_ASAN=1 - - OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug - -matrix: - exclude: - - os: osx - compiler: gcc - - os: osx - compiler: x86_64-w64-mingw32-gcc - - compiler: clang - env: OPJ_CI_ARCH=i386 OPJ_CI_BUILD_CONFIGURATION=Release - - compiler: clang - env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug - - os: linux - compiler: clang - env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release - - compiler: gcc - env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_ASAN=1 - - compiler: x86_64-w64-mingw32-gcc - env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_ASAN=1 - - compiler: x86_64-w64-mingw32-gcc - env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug - - os: osx - env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_ASAN=1 + - OPJ_CI_ABI_CHECK=1 addons: apt: @@ -44,9 +16,14 @@ addons: - gcc-mingw-w64-i686 - gcc-mingw-w64-x86-64 - gcc-mingw-w64 + - libelf-dev + - elfutils + - wdiff + - exuberant-ctags install: - ./tools/travis-ci/install.sh script: - ./tools/travis-ci/run.sh + - ./tools/travis-ci/abi-check.sh diff --git a/src/lib/openjp2/openjpeg.h b/src/lib/openjp2/openjpeg.h index 4a8e75ce..f1a065cc 100644 --- a/src/lib/openjp2/openjpeg.h +++ b/src/lib/openjp2/openjpeg.h @@ -677,6 +677,8 @@ typedef struct opj_image { OPJ_BYTE *icc_profile_buf; /** size of ICC profile */ OPJ_UINT32 icc_profile_len; + /** size of ICC profile */ + OPJ_UINT32 icc_profile_len2; } opj_image_t; diff --git a/tools/abi-tracker/openjpeg.json b/tools/abi-tracker/openjpeg.json new file mode 100644 index 00000000..67beb33a --- /dev/null +++ b/tools/abi-tracker/openjpeg.json @@ -0,0 +1,131 @@ +{ + "Name": "openjpeg", + "Title": "OpenJPEG", + "SourceUrl": "https://github.com/uclouvain/openjpeg/tags", + "Git": "https://github.com/uclouvain/openjpeg.git", + "Maintainer": "Antonin D.", + "MaintainerUrl": "http://www.openjpeg.org/", + "Package": "version.", + + "Versions": [ + { + "Number": "current", + "Installed": "installed/openjpeg/current", + "Source": "@OPJ_SRC_DIR@", + "Changelog": "On", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/current/list", + "PublicTypes": "public_types/openjpeg/current/list" + }, + { + "Number": "2.1", + "Installed": "installed/openjpeg/2.1", + "Source": "src/openjpeg/2.1/version.2.1.tar.gz", + "Changelog": "NEWS", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/2.1/list", + "PublicTypes": "public_types/openjpeg/2.1/list" + }, + { + "Number": "2.0.1", + "Installed": "installed/openjpeg/2.0.1", + "Source": "src/openjpeg/2.0.1/version.2.0.1.tar.gz", + "Changelog": "NEWS", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/2.0.1/list", + "PublicTypes": "public_types/openjpeg/2.0.1/list" + }, + { + "Number": "2.0", + "Installed": "installed/openjpeg/2.0", + "Source": "src/openjpeg/2.0/version.2.0.tar.gz", + "Changelog": "NEWS", + "HeadersDiff": "On", + "PkgDiff": "On", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/2.0/list", + "PublicTypes": "public_types/openjpeg/2.0/list" + }, + { + "Number": "1.5.2", + "Installed": "installed/openjpeg/1.5.2", + "Source": "src/openjpeg/1.5.2/version.1.5.2.tar.gz", + "Changelog": "NEWS", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/1.5.2/list", + "PublicTypes": "public_types/openjpeg/1.5.2/list" + }, + { + "Number": "1.5.1", + "Installed": "installed/openjpeg/1.5.1", + "Source": "src/openjpeg/1.5.1/version.1.5.1.tar.gz", + "Changelog": "NEWS", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/1.5.1/list", + "PublicTypes": "public_types/openjpeg/1.5.1/list" + }, + { + "Number": "1.5", + "Installed": "installed/openjpeg/1.5", + "Source": "src/openjpeg/1.5/version.1.5.tar.gz", + "Changelog": "NEWS", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/1.5/list", + "PublicTypes": "public_types/openjpeg/1.5/list" + }, + { + "Number": "1.4", + "Installed": "installed/openjpeg/1.4", + "Source": "src/openjpeg/1.4/version.1.4.tar.gz", + "Changelog": "CHANGES", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/1.4/list", + "PublicTypes": "public_types/openjpeg/1.4/list" + }, + { + "Number": "1.3", + "Installed": "installed/openjpeg/1.3", + "Source": "src/openjpeg/1.3/version.1.3.tar.gz", + "Changelog": "ChangeLog", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/1.3/list", + "PublicTypes": "public_types/openjpeg/1.3/list" + }, + { + "Number": "1.2", + "Installed": "installed/openjpeg/1.2", + "Source": "src/openjpeg/1.2/version.1.2.tar.gz", + "Changelog": "ChangeLog", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/1.2/list", + "PublicTypes": "public_types/openjpeg/1.2/list" + }] +} diff --git a/tools/travis-ci/abi-check.sh b/tools/travis-ci/abi-check.sh new file mode 100755 index 00000000..afdc251b --- /dev/null +++ b/tools/travis-ci/abi-check.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +# This script executes the abi-check step when running under travis-ci (in run step) + +# Set-up some bash options +set -o nounset ## set -u : exit the script if you try to use an uninitialised variable +set -o errexit ## set -e : exit the script if any statement returns a non-true return value +set -o pipefail ## Fail on error in pipe +set -o xtrace ## set -x : Print a trace of simple commands and their arguments after they are expanded and before they are executed. + +# Exit if not ABI check +if [ "${OPJ_CI_ABI_CHECK:-}" != "1" ]; then + exit 0 +fi + +OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd) + +if [ ! -d ${HOME}/abi-check ]; then + mkdir ${HOME}/abi-check +fi + +cd ${HOME}/abi-check + +if [ ! -f ${HOME}/abi-check/.restored ]; then + # Clean all if .restored is not present + touch not.empty + rm -rf ./* + # Let's get tools not available with apt + mkdir tools + wget -qO - https://tools.ietf.org/tools/rfcdiff/rfcdiff-1.42.tgz | tar -xz + mv rfcdiff-1.42 ${PWD}/tools/rfcdiff + wget -qO - https://github.com/lvc/installer/archive/0.2.tar.gz | tar -xz + mkdir ${PWD}/tools/abi-tracker + make -C installer-0.2 install prefix=${PWD}/tools/abi-tracker target=abi-tracker + mkdir tracker +fi + +cd tracker + +# Check ABI +export PATH=${PWD}/../tools/rfcdiff:${PWD}/../tools/abi-tracker/bin:$PATH +sed -e "s/@OPJ_SOURCE_DIR@/${OPJ_SOURCE_DIR//\//\\/}/g" ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json > openjpeg.json +abi-monitor -get openjpeg.json +abi-monitor -build openjpeg.json +abi-tracker -build openjpeg.json diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index 11dcf26c..ce85c97f 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -19,67 +19,67 @@ function exit_handler () trap exit_handler EXIT trap exit ERR -# We don't need anything for coverity scan builds +# We don't need anything for coverity scan builds. ABI check is managed in abi-check.sh +if [ "${COVERITY_SCAN_BRANCH:-}" == "1" ] || [ "${OPJ_CI_ABI_CHECK:-}" == "1" ]; then + exit 0 +fi -if [ "${COVERITY_SCAN_BRANCH:-}" != "1" ]; then +if [ "${OPJ_CI_ASAN:-}" == "1" ]; then + # We need a new version of cmake than travis-ci provides + wget -qO - http://www.cmake.org/files/v3.3/cmake-3.3.1-Linux-x86_64.tar.gz | tar -xz + # copy to a directory that will not changed every version + mv cmake-3.3.1-Linux-x86_64 cmake-install +fi - if [ "${OPJ_CI_ASAN:-}" == "1" ]; then - # We need a new version of cmake than travis-ci provides - wget -qO - http://www.cmake.org/files/v3.3/cmake-3.3.1-Linux-x86_64.tar.gz | tar -xz - # copy to a directory that will not changed every version - mv cmake-3.3.1-Linux-x86_64 cmake-install +if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then + + OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd) + + # We need test data + if [ "${TRAVIS_BRANCH:-}" == "" ]; then + TRAVIS_BRANCH=$(git -C ${OPJ_SOURCE_DIR} branch | grep '*' | tr -d '*[[:blank:]]') #default to same branch as we're setting up fi + OPJ_DATA_HAS_BRANCH=$(git ls-remote --heads git://github.com/uclouvain/openjpeg-data.git ${TRAVIS_BRANCH} | wc -l) + if [ ${OPJ_DATA_HAS_BRANCH} -ne 0 ]; then + OPJ_DATA_BRANCH=${TRAVIS_BRANCH} + else + OPJ_DATA_BRANCH=master #default to master + fi + echo "Cloning openjpeg-data from ${OPJ_DATA_BRANCH} branch" + git clone --depth=1 --branch=${OPJ_DATA_BRANCH} git://github.com/uclouvain/openjpeg-data.git data - if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then + # We need jpylyzer for the test suite + echo "Retrieving jpylyzer" + wget -qO - https://github.com/openpreserve/jpylyzer/archive/1.14.2.tar.gz | tar -xz + mv jpylyzer-1.14.2 jpylyzer + chmod +x jpylyzer/jpylyzer/jpylyzer.py - OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd) - - # We need test data - if [ "${TRAVIS_BRANCH:-}" == "" ]; then - TRAVIS_BRANCH=$(git -C ${OPJ_SOURCE_DIR} branch | grep '*' | tr -d '*[[:blank:]]') #default to same branch as we're setting up - fi - OPJ_DATA_HAS_BRANCH=$(git ls-remote --heads git://github.com/uclouvain/openjpeg-data.git ${TRAVIS_BRANCH} | wc -l) - if [ ${OPJ_DATA_HAS_BRANCH} -ne 0 ]; then - OPJ_DATA_BRANCH=${TRAVIS_BRANCH} - else - OPJ_DATA_BRANCH=master #default to master - fi - echo "Cloning openjpeg-data from ${OPJ_DATA_BRANCH} branch" - git clone --depth=1 --branch=${OPJ_DATA_BRANCH} git://github.com/uclouvain/openjpeg-data.git data - - # We need jpylyzer for the test suite - echo "Retrieving jpylyzer" - wget -qO - https://github.com/openpreserve/jpylyzer/archive/1.14.2.tar.gz | tar -xz - mv jpylyzer-1.14.2 jpylyzer - chmod +x jpylyzer/jpylyzer/jpylyzer.py - - # When OPJ_NONCOMMERCIAL=1, kakadu trial binaries are used for testing. Here's the copyright notice from kakadu: - # Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney. - # You are free to trial these executables and even to re-distribute them, - # so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain. - # Note: Binaries can only be used for non-commercial purposes. - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then - if [ "${TRAVIS_OS_NAME:-}" == "linux" ] || uname -s | grep -i Linux &> /dev/null; then - echo "Retrieving Kakadu" - wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip - cmake -E tar -xf KDU77_Demo_Apps_for_Linux-x86-64_150710.zip - mv KDU77_Demo_Apps_for_Linux-x86-64_150710 kdu - elif [ "${TRAVIS_OS_NAME:-}" == "osx" ] || uname -s | grep -i Darwin &> /dev/null; then - echo "Retrieving Kakadu" - wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_OSX109_150710.dmg_.zip - cmake -E tar -xf KDU77_Demo_Apps_for_OSX109_150710.dmg_.zip - wget -q http://downloads.sourceforge.net/project/catacombae/HFSExplorer/0.23/hfsexplorer-0.23-bin.zip - mkdir hfsexplorer && cmake -E chdir hfsexplorer tar -xf ../hfsexplorer-0.23-bin.zip - ./hfsexplorer/bin/unhfs.sh -o ./ -fsroot Kakadu-demo-apps.pkg KDU77_Demo_Apps_for_OSX109_150710.dmg - pkgutil --expand Kakadu-demo-apps.pkg ./kdu - cd kdu - cat libkduv77r.pkg/Payload | gzip -d | cpio -id - cat kduexpand.pkg/Payload | gzip -d | cpio -id - cat kducompress.pkg/Payload | gzip -d | cpio -id - install_name_tool -id ${PWD}/libkdu_v77R.dylib libkdu_v77R.dylib - install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_compress - install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_expand - fi + # When OPJ_NONCOMMERCIAL=1, kakadu trial binaries are used for testing. Here's the copyright notice from kakadu: + # Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney. + # You are free to trial these executables and even to re-distribute them, + # so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain. + # Note: Binaries can only be used for non-commercial purposes. + if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then + if [ "${TRAVIS_OS_NAME:-}" == "linux" ] || uname -s | grep -i Linux &> /dev/null; then + echo "Retrieving Kakadu" + wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip + cmake -E tar -xf KDU77_Demo_Apps_for_Linux-x86-64_150710.zip + mv KDU77_Demo_Apps_for_Linux-x86-64_150710 kdu + elif [ "${TRAVIS_OS_NAME:-}" == "osx" ] || uname -s | grep -i Darwin &> /dev/null; then + echo "Retrieving Kakadu" + wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_OSX109_150710.dmg_.zip + cmake -E tar -xf KDU77_Demo_Apps_for_OSX109_150710.dmg_.zip + wget -q http://downloads.sourceforge.net/project/catacombae/HFSExplorer/0.23/hfsexplorer-0.23-bin.zip + mkdir hfsexplorer && cmake -E chdir hfsexplorer tar -xf ../hfsexplorer-0.23-bin.zip + ./hfsexplorer/bin/unhfs.sh -o ./ -fsroot Kakadu-demo-apps.pkg KDU77_Demo_Apps_for_OSX109_150710.dmg + pkgutil --expand Kakadu-demo-apps.pkg ./kdu + cd kdu + cat libkduv77r.pkg/Payload | gzip -d | cpio -id + cat kduexpand.pkg/Payload | gzip -d | cpio -id + cat kducompress.pkg/Payload | gzip -d | cpio -id + install_name_tool -id ${PWD}/libkdu_v77R.dylib libkdu_v77R.dylib + install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_compress + install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_expand fi fi fi diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index bec41d6d..323b30e1 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -7,6 +7,11 @@ set -o nounset ## set -u : exit the script if you try to use an uninitialised set -o errexit ## set -e : exit the script if any statement returns a non-true return value set -o pipefail ## Fail on error in pipe +# ABI check is done by abi-check.sh +if [ "${OPJ_CI_ABI_CHECK:-}" == "1" ]; then + exit 0 +fi + # Set-up some variables if [ "${OPJ_CI_BUILD_CONFIGURATION:-}" == "" ]; then export OPJ_CI_BUILD_CONFIGURATION=Release #default @@ -207,8 +212,6 @@ New/unknown test failure found!!! OPJ_CI_RESULT=1 fi fi - - fi exit ${OPJ_CI_RESULT} From a7ae153a468816132fb71d02a8d2000c27461adb Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 21:20:54 +0200 Subject: [PATCH 02/50] ABI Check --- tools/abi-tracker/openjpeg.json | 3 +- tools/travis-ci/abi-check.sh | 66 +++++++++++++++++++++------------ 2 files changed, 44 insertions(+), 25 deletions(-) diff --git a/tools/abi-tracker/openjpeg.json b/tools/abi-tracker/openjpeg.json index 67beb33a..8d83d222 100644 --- a/tools/abi-tracker/openjpeg.json +++ b/tools/abi-tracker/openjpeg.json @@ -2,7 +2,6 @@ "Name": "openjpeg", "Title": "OpenJPEG", "SourceUrl": "https://github.com/uclouvain/openjpeg/tags", - "Git": "https://github.com/uclouvain/openjpeg.git", "Maintainer": "Antonin D.", "MaintainerUrl": "http://www.openjpeg.org/", "Package": "version.", @@ -11,7 +10,7 @@ { "Number": "current", "Installed": "installed/openjpeg/current", - "Source": "@OPJ_SRC_DIR@", + "Source": "src/openjpeg/current", "Changelog": "On", "HeadersDiff": "On", "PkgDiff": "Off", diff --git a/tools/travis-ci/abi-check.sh b/tools/travis-ci/abi-check.sh index afdc251b..a5814d37 100755 --- a/tools/travis-ci/abi-check.sh +++ b/tools/travis-ci/abi-check.sh @@ -13,33 +13,53 @@ if [ "${OPJ_CI_ABI_CHECK:-}" != "1" ]; then exit 0 fi +OPJ_UPLOAD_ABI_REPORT=0 +OPJ_LIMIT_ABI_BUILDS="-limit 2" +if [ "${TRAVIS_REPO_SLUG:-}" != "" ]; then + if [ "$(echo "${TRAVIS_REPO_SLUG}" | sed 's/\(^.*\)\/.*/\1/')" == "uclouvain" ] && [ "${TRAVIS_PULL_REQUEST:-}" == "false" ]; then + # Upload report + OPJ_UPLOAD_ABI_REPORT=1 + # Build full report + OPJ_LIMIT_ABI_BUILDS= + fi +fi + OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd) -if [ ! -d ${HOME}/abi-check ]; then - mkdir ${HOME}/abi-check -fi +mkdir ${HOME}/abi-check cd ${HOME}/abi-check - -if [ ! -f ${HOME}/abi-check/.restored ]; then - # Clean all if .restored is not present - touch not.empty - rm -rf ./* - # Let's get tools not available with apt - mkdir tools - wget -qO - https://tools.ietf.org/tools/rfcdiff/rfcdiff-1.42.tgz | tar -xz - mv rfcdiff-1.42 ${PWD}/tools/rfcdiff - wget -qO - https://github.com/lvc/installer/archive/0.2.tar.gz | tar -xz - mkdir ${PWD}/tools/abi-tracker - make -C installer-0.2 install prefix=${PWD}/tools/abi-tracker target=abi-tracker - mkdir tracker -fi - +# Let's get tools not available with apt +mkdir tools +wget -qO - https://tools.ietf.org/tools/rfcdiff/rfcdiff-1.42.tgz | tar -xz +mv rfcdiff-1.42 ${PWD}/tools/rfcdiff +wget -qO - https://github.com/lvc/installer/archive/0.2.tar.gz | tar -xz +mkdir ${PWD}/tools/abi-tracker +make -C installer-0.2 install prefix=${PWD}/tools/abi-tracker target=abi-tracker +rm -rf installer-0.2 +export PATH=${PWD}/tools/rfcdiff:${PWD}/tools/abi-tracker/bin:$PATH +mkdir tracker +cp -f ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json ./tracker/openjpeg.json cd tracker -# Check ABI -export PATH=${PWD}/../tools/rfcdiff:${PWD}/../tools/abi-tracker/bin:$PATH -sed -e "s/@OPJ_SOURCE_DIR@/${OPJ_SOURCE_DIR//\//\\/}/g" ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json > openjpeg.json -abi-monitor -get openjpeg.json -abi-monitor -build openjpeg.json +# Let's create all we need +abi-monitor ${OPJ_LIMIT_ABI_BUILDS} -get openjpeg.json +cp -rf ${OPJ_SOURCE_DIR} src/openjpeg/current +abi-monitor ${OPJ_LIMIT_ABI_BUILDS} -build openjpeg.json abi-tracker -build openjpeg.json + +EXIT_CODE=0 + +# Check API +abi-compliance-checker -l openjpeg -old $(find ./abi_dump/openjpeg/2.1 -name '*.dump') -new $(find ./abi_dump/openjpeg/current -name '*.dump') -header openjpeg.h -api -s || EXIT_CODE=1 + +# Check ABI +abi-compliance-checker -l openjpeg -old $(find ./abi_dump/openjpeg/2.1 -name '*.dump') -new $(find ./abi_dump/openjpeg/current -name '*.dump') -header openjpeg.h -abi -s || EXIT_CODE=1 + +rm -rf src installed + +if [ ${OPJ_UPLOAD_ABI_REPORT} -eq 1 ]; then + echo "TODO: Where to upload the report" +fi + +exit $EXIT_CODE From d2ddf006a6d3c326a4f68a0d37d0c96eda5b386e Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 21:48:33 +0200 Subject: [PATCH 03/50] retrieve & compile wdiff --- .travis.yml | 2 +- tools/travis-ci/abi-check.sh | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1c2f5587..b862832b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ addons: - gcc-mingw-w64 - libelf-dev - elfutils - - wdiff + - texinfo - exuberant-ctags install: diff --git a/tools/travis-ci/abi-check.sh b/tools/travis-ci/abi-check.sh index a5814d37..e3cb281f 100755 --- a/tools/travis-ci/abi-check.sh +++ b/tools/travis-ci/abi-check.sh @@ -31,13 +31,23 @@ mkdir ${HOME}/abi-check cd ${HOME}/abi-check # Let's get tools not available with apt mkdir tools +# Travis doesn't allow package wdiff... +wget -qO - http://mirrors.kernel.org/gnu/wdiff/wdiff-latest.tar.gz | tar -xz +cd wdiff-* +./configure --prefix=${HOME}/abi-check/tools/wdiff +make +make check +make install +cd .. +export PATH=${PWD}/tools/wdiff/bin:$PATH + wget -qO - https://tools.ietf.org/tools/rfcdiff/rfcdiff-1.42.tgz | tar -xz mv rfcdiff-1.42 ${PWD}/tools/rfcdiff +export PATH=${PWD}/tools/rfcdiff:$PATH wget -qO - https://github.com/lvc/installer/archive/0.2.tar.gz | tar -xz mkdir ${PWD}/tools/abi-tracker make -C installer-0.2 install prefix=${PWD}/tools/abi-tracker target=abi-tracker -rm -rf installer-0.2 -export PATH=${PWD}/tools/rfcdiff:${PWD}/tools/abi-tracker/bin:$PATH +export PATH=${PWD}/tools/abi-tracker/bin:$PATH mkdir tracker cp -f ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json ./tracker/openjpeg.json cd tracker From e224dee4b8a5999d5f74ec3be5d686a2e6ff6a37 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 21:52:39 +0200 Subject: [PATCH 04/50] travis debugging --- tools/travis-ci/abi-check.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/travis-ci/abi-check.sh b/tools/travis-ci/abi-check.sh index e3cb281f..cc1a9046 100755 --- a/tools/travis-ci/abi-check.sh +++ b/tools/travis-ci/abi-check.sh @@ -71,5 +71,6 @@ rm -rf src installed if [ ${OPJ_UPLOAD_ABI_REPORT} -eq 1 ]; then echo "TODO: Where to upload the report" fi - +cat build_logs/openjpeg/current/cmake +cmake -version exit $EXIT_CODE From 1a9cb9aef71ced7642140b185026984e2e919dc3 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 22:09:50 +0200 Subject: [PATCH 05/50] Use gcc-4.8 for ABI tracker --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b862832b..a4e66bae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,13 +2,16 @@ language: c os: - linux compiler: - - gcc + - gcc-4.8 env: - OPJ_CI_ABI_CHECK=1 addons: apt: + sources: + - ubuntu-toolchain-r-test packages: + - gcc-4.8 - gcc-multilib - gcc-mingw-w64-base - binutils-mingw-w64-i686 From cba89a62a18367ebccb1354afb884f9a8308f6bd Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 22:20:16 +0200 Subject: [PATCH 06/50] Revert modification made to check incompatibility --- src/lib/openjp2/openjpeg.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib/openjp2/openjpeg.h b/src/lib/openjp2/openjpeg.h index 49aab7c8..c07e9c84 100644 --- a/src/lib/openjp2/openjpeg.h +++ b/src/lib/openjp2/openjpeg.h @@ -677,8 +677,6 @@ typedef struct opj_image { OPJ_BYTE *icc_profile_buf; /** size of ICC profile */ OPJ_UINT32 icc_profile_len; - /** size of ICC profile */ - OPJ_UINT32 icc_profile_len2; } opj_image_t; From a4eade843f18e5687bd0824fd3742c26bb364514 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 22:23:32 +0200 Subject: [PATCH 07/50] disable output for diff build --- tools/travis-ci/abi-check.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/travis-ci/abi-check.sh b/tools/travis-ci/abi-check.sh index cc1a9046..e4e8ce79 100755 --- a/tools/travis-ci/abi-check.sh +++ b/tools/travis-ci/abi-check.sh @@ -34,10 +34,10 @@ mkdir tools # Travis doesn't allow package wdiff... wget -qO - http://mirrors.kernel.org/gnu/wdiff/wdiff-latest.tar.gz | tar -xz cd wdiff-* -./configure --prefix=${HOME}/abi-check/tools/wdiff -make -make check -make install +./configure --prefix=${HOME}/abi-check/tools/wdiff &> /dev/null +make &> /dev/null +make check &> /dev/null +make install &> /dev/null cd .. export PATH=${PWD}/tools/wdiff/bin:$PATH From 5c3632b00e2fc8c13097e7668bb644412d82b645 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 22:24:51 +0200 Subject: [PATCH 08/50] Remove travis debugging --- tools/travis-ci/abi-check.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/travis-ci/abi-check.sh b/tools/travis-ci/abi-check.sh index e4e8ce79..e4766ce0 100755 --- a/tools/travis-ci/abi-check.sh +++ b/tools/travis-ci/abi-check.sh @@ -71,6 +71,4 @@ rm -rf src installed if [ ${OPJ_UPLOAD_ABI_REPORT} -eq 1 ]; then echo "TODO: Where to upload the report" fi -cat build_logs/openjpeg/current/cmake -cmake -version exit $EXIT_CODE From 74f71ec923175af378886ce9fde70c453057e6d8 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 23:00:06 +0200 Subject: [PATCH 09/50] Use matrix --- .travis.yml | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index a4e66bae..8fc6169f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,32 @@ language: c -os: - - linux -compiler: - - gcc-4.8 -env: - - OPJ_CI_ABI_CHECK=1 - + +matrix: + include: + - os: osx + compiler: clang + env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release + - os: linux + compiler: gcc + env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release + - os: linux + compiler: gcc + env: OPJ_CI_ARCH=i386 OPJ_CI_BUILD_CONFIGURATION=Release + - os: linux + compiler: gcc + env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug + - os: linux + compiler: clang + env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_ASAN=1 + - os: linux + compiler: x86_64-w64-mingw32-gcc + env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release + - os: linux + compiler: x86_64-w64-mingw32-gcc + env: OPJ_CI_ARCH=i386 OPJ_CI_BUILD_CONFIGURATION=Release + - os: linux + compiler: gcc-4.8 + env: OPJ_CI_ABI_CHECK=1 + addons: apt: sources: From 87d44603a02f8d522e1e31ba44d40dbbe080d295 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 23:19:23 +0200 Subject: [PATCH 10/50] Update exception list for gcc 4.6.4 --- ...Ubuntu12.04-gcc4.6.4-i386-Release-3rdP.txt | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 tools/travis-ci/knownfailures-Ubuntu12.04-gcc4.6.4-i386-Release-3rdP.txt diff --git a/tools/travis-ci/knownfailures-Ubuntu12.04-gcc4.6.4-i386-Release-3rdP.txt b/tools/travis-ci/knownfailures-Ubuntu12.04-gcc4.6.4-i386-Release-3rdP.txt new file mode 100644 index 00000000..bad45972 --- /dev/null +++ b/tools/travis-ci/knownfailures-Ubuntu12.04-gcc4.6.4-i386-Release-3rdP.txt @@ -0,0 +1,61 @@ +NR-ENC-issue203-32x32-bgr16.bmp-43-compare_dump2base +NR-ENC-issue203-32x32-bgr16.bmp-43-compare_dec-ref-out2base +NR-ENC-issue203-33x33-bgr16.bmp-44-compare_dump2base +NR-ENC-issue203-33x33-bgr16.bmp-44-compare_dec-ref-out2base +NR-ENC-issue203-32x32-bgra16.bmp-45-compare_dump2base +NR-ENC-issue203-33x33-bgra16.bmp-46-compare_dump2base +NR-ENC-issue203-127x64-bgr16.bmp-49-compare_dump2base +NR-ENC-issue203-127x64-bgr16.bmp-49-compare_dec-ref-out2base +NR-DEC-issue104_jpxstream.jp2-33-decode-md5 +NR-DEC-issue226.j2k-74-decode +NR-DEC-issue226.j2k-74-decode-md5 +NR-DEC-p1_06.j2k-156-decode +NR-DEC-p1_06.j2k-156-decode-md5 +NR-DEC-p1_06.j2k-164-decode-md5 +NR-C1P0-p0_04.j2k-compare2base +NR-C1P0-p0_05.j2k-compare2base +NR-C1P0-p0_06.j2k-compare2base +NR-C1P1-p1_02.j2k-compare2base +NR-C1P1-p1_03.j2k-compare2base +NR-C1P1-p1_04.j2k-compare2base +NR-C1P1-p1_05.j2k-compare2base +NR-JP2-file2.jp2-compare2base +NR-JP2-file3.jp2-compare2base +NR-RIC-subsampling_1.jp2-compare2base +NR-RIC-subsampling_2.jp2-compare2base +NR-RIC-zoo1.jp2-compare2base +NR-RIC-zoo2.jp2-compare2base +NR-DEC-_00042.j2k-2-decode-md5 +NR-DEC-buxI.j2k-9-decode-md5 +NR-DEC-CT_Phillips_JPEG2K_Decompr_Problem.j2k-13-decode-md5 +NR-DEC-Marrin.jp2-18-decode-md5 +NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5 +NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5 +NR-DEC-file409752.jp2-40-decode-md5 +NR-DEC-issue188_beach_64bitsbox.jp2-41-decode-md5 +NR-DEC-issue206_image-000.jp2-42-decode-md5 +NR-DEC-issue205.jp2-43-decode-md5 +NR-DEC-issue228.j2k-60-decode-md5 +NR-DEC-issue134.jp2-67-decode-md5 +NR-DEC-issue208.jp2-69-decode-md5 +NR-DEC-issue211.jp2-70-decode-md5 +NR-DEC-issue135.j2k-68-decode-md5 +NR-DEC-issue414.jp2-110-decode-md5 +NR-DEC-p1_04.j2k-124-decode-md5 +NR-DEC-p1_04.j2k-125-decode-md5 +NR-DEC-p1_04.j2k-126-decode-md5 +NR-DEC-p1_04.j2k-127-decode-md5 +NR-DEC-p1_04.j2k-128-decode-md5 +NR-DEC-p1_04.j2k-129-decode-md5 +NR-DEC-p1_04.j2k-131-decode-md5 +NR-DEC-p1_04.j2k-134-decode-md5 +NR-DEC-p1_04.j2k-138-decode-md5 +NR-DEC-p1_04.j2k-140-decode-md5 +NR-DEC-p0_04.j2k-166-decode-md5 +NR-DEC-p0_04.j2k-168-decode-md5 +NR-DEC-p0_04.j2k-172-decode-md5 +NR-DEC-issue205.jp2-253-decode-md5 +NR-DEC-issue559-eci-090-CIELab.jp2-255-decode-md5 +NR-DEC-issue236-ESYCC-CDEF.jp2-254-decode-md5 +NR-DEC-issue559-eci-091-CIELab.jp2-256-decode-md5 +NR-DEC-p1_06.j2k-164-decode From 27102f0b06eea1f9857725528cde1bc9a57695d5 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 23:51:54 +0200 Subject: [PATCH 11/50] Update ABI tools --- tools/abi-tracker/openjpeg.json | 1 + tools/travis-ci/abi-check.sh | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/abi-tracker/openjpeg.json b/tools/abi-tracker/openjpeg.json index 8d83d222..14653472 100644 --- a/tools/abi-tracker/openjpeg.json +++ b/tools/abi-tracker/openjpeg.json @@ -2,6 +2,7 @@ "Name": "openjpeg", "Title": "OpenJPEG", "SourceUrl": "https://github.com/uclouvain/openjpeg/tags", + "Git": "https://github.com/uclouvain/openjpeg.git", "Maintainer": "Antonin D.", "MaintainerUrl": "http://www.openjpeg.org/", "Package": "version.", diff --git a/tools/travis-ci/abi-check.sh b/tools/travis-ci/abi-check.sh index e4766ce0..bffbd6e8 100755 --- a/tools/travis-ci/abi-check.sh +++ b/tools/travis-ci/abi-check.sh @@ -44,16 +44,18 @@ export PATH=${PWD}/tools/wdiff/bin:$PATH wget -qO - https://tools.ietf.org/tools/rfcdiff/rfcdiff-1.42.tgz | tar -xz mv rfcdiff-1.42 ${PWD}/tools/rfcdiff export PATH=${PWD}/tools/rfcdiff:$PATH -wget -qO - https://github.com/lvc/installer/archive/0.2.tar.gz | tar -xz +wget -qO - https://github.com/lvc/installer/archive/0.4.tar.gz | tar -xz mkdir ${PWD}/tools/abi-tracker -make -C installer-0.2 install prefix=${PWD}/tools/abi-tracker target=abi-tracker +make -C installer-0.4 install prefix=${PWD}/tools/abi-tracker target=abi-tracker export PATH=${PWD}/tools/abi-tracker/bin:$PATH + mkdir tracker -cp -f ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json ./tracker/openjpeg.json cd tracker # Let's create all we need +grep -v Git ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json > ./openjpeg.json abi-monitor ${OPJ_LIMIT_ABI_BUILDS} -get openjpeg.json +cp -f ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json ./openjpeg.json cp -rf ${OPJ_SOURCE_DIR} src/openjpeg/current abi-monitor ${OPJ_LIMIT_ABI_BUILDS} -build openjpeg.json abi-tracker -build openjpeg.json From 32ac092decf1108237ec1c24b2149c344b2fb7be Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 00:23:54 +0200 Subject: [PATCH 12/50] Disable ABI check. Keep API check. --- tools/travis-ci/abi-check.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/travis-ci/abi-check.sh b/tools/travis-ci/abi-check.sh index bffbd6e8..1a904d27 100755 --- a/tools/travis-ci/abi-check.sh +++ b/tools/travis-ci/abi-check.sh @@ -66,7 +66,8 @@ EXIT_CODE=0 abi-compliance-checker -l openjpeg -old $(find ./abi_dump/openjpeg/2.1 -name '*.dump') -new $(find ./abi_dump/openjpeg/current -name '*.dump') -header openjpeg.h -api -s || EXIT_CODE=1 # Check ABI -abi-compliance-checker -l openjpeg -old $(find ./abi_dump/openjpeg/2.1 -name '*.dump') -new $(find ./abi_dump/openjpeg/current -name '*.dump') -header openjpeg.h -abi -s || EXIT_CODE=1 +# Disabled for now, problems with symbol visibility... +# abi-compliance-checker -l openjpeg -old $(find ./abi_dump/openjpeg/2.1 -name '*.dump') -new $(find ./abi_dump/openjpeg/current -name '*.dump') -header openjpeg.h -abi -s || EXIT_CODE=1 rm -rf src installed From d05b19072deb750752df1fee627c57cf8d1a66bd Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 14:19:57 +0200 Subject: [PATCH 13/50] Add appveyor support --- tools/travis-ci/install.sh | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index ce85c97f..2def910b 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -2,6 +2,19 @@ # This script executes the install step when running under travis-ci +#if cygwin, check path +case ${MACHTYPE} in + *cygwin*) OPJ_CI_IS_CYGWIN=1;; + *) ;; +esac + +if [ "${OPJ_CI_IS_CYGWIN:-}" == "1" ]; then + if ! which which; then + # PATH is not yet set up + export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin + fi +fi + # Set-up some error handling set -o nounset ## set -u : exit the script if you try to use an uninitialised variable set -o errexit ## set -e : exit the script if any statement returns a non-true return value @@ -36,10 +49,14 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd) # We need test data - if [ "${TRAVIS_BRANCH:-}" == "" ]; then - TRAVIS_BRANCH=$(git -C ${OPJ_SOURCE_DIR} branch | grep '*' | tr -d '*[[:blank:]]') #default to same branch as we're setting up + if [ "${TRAVIS_BRANCH:-}" != "" ]; then + OPJ_DATA_BRANCH=${TRAVIS_BRANCH} + elif [ "${APPVEYOR_REPO_BRANCH:-}" != "" ]; then + OPJ_DATA_BRANCH=${APPVEYOR_REPO_BRANCH} + else + OPJ_DATA_BRANCH=$(git -C ${OPJ_SOURCE_DIR} branch | grep '*' | tr -d '*[[:blank:]]') #default to same branch as we're setting up fi - OPJ_DATA_HAS_BRANCH=$(git ls-remote --heads git://github.com/uclouvain/openjpeg-data.git ${TRAVIS_BRANCH} | wc -l) + OPJ_DATA_HAS_BRANCH=$(git ls-remote --heads git://github.com/uclouvain/openjpeg-data.git ${OPJ_DATA_BRANCH} | wc -l) if [ ${OPJ_DATA_HAS_BRANCH} -ne 0 ]; then OPJ_DATA_BRANCH=${TRAVIS_BRANCH} else @@ -80,6 +97,10 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then install_name_tool -id ${PWD}/libkdu_v77R.dylib libkdu_v77R.dylib install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_compress install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_expand + elif [ "${APPVEYOR:-}" == "True" ]; then + wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Win32_150710.msi_.zip + cmake -E tar -xf KDU77_Demo_Apps_for_Win32_150710.msi_.zip + msiexec /i KDU77_Demo_Apps_for_Win32_150710.msi /quiet /qn /norestart fi fi fi From 62006e2b2655c5ed5fcaaf527e960863db968823 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 14:30:15 +0200 Subject: [PATCH 14/50] which provided by git, try wget --- tools/travis-ci/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index 2def910b..b850bd45 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -9,7 +9,7 @@ case ${MACHTYPE} in esac if [ "${OPJ_CI_IS_CYGWIN:-}" == "1" ]; then - if ! which which; then + if ! which wget; then # PATH is not yet set up export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin fi From d5c460fc5fb8161e524421a71afeda123d068796 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 14:51:30 +0200 Subject: [PATCH 15/50] Download jpylyzer for windows --- tools/travis-ci/install.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index b850bd45..4e6ce69c 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -9,6 +9,7 @@ case ${MACHTYPE} in esac if [ "${OPJ_CI_IS_CYGWIN:-}" == "1" ]; then + # Hack for appveyor if ! which wget; then # PATH is not yet set up export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin @@ -67,9 +68,15 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then # We need jpylyzer for the test suite echo "Retrieving jpylyzer" - wget -qO - https://github.com/openpreserve/jpylyzer/archive/1.14.2.tar.gz | tar -xz - mv jpylyzer-1.14.2 jpylyzer - chmod +x jpylyzer/jpylyzer/jpylyzer.py + if [ "${APPVEYOR:-}" == "True" ]; then + wget -q http://dl.bintray.com/openplanets/opf-windows/jpylyzer_1.14.2_win32.zip + cmake -E tar -xf jpylyzer_1.14.2_win32.zip + mv jpylyzer_1.14.2_win32 jpylyzer + else + wget -qO - https://github.com/openpreserve/jpylyzer/archive/1.14.2.tar.gz | tar -xz + mv jpylyzer-1.14.2/jpylyzer ./ + chmod +x jpylyzer/jpylyzer.py + fi # When OPJ_NONCOMMERCIAL=1, kakadu trial binaries are used for testing. Here's the copyright notice from kakadu: # Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney. From 50b561e91145d11d49d4ce6d45ca0d28651fd2e2 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 14:57:25 +0200 Subject: [PATCH 16/50] Debug wget jpylyzer on appveyor --- tools/travis-ci/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index 4e6ce69c..091fa03d 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -69,7 +69,7 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then # We need jpylyzer for the test suite echo "Retrieving jpylyzer" if [ "${APPVEYOR:-}" == "True" ]; then - wget -q http://dl.bintray.com/openplanets/opf-windows/jpylyzer_1.14.2_win32.zip + wget http://dl.bintray.com/openplanets/opf-windows/jpylyzer_1.14.2_win32.zip cmake -E tar -xf jpylyzer_1.14.2_win32.zip mv jpylyzer_1.14.2_win32 jpylyzer else From d03c4770cb3c9b16dfbcce5141c728c34c2a2495 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 15:08:25 +0200 Subject: [PATCH 17/50] Continue debugging wget jpylyzer --- tools/travis-ci/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index 091fa03d..ff935c0b 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -69,7 +69,7 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then # We need jpylyzer for the test suite echo "Retrieving jpylyzer" if [ "${APPVEYOR:-}" == "True" ]; then - wget http://dl.bintray.com/openplanets/opf-windows/jpylyzer_1.14.2_win32.zip + wget --local-encoding=UTF-8 http://dl.bintray.com/openplanets/opf-windows/jpylyzer_1.14.2_win32.zip cmake -E tar -xf jpylyzer_1.14.2_win32.zip mv jpylyzer_1.14.2_win32 jpylyzer else From 1ed6ede703ba3344a9fef7c8cf0c98024bfc0b44 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 15:14:16 +0200 Subject: [PATCH 18/50] Debug wget jpylyzer --- tools/travis-ci/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index ff935c0b..740299f0 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -71,6 +71,7 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then if [ "${APPVEYOR:-}" == "True" ]; then wget --local-encoding=UTF-8 http://dl.bintray.com/openplanets/opf-windows/jpylyzer_1.14.2_win32.zip cmake -E tar -xf jpylyzer_1.14.2_win32.zip + ls -l . mv jpylyzer_1.14.2_win32 jpylyzer else wget -qO - https://github.com/openpreserve/jpylyzer/archive/1.14.2.tar.gz | tar -xz From d035952c52de3ba924010d2f127016eab518a7e3 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 15:18:12 +0200 Subject: [PATCH 19/50] jpylyzer download --- tools/travis-ci/install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index 740299f0..3b122434 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -69,10 +69,11 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then # We need jpylyzer for the test suite echo "Retrieving jpylyzer" if [ "${APPVEYOR:-}" == "True" ]; then - wget --local-encoding=UTF-8 http://dl.bintray.com/openplanets/opf-windows/jpylyzer_1.14.2_win32.zip - cmake -E tar -xf jpylyzer_1.14.2_win32.zip - ls -l . - mv jpylyzer_1.14.2_win32 jpylyzer + wget --local-encoding=UTF-8 -q http://dl.bintray.com/openplanets/opf-windows/jpylyzer_1.14.2_win32.zip + mkdir jpylyzer + cd jpylyzer + cmake -E tar -xf ../jpylyzer_1.14.2_win32.zip + cd .. else wget -qO - https://github.com/openpreserve/jpylyzer/archive/1.14.2.tar.gz | tar -xz mv jpylyzer-1.14.2/jpylyzer ./ From d92c2b21174e7296e345682ff4d24b51a94afc99 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 16:44:07 +0200 Subject: [PATCH 20/50] Run under appveyor --- tools/travis-ci/run.sh | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index 323b30e1..b08e8001 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -2,6 +2,20 @@ # This script executes the script step when running under travis-ci +#if cygwin, check path +case ${MACHTYPE} in + *cygwin*) OPJ_CI_IS_CYGWIN=1;; + *) ;; +esac + +if [ "${OPJ_CI_IS_CYGWIN:-}" == "1" ]; then + # Hack for appveyor + if ! which wget; then + # PATH is not yet set up + export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin + fi +fi + # Set-up some bash options set -o nounset ## set -u : exit the script if you try to use an uninitialised variable set -o errexit ## set -e : exit the script if any statement returns a non-true return value @@ -42,6 +56,8 @@ if [ "${TRAVIS_OS_NAME:-}" == "" ]; then # default to gcc export CC=gcc fi + elif uname -s | grep -i CYGWIN_NT &> /dev/null; then + TRAVIS_OS_NAME=windows else echo "Failed to guess OS"; exit 1 fi @@ -71,6 +87,9 @@ elif [ "${TRAVIS_OS_NAME}" == "linux" ]; then else echo "Compiler not supported: ${CC}"; exit 1 fi +elif [ "${TRAVIS_OS_NAME}" == "windows" ]; then + OPJ_OS_NAME=windows + OPJ_CC_VERSION=vs2015 else echo "OS not supported: ${TRAVIS_OS_NAME}"; exit 1 fi @@ -85,14 +104,20 @@ if [ "${OPJ_CI_ARCH:-}" == "" ]; then fi if [ "${TRAVIS_BRANCH:-}" == "" ]; then - echo "Guessing branch" - TRAVIS_BRANCH=$(git -C ${OPJ_SOURCE_DIR} branch | grep '*' | tr -d '*[[:blank:]]') #default to master + if [ "${APPVEYOR_REPO_BRANCH:-}" != "" ]; then + TRAVIS_BRANCH=${APPVEYOR_REPO_BRANCH} + else + echo "Guessing branch" + TRAVIS_BRANCH=$(git -C ${OPJ_SOURCE_DIR} branch | grep '*' | tr -d '*[[:blank:]]') + fi fi OPJ_BUILDNAME=${OPJ_OS_NAME}-${OPJ_CC_VERSION}-${OPJ_CI_ARCH}-${TRAVIS_BRANCH} OPJ_BUILDNAME_TEST=${OPJ_OS_NAME}-${OPJ_CC_VERSION}-${OPJ_CI_ARCH} if [ "${TRAVIS_PULL_REQUEST:-}" != "false" ] && [ "${TRAVIS_PULL_REQUEST:-}" != "" ]; then OPJ_BUILDNAME=${OPJ_BUILDNAME}-pr${TRAVIS_PULL_REQUEST} +elif [ "${APPVEYOR_PULL_REQUEST_NUMBER:-}" != "" ]; then + OPJ_BUILDNAME=${OPJ_BUILDNAME}-pr${APPVEYOR_PULL_REQUEST_NUMBER} fi OPJ_BUILDNAME=${OPJ_BUILDNAME}-${OPJ_CI_BUILD_CONFIGURATION}-3rdP OPJ_BUILDNAME_TEST=${OPJ_BUILDNAME_TEST}-${OPJ_CI_BUILD_CONFIGURATION}-3rdP From b816ac185bc3e0706ff3316ca6c8288dae79cd2b Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 16:50:30 +0200 Subject: [PATCH 21/50] change os guessing --- tools/travis-ci/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index b08e8001..45658738 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -56,7 +56,7 @@ if [ "${TRAVIS_OS_NAME:-}" == "" ]; then # default to gcc export CC=gcc fi - elif uname -s | grep -i CYGWIN_NT &> /dev/null; then + elif uname -s | grep -i CYGWIN &> /dev/null; then TRAVIS_OS_NAME=windows else echo "Failed to guess OS"; exit 1 From 9df5546838e12291f7db737e5e6597f17c92cadb Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 17:05:11 +0200 Subject: [PATCH 22/50] Change OS guessing --- tools/travis-ci/run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index 45658738..a783c204 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -58,6 +58,8 @@ if [ "${TRAVIS_OS_NAME:-}" == "" ]; then fi elif uname -s | grep -i CYGWIN &> /dev/null; then TRAVIS_OS_NAME=windows + elif uname -s | grep -i MINGW32 &> /dev/null; then + TRAVIS_OS_NAME=windows else echo "Failed to guess OS"; exit 1 fi From cf6db1641ac2a9be86a99a573dd5866832e7ba80 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 17:12:05 +0200 Subject: [PATCH 23/50] get proper path --- tools/travis-ci/run.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index a783c204..eaa8d45a 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -21,6 +21,15 @@ set -o nounset ## set -u : exit the script if you try to use an uninitialised set -o errexit ## set -e : exit the script if any statement returns a non-true return value set -o pipefail ## Fail on error in pipe +function opjpath () +{ + if [ "${OPJ_CI_IS_CYGWIN:-}" == "1" ]; then + cygpath -m "$1" + else + echo "$1" + fi +} + # ABI check is done by abi-check.sh if [ "${OPJ_CI_ABI_CHECK:-}" == "1" ]; then exit 0 @@ -153,7 +162,7 @@ export OPJ_SOURCE_DIR=${OPJ_SOURCE_DIR} export OPJ_BUILD_CONFIGURATION=${OPJ_CI_BUILD_CONFIGURATION} export OPJ_DO_SUBMIT=${OPJ_DO_SUBMIT} -ctest -S ${OPJ_SOURCE_DIR}/tools/ctest_scripts/travis-ci.cmake -V || true +ctest -S $(opjpath ${OPJ_SOURCE_DIR}/tools/ctest_scripts/travis-ci.cmake) -V || true # ctest will exit with various error codes depending on version. # ignore ctest exit code & parse this ourselves set +x From 8d2019ae73ea646fda7ca91a6a93d88edaee4490 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 17:16:25 +0200 Subject: [PATCH 24/50] Correct source path --- tools/travis-ci/run.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index eaa8d45a..d04d74f9 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -24,9 +24,9 @@ set -o pipefail ## Fail on error in pipe function opjpath () { if [ "${OPJ_CI_IS_CYGWIN:-}" == "1" ]; then - cygpath -m "$1" + cygpath $1 "$2" else - echo "$1" + echo "$2" fi } @@ -158,11 +158,11 @@ cmake --version export OPJ_SITE=${OPJ_SITE} export OPJ_BUILDNAME=${OPJ_BUILDNAME} -export OPJ_SOURCE_DIR=${OPJ_SOURCE_DIR} +export OPJ_SOURCE_DIR=$(opjpath -m ${OPJ_SOURCE_DIR}) export OPJ_BUILD_CONFIGURATION=${OPJ_CI_BUILD_CONFIGURATION} export OPJ_DO_SUBMIT=${OPJ_DO_SUBMIT} -ctest -S $(opjpath ${OPJ_SOURCE_DIR}/tools/ctest_scripts/travis-ci.cmake) -V || true +ctest -S ${OPJ_SOURCE_DIR}/tools/ctest_scripts/travis-ci.cmake -V || true # ctest will exit with various error codes depending on version. # ignore ctest exit code & parse this ourselves set +x @@ -217,11 +217,11 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then awk -F: '{ print $2 }' ${OPJ_FAILEDTEST_LOG} > failures.txt while read FAILEDTEST; do # Start with common errors - if grep -x "${FAILEDTEST}" ${OPJ_SOURCE_DIR}/tools/travis-ci/knownfailures-all.txt > /dev/null; then + if grep -x "${FAILEDTEST}" $(opjpath -u ${OPJ_SOURCE_DIR})/tools/travis-ci/knownfailures-all.txt > /dev/null; then continue fi - if [ -f ${OPJ_SOURCE_DIR}/tools/travis-ci/knownfailures-${OPJ_BUILDNAME_TEST}.txt ]; then - if grep -x "${FAILEDTEST}" ${OPJ_SOURCE_DIR}/tools/travis-ci/knownfailures-${OPJ_BUILDNAME_TEST}.txt > /dev/null; then + if [ -f $(opjpath -u ${OPJ_SOURCE_DIR})/tools/travis-ci/knownfailures-${OPJ_BUILDNAME_TEST}.txt ]; then + if grep -x "${FAILEDTEST}" $(opjpath -u ${OPJ_SOURCE_DIR})/tools/travis-ci/knownfailures-${OPJ_BUILDNAME_TEST}.txt > /dev/null; then continue fi fi From f33f50126cafd95febf7e02fb03a0f55939ba893 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 17:25:50 +0200 Subject: [PATCH 25/50] Add OPJ_BINARY_DIR --- tools/ctest_scripts/travis-ci.cmake | 6 +++++- tools/travis-ci/run.sh | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/ctest_scripts/travis-ci.cmake b/tools/ctest_scripts/travis-ci.cmake index 6d50b3f5..2d96399d 100644 --- a/tools/ctest_scripts/travis-ci.cmake +++ b/tools/ctest_scripts/travis-ci.cmake @@ -7,7 +7,11 @@ cmake_minimum_required(VERSION 2.8) set( ENV{LANG} en_US.UTF-8) -set( CTEST_DASHBOARD_ROOT "$ENV{PWD}/build" ) +if($ENV{OPJ_BINARY_DIR}) + set( CTEST_DASHBOARD_ROOT "$ENV{OPJ_BINARY_DIR}" ) +else + set( CTEST_DASHBOARD_ROOT "$ENV{PWD}/build" ) +endif() set( CTEST_CMAKE_GENERATOR "Unix Makefiles") # Always makefile in travis-ci environment if ("$ENV{OPJ_BUILD_CONFIGURATION}" STREQUAL "") diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index d04d74f9..8b0db273 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -159,13 +159,14 @@ cmake --version export OPJ_SITE=${OPJ_SITE} export OPJ_BUILDNAME=${OPJ_BUILDNAME} export OPJ_SOURCE_DIR=$(opjpath -m ${OPJ_SOURCE_DIR}) +export OPJ_BINARY_DIR=$(opjpath -m ${PWD}/build) export OPJ_BUILD_CONFIGURATION=${OPJ_CI_BUILD_CONFIGURATION} export OPJ_DO_SUBMIT=${OPJ_DO_SUBMIT} ctest -S ${OPJ_SOURCE_DIR}/tools/ctest_scripts/travis-ci.cmake -V || true # ctest will exit with various error codes depending on version. # ignore ctest exit code & parse this ourselves -set +x +#set +x # let's parse configure/build/tests for failure From 4560d270e08add95cd282fe27c1e8f279b8d8b29 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 17:27:49 +0200 Subject: [PATCH 26/50] Correct make script --- tools/ctest_scripts/travis-ci.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ctest_scripts/travis-ci.cmake b/tools/ctest_scripts/travis-ci.cmake index 2d96399d..a95b5a00 100644 --- a/tools/ctest_scripts/travis-ci.cmake +++ b/tools/ctest_scripts/travis-ci.cmake @@ -9,7 +9,7 @@ cmake_minimum_required(VERSION 2.8) set( ENV{LANG} en_US.UTF-8) if($ENV{OPJ_BINARY_DIR}) set( CTEST_DASHBOARD_ROOT "$ENV{OPJ_BINARY_DIR}" ) -else +else() set( CTEST_DASHBOARD_ROOT "$ENV{PWD}/build" ) endif() set( CTEST_CMAKE_GENERATOR "Unix Makefiles") # Always makefile in travis-ci environment From 70a16d80d9ddfeee84e4dd669021d852644a5a57 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 17:31:04 +0200 Subject: [PATCH 27/50] Debug build --- tools/travis-ci/run.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index 8b0db273..ba4e6da3 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -175,6 +175,9 @@ Parsing logs for failures " OPJ_CI_RESULT=0 +ls -l build +ls -l build/Testing + # 1st configure step OPJ_CONFIGURE_XML=$(find build -path 'build/Testing/*' -name 'Configure.xml') if [ ! -f "${OPJ_CONFIGURE_XML}" ]; then From 53d7f70c1591c28a6a0343fd795fbadc6891a0ac Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 17:51:13 +0200 Subject: [PATCH 28/50] remove cygwin specifics --- tools/travis-ci/install.sh | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index 3b122434..0e4c2f83 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -2,20 +2,6 @@ # This script executes the install step when running under travis-ci -#if cygwin, check path -case ${MACHTYPE} in - *cygwin*) OPJ_CI_IS_CYGWIN=1;; - *) ;; -esac - -if [ "${OPJ_CI_IS_CYGWIN:-}" == "1" ]; then - # Hack for appveyor - if ! which wget; then - # PATH is not yet set up - export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin - fi -fi - # Set-up some error handling set -o nounset ## set -u : exit the script if you try to use an uninitialised variable set -o errexit ## set -e : exit the script if any statement returns a non-true return value @@ -69,7 +55,7 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then # We need jpylyzer for the test suite echo "Retrieving jpylyzer" if [ "${APPVEYOR:-}" == "True" ]; then - wget --local-encoding=UTF-8 -q http://dl.bintray.com/openplanets/opf-windows/jpylyzer_1.14.2_win32.zip + curl -o jpylyzer_1.14.2_win32.zip -L http://dl.bintray.com/openplanets/opf-windows/jpylyzer_1.14.2_win32.zip mkdir jpylyzer cd jpylyzer cmake -E tar -xf ../jpylyzer_1.14.2_win32.zip @@ -107,7 +93,7 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_compress install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_expand elif [ "${APPVEYOR:-}" == "True" ]; then - wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Win32_150710.msi_.zip + curl -o KDU77_Demo_Apps_for_Win32_150710.msi_.zip -L http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Win32_150710.msi_.zip cmake -E tar -xf KDU77_Demo_Apps_for_Win32_150710.msi_.zip msiexec /i KDU77_Demo_Apps_for_Win32_150710.msi /quiet /qn /norestart fi From a01f7cdee0a4c93fa5ccae7cb03dba7a1d5065ee Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 18:01:43 +0200 Subject: [PATCH 29/50] debug appveyor --- tools/travis-ci/install.sh | 18 ++++++++++++++++-- tools/travis-ci/run.sh | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index 0e4c2f83..3b122434 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -2,6 +2,20 @@ # This script executes the install step when running under travis-ci +#if cygwin, check path +case ${MACHTYPE} in + *cygwin*) OPJ_CI_IS_CYGWIN=1;; + *) ;; +esac + +if [ "${OPJ_CI_IS_CYGWIN:-}" == "1" ]; then + # Hack for appveyor + if ! which wget; then + # PATH is not yet set up + export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin + fi +fi + # Set-up some error handling set -o nounset ## set -u : exit the script if you try to use an uninitialised variable set -o errexit ## set -e : exit the script if any statement returns a non-true return value @@ -55,7 +69,7 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then # We need jpylyzer for the test suite echo "Retrieving jpylyzer" if [ "${APPVEYOR:-}" == "True" ]; then - curl -o jpylyzer_1.14.2_win32.zip -L http://dl.bintray.com/openplanets/opf-windows/jpylyzer_1.14.2_win32.zip + wget --local-encoding=UTF-8 -q http://dl.bintray.com/openplanets/opf-windows/jpylyzer_1.14.2_win32.zip mkdir jpylyzer cd jpylyzer cmake -E tar -xf ../jpylyzer_1.14.2_win32.zip @@ -93,7 +107,7 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_compress install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_expand elif [ "${APPVEYOR:-}" == "True" ]; then - curl -o KDU77_Demo_Apps_for_Win32_150710.msi_.zip -L http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Win32_150710.msi_.zip + wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Win32_150710.msi_.zip cmake -E tar -xf KDU77_Demo_Apps_for_Win32_150710.msi_.zip msiexec /i KDU77_Demo_Apps_for_Win32_150710.msi /quiet /qn /norestart fi diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index ba4e6da3..39c210ac 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -174,7 +174,7 @@ echo " Parsing logs for failures " OPJ_CI_RESULT=0 - +ls -l . ls -l build ls -l build/Testing From cc9bf1d5576a5180591fc11ffd3c37d20d08f4c2 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 18:15:28 +0200 Subject: [PATCH 30/50] Use make under windows --- tools/ctest_scripts/travis-ci.cmake | 8 +++++++- tools/travis-ci/install.sh | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/ctest_scripts/travis-ci.cmake b/tools/ctest_scripts/travis-ci.cmake index a95b5a00..46aec09d 100644 --- a/tools/ctest_scripts/travis-ci.cmake +++ b/tools/ctest_scripts/travis-ci.cmake @@ -12,7 +12,13 @@ if($ENV{OPJ_BINARY_DIR}) else() set( CTEST_DASHBOARD_ROOT "$ENV{PWD}/build" ) endif() -set( CTEST_CMAKE_GENERATOR "Unix Makefiles") # Always makefile in travis-ci environment + +if("$ENV{TRAVIS_OS_NAME}" STREQUAL "windows") + set( CTEST_CMAKE_GENERATOR "NMake Makefiles") + SET( CTEST_BUILD_COMMAND "nmake" ) +else() + set( CTEST_CMAKE_GENERATOR "Unix Makefiles") # Always makefile in travis-ci environment +endif() if ("$ENV{OPJ_BUILD_CONFIGURATION}" STREQUAL "") set( CTEST_BUILD_CONFIGURATION "Release") diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index 3b122434..4ab46698 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -107,6 +107,7 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_compress install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_expand elif [ "${APPVEYOR:-}" == "True" ]; then + echo "Retrieving Kakadu" wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Win32_150710.msi_.zip cmake -E tar -xf KDU77_Demo_Apps_for_Win32_150710.msi_.zip msiexec /i KDU77_Demo_Apps_for_Win32_150710.msi /quiet /qn /norestart From f0a980ec1642b7a9d53e5cf832cf62a63ae76b5d Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 18:19:09 +0200 Subject: [PATCH 31/50] verbose --- tools/ctest_scripts/travis-ci.cmake | 2 +- tools/travis-ci/run.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ctest_scripts/travis-ci.cmake b/tools/ctest_scripts/travis-ci.cmake index 46aec09d..065b783c 100644 --- a/tools/ctest_scripts/travis-ci.cmake +++ b/tools/ctest_scripts/travis-ci.cmake @@ -15,7 +15,7 @@ endif() if("$ENV{TRAVIS_OS_NAME}" STREQUAL "windows") set( CTEST_CMAKE_GENERATOR "NMake Makefiles") - SET( CTEST_BUILD_COMMAND "nmake" ) + set( CTEST_BUILD_COMMAND "nmake" ) else() set( CTEST_CMAKE_GENERATOR "Unix Makefiles") # Always makefile in travis-ci environment endif() diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index 39c210ac..0c4ae034 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -163,7 +163,7 @@ export OPJ_BINARY_DIR=$(opjpath -m ${PWD}/build) export OPJ_BUILD_CONFIGURATION=${OPJ_CI_BUILD_CONFIGURATION} export OPJ_DO_SUBMIT=${OPJ_DO_SUBMIT} -ctest -S ${OPJ_SOURCE_DIR}/tools/ctest_scripts/travis-ci.cmake -V || true +ctest -S ${OPJ_SOURCE_DIR}/tools/ctest_scripts/travis-ci.cmake -VV || true # ctest will exit with various error codes depending on version. # ignore ctest exit code & parse this ourselves #set +x From 229d9cdb9c31ca5662dea0085c8ce67eb28f9030 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 18:21:42 +0200 Subject: [PATCH 32/50] export TRAVIS_OS_NAME --- tools/travis-ci/run.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index 0c4ae034..8fa42566 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -156,6 +156,7 @@ set -x # travis-ci doesn't dump cmake version in system info, let's print it cmake --version +export TRAVIS_OS_NAME=${TRAVIS_OS_NAME} export OPJ_SITE=${OPJ_SITE} export OPJ_BUILDNAME=${OPJ_BUILDNAME} export OPJ_SOURCE_DIR=$(opjpath -m ${OPJ_SOURCE_DIR}) From d60937922f8dc00ea511ff33c2e3076181b98078 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 18:24:57 +0200 Subject: [PATCH 33/50] correct warnings --- tools/ctest_scripts/travis-ci.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/ctest_scripts/travis-ci.cmake b/tools/ctest_scripts/travis-ci.cmake index 065b783c..53bfbf48 100644 --- a/tools/ctest_scripts/travis-ci.cmake +++ b/tools/ctest_scripts/travis-ci.cmake @@ -18,6 +18,7 @@ if("$ENV{TRAVIS_OS_NAME}" STREQUAL "windows") set( CTEST_BUILD_COMMAND "nmake" ) else() set( CTEST_CMAKE_GENERATOR "Unix Makefiles") # Always makefile in travis-ci environment + set( CCFLAGS_WARNING "-Wall -Wextra -Wconversion -Wno-unused-parameter -Wdeclaration-after-statement") endif() if ("$ENV{OPJ_BUILD_CONFIGURATION}" STREQUAL "") @@ -91,7 +92,7 @@ set( CACHE_CONTENTS " CMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} # Warning level -CMAKE_C_FLAGS:STRING= ${CCFLAGS_ARCH} -Wall -Wextra -Wconversion -Wno-unused-parameter -Wdeclaration-after-statement +CMAKE_C_FLAGS:STRING= ${CCFLAGS_ARCH} ${CCFLAGS_WARNING} # Use to activate the test suite BUILD_TESTING:BOOL=${BUILD_TESTING} From 891e7c298a5f24d15c2ae3e0be8624b2508087d4 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 18:29:37 +0200 Subject: [PATCH 34/50] debug appveyor --- tools/travis-ci/run.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index 8fa42566..09840835 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -175,9 +175,8 @@ echo " Parsing logs for failures " OPJ_CI_RESULT=0 -ls -l . -ls -l build -ls -l build/Testing +which find +find build -path 'build/Testing/*' # 1st configure step OPJ_CONFIGURE_XML=$(find build -path 'build/Testing/*' -name 'Configure.xml') From caeb91121a40200275f2aa9029d5f009fae35b26 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 18:34:21 +0200 Subject: [PATCH 35/50] export updated path --- tools/travis-ci/run.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index 09840835..00487a68 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -15,6 +15,7 @@ if [ "${OPJ_CI_IS_CYGWIN:-}" == "1" ]; then export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin fi fi +export PATH=$(dirname ${BASH}):$PATH # Set-up some bash options set -o nounset ## set -u : exit the script if you try to use an uninitialised variable From 4042210416a592a90b839c68a50a8fd94d0142ce Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 18:39:59 +0200 Subject: [PATCH 36/50] run with appveyor --- tools/travis-ci/run.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index 00487a68..a2633aa0 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -8,13 +8,7 @@ case ${MACHTYPE} in *) ;; esac -if [ "${OPJ_CI_IS_CYGWIN:-}" == "1" ]; then - # Hack for appveyor - if ! which wget; then - # PATH is not yet set up - export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin - fi -fi +# Hack for appveyor to get GNU find in path before windows one. export PATH=$(dirname ${BASH}):$PATH # Set-up some bash options @@ -168,7 +162,7 @@ export OPJ_DO_SUBMIT=${OPJ_DO_SUBMIT} ctest -S ${OPJ_SOURCE_DIR}/tools/ctest_scripts/travis-ci.cmake -VV || true # ctest will exit with various error codes depending on version. # ignore ctest exit code & parse this ourselves -#set +x +set +x # let's parse configure/build/tests for failure @@ -176,8 +170,6 @@ echo " Parsing logs for failures " OPJ_CI_RESULT=0 -which find -find build -path 'build/Testing/*' # 1st configure step OPJ_CONFIGURE_XML=$(find build -path 'build/Testing/*' -name 'Configure.xml') From c3493063b9a497f0ba39acbf38b658d29615ba7c Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 18:45:58 +0200 Subject: [PATCH 37/50] correct OPJ_SITE --- tools/travis-ci/run.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index a2633aa0..6b5a9949 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -45,6 +45,12 @@ if [ "${TRAVIS_REPO_SLUG:-}" != "" ]; then if [ "${OPJ_OWNER}" == "uclouvain" ]; then OPJ_DO_SUBMIT=1 fi +elif [ "${APPVEYOR_REPO_NAME:-}" != "" ]; then + OPJ_OWNER=$(echo "${APPVEYOR_REPO_NAME}" | sed 's/\(^.*\)\/.*/\1/') + OPJ_SITE="${OPJ_OWNER}.appveyor.com" + if [ "${OPJ_OWNER}" == "uclouvain" ]; then + OPJ_DO_SUBMIT=1 + fi else OPJ_SITE="$(hostname)" fi @@ -159,7 +165,7 @@ export OPJ_BINARY_DIR=$(opjpath -m ${PWD}/build) export OPJ_BUILD_CONFIGURATION=${OPJ_CI_BUILD_CONFIGURATION} export OPJ_DO_SUBMIT=${OPJ_DO_SUBMIT} -ctest -S ${OPJ_SOURCE_DIR}/tools/ctest_scripts/travis-ci.cmake -VV || true +ctest -S ${OPJ_SOURCE_DIR}/tools/ctest_scripts/travis-ci.cmake -V || true # ctest will exit with various error codes depending on version. # ignore ctest exit code & parse this ourselves set +x From 99c4376aed52426c865d2382afdee56f304a1e37 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 18:58:26 +0200 Subject: [PATCH 38/50] kdb copy --- tools/ctest_scripts/travis-ci.cmake | 4 +++- tools/travis-ci/install.sh | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/ctest_scripts/travis-ci.cmake b/tools/ctest_scripts/travis-ci.cmake index 53bfbf48..8dc94f57 100644 --- a/tools/ctest_scripts/travis-ci.cmake +++ b/tools/ctest_scripts/travis-ci.cmake @@ -16,9 +16,11 @@ endif() if("$ENV{TRAVIS_OS_NAME}" STREQUAL "windows") set( CTEST_CMAKE_GENERATOR "NMake Makefiles") set( CTEST_BUILD_COMMAND "nmake" ) + set( JPYLYZER_EXT "exe" ) else() set( CTEST_CMAKE_GENERATOR "Unix Makefiles") # Always makefile in travis-ci environment set( CCFLAGS_WARNING "-Wall -Wextra -Wconversion -Wno-unused-parameter -Wdeclaration-after-statement") + set( JPYLYZER_EXT "py" ) endif() if ("$ENV{OPJ_BUILD_CONFIGURATION}" STREQUAL "") @@ -104,7 +106,7 @@ BUILD_THIRDPARTY:BOOL=TRUE OPJ_DATA_ROOT:PATH=$ENV{PWD}/data # jpylyzer is available with on GitHub: https://github.com/openpreserve/jpylyzer -JPYLYZER_EXECUTABLE=$ENV{PWD}/jpylyzer/jpylyzer/jpylyzer.py +JPYLYZER_EXECUTABLE=$ENV{PWD}/jpylyzer/jpylyzer.${JPYLYZER_EXT} " ) diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index 4ab46698..8806ac60 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -64,7 +64,7 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then OPJ_DATA_BRANCH=master #default to master fi echo "Cloning openjpeg-data from ${OPJ_DATA_BRANCH} branch" - git clone --depth=1 --branch=${OPJ_DATA_BRANCH} git://github.com/uclouvain/openjpeg-data.git data + #git clone --depth=1 --branch=${OPJ_DATA_BRANCH} git://github.com/uclouvain/openjpeg-data.git data # We need jpylyzer for the test suite echo "Retrieving jpylyzer" @@ -111,6 +111,7 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Win32_150710.msi_.zip cmake -E tar -xf KDU77_Demo_Apps_for_Win32_150710.msi_.zip msiexec /i KDU77_Demo_Apps_for_Win32_150710.msi /quiet /qn /norestart + cp -r "C:/Program Files \(x86\)/Kakadu" ./kdu fi fi fi From 30a0180d84f751637b8a41525fd4d66633c6f41f Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 19:02:35 +0200 Subject: [PATCH 39/50] correct kdu copy --- tools/travis-ci/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index 8806ac60..12c0954c 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -111,7 +111,7 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Win32_150710.msi_.zip cmake -E tar -xf KDU77_Demo_Apps_for_Win32_150710.msi_.zip msiexec /i KDU77_Demo_Apps_for_Win32_150710.msi /quiet /qn /norestart - cp -r "C:/Program Files \(x86\)/Kakadu" ./kdu + cp -r "C:/Program Files (x86)/Kakadu" ./kdu fi fi fi From 2c8ba10cc9f4748962491d22cbdba7927b4ee845 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 19:15:52 +0200 Subject: [PATCH 40/50] update script --- tools/ctest_scripts/travis-ci.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/ctest_scripts/travis-ci.cmake b/tools/ctest_scripts/travis-ci.cmake index 8dc94f57..f8b23ada 100644 --- a/tools/ctest_scripts/travis-ci.cmake +++ b/tools/ctest_scripts/travis-ci.cmake @@ -79,8 +79,12 @@ if(NOT "$ENV{OPJ_CI_SKIP_TESTS}" STREQUAL "1") # Note: Binaries can only be used for non-commercial purposes. if ("$ENV{OPJ_NONCOMMERCIAL}" STREQUAL "1" ) set(KDUPATH $ENV{PWD}/kdu) - set(ENV{LD_LIBRARY_PATH} ${KDUPATH}) - set(ENV{PATH} $ENV{PATH}:${KDUPATH}) + if("$ENV{TRAVIS_OS_NAME}" STREQUAL "windows") + set(ENV{PATH} "$ENV{PATH};${KDUPATH}") + else() + set(ENV{LD_LIBRARY_PATH} ${KDUPATH}) + set(ENV{PATH} $ENV{PATH}:${KDUPATH}) + endif() endif() set(BUILD_TESTING "TRUE") else() From 101a0034e2b8fe1621a3a94b4606d1d30f85ecd0 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 19:20:50 +0200 Subject: [PATCH 41/50] Re-enable cloning data --- tools/travis-ci/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index 12c0954c..6a0b1fc4 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -64,7 +64,7 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then OPJ_DATA_BRANCH=master #default to master fi echo "Cloning openjpeg-data from ${OPJ_DATA_BRANCH} branch" - #git clone --depth=1 --branch=${OPJ_DATA_BRANCH} git://github.com/uclouvain/openjpeg-data.git data + git clone --depth=1 --branch=${OPJ_DATA_BRANCH} git://github.com/uclouvain/openjpeg-data.git data # We need jpylyzer for the test suite echo "Retrieving jpylyzer" From c5a8732b0eb6c1124df2e9d488d4f0311f65c455 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 19:26:42 +0200 Subject: [PATCH 42/50] Update kdu copy --- tools/travis-ci/install.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index 6a0b1fc4..7a419e45 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -9,11 +9,8 @@ case ${MACHTYPE} in esac if [ "${OPJ_CI_IS_CYGWIN:-}" == "1" ]; then - # Hack for appveyor - if ! which wget; then - # PATH is not yet set up - export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin - fi + # PATH is not yet set up + export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin fi # Set-up some error handling @@ -111,7 +108,11 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Win32_150710.msi_.zip cmake -E tar -xf KDU77_Demo_Apps_for_Win32_150710.msi_.zip msiexec /i KDU77_Demo_Apps_for_Win32_150710.msi /quiet /qn /norestart - cp -r "C:/Program Files (x86)/Kakadu" ./kdu + if [ -d "C:/Program Files/Kakadu" ]; then + cp -r "C:/Program Files/Kakadu" ./kdu + else + cp -r "C:/Program Files (x86)/Kakadu" ./kdu + endif fi fi fi From 7a7901cd6db6a056de0a74207f915e2a974b890a Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 19:29:53 +0200 Subject: [PATCH 43/50] Correct script --- tools/travis-ci/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index 7a419e45..c7e45ff9 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -112,7 +112,7 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then cp -r "C:/Program Files/Kakadu" ./kdu else cp -r "C:/Program Files (x86)/Kakadu" ./kdu - endif + fi fi fi fi From 813121e6889aaa64b74e08275b65b8d712871591 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 20:01:03 +0200 Subject: [PATCH 44/50] Add exceptions --- tools/travis-ci/knownfailures-windows-vs2015-x64.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tools/travis-ci/knownfailures-windows-vs2015-x64.txt diff --git a/tools/travis-ci/knownfailures-windows-vs2015-x64.txt b/tools/travis-ci/knownfailures-windows-vs2015-x64.txt new file mode 100644 index 00000000..c0f64cc0 --- /dev/null +++ b/tools/travis-ci/knownfailures-windows-vs2015-x64.txt @@ -0,0 +1,3 @@ +NR-ENC-Bretagne2.ppm-7-compare_dec-ref-out2base +NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5 +NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5 From 11a27e6d208b79238646da356c1273fbc815c319 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 23:43:50 +0200 Subject: [PATCH 45/50] Correct exceptions --- ...-x64.txt => knownfailures-windows-vs2015-x64-Release-3rdP.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tools/travis-ci/{knownfailures-windows-vs2015-x64.txt => knownfailures-windows-vs2015-x64-Release-3rdP.txt} (100%) diff --git a/tools/travis-ci/knownfailures-windows-vs2015-x64.txt b/tools/travis-ci/knownfailures-windows-vs2015-x64-Release-3rdP.txt similarity index 100% rename from tools/travis-ci/knownfailures-windows-vs2015-x64.txt rename to tools/travis-ci/knownfailures-windows-vs2015-x64-Release-3rdP.txt From 0f1b1c63b44d67eb63ad350a3e814b4ff22b1964 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 11 Oct 2015 13:47:44 +0200 Subject: [PATCH 46/50] Add exceptions --- .../knownfailures-windows-vs2015-x86-Release-3rdP.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tools/travis-ci/knownfailures-windows-vs2015-x86-Release-3rdP.txt diff --git a/tools/travis-ci/knownfailures-windows-vs2015-x86-Release-3rdP.txt b/tools/travis-ci/knownfailures-windows-vs2015-x86-Release-3rdP.txt new file mode 100644 index 00000000..c0f64cc0 --- /dev/null +++ b/tools/travis-ci/knownfailures-windows-vs2015-x86-Release-3rdP.txt @@ -0,0 +1,3 @@ +NR-ENC-Bretagne2.ppm-7-compare_dec-ref-out2base +NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5 +NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5 From d02bf257a654f3a8fdcafbb33640e993f48ed177 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 11 Oct 2015 17:10:48 +0200 Subject: [PATCH 47/50] Find out Visual Studio version --- tools/travis-ci/run.sh | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index 6b5a9949..7d6bd141 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -68,7 +68,7 @@ if [ "${TRAVIS_OS_NAME:-}" == "" ]; then fi elif uname -s | grep -i CYGWIN &> /dev/null; then TRAVIS_OS_NAME=windows - elif uname -s | grep -i MINGW32 &> /dev/null; then + elif uname -s | grep -i MINGW &> /dev/null; then TRAVIS_OS_NAME=windows else echo "Failed to guess OS"; exit 1 @@ -101,7 +101,24 @@ elif [ "${TRAVIS_OS_NAME}" == "linux" ]; then fi elif [ "${TRAVIS_OS_NAME}" == "windows" ]; then OPJ_OS_NAME=windows - OPJ_CC_VERSION=vs2015 + if which cl > /dev/null; then + OPJ_CL_VERSION=$(cl 2>&1 | grep Version | sed 's/.*Version \([0-9]*\).*/\1/') + if [ ${OPJ_CL_VERSION} -eq 19 ]; then + OPJ_CC_VERSION=vs2015 + elif [ ${OPJ_CL_VERSION} -eq 18 ]; then + OPJ_CC_VERSION=vs2013 + elif [ ${OPJ_CL_VERSION} -eq 17 ]; then + OPJ_CC_VERSION=vs2012 + elif [ ${OPJ_CL_VERSION} -eq 16 ]; then + OPJ_CC_VERSION=vs2010 + elif [ ${OPJ_CL_VERSION} -eq 15 ]; then + OPJ_CC_VERSION=vs2008 + elif [ ${OPJ_CL_VERSION} -eq 14 ]; then + OPJ_CC_VERSION=vs2005 + else + OPJ_CC_VERSION=vs???? + fi + fi else echo "OS not supported: ${TRAVIS_OS_NAME}"; exit 1 fi From dac03fd1683b4f51982d134ea172748d0bc9ae15 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 11 Oct 2015 17:33:40 +0200 Subject: [PATCH 48/50] Add exceptions --- ...ilures-windows-vs2010-x86-Release-3rdP.txt | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 tools/travis-ci/knownfailures-windows-vs2010-x86-Release-3rdP.txt diff --git a/tools/travis-ci/knownfailures-windows-vs2010-x86-Release-3rdP.txt b/tools/travis-ci/knownfailures-windows-vs2010-x86-Release-3rdP.txt new file mode 100644 index 00000000..70b6d98a --- /dev/null +++ b/tools/travis-ci/knownfailures-windows-vs2010-x86-Release-3rdP.txt @@ -0,0 +1,44 @@ +NR-C1P0-p0_04.j2k-compare2base +NR-C1P0-p0_05.j2k-compare2base +NR-C1P0-p0_06.j2k-compare2base +NR-C1P1-p1_02.j2k-compare2base +NR-C1P1-p1_03.j2k-compare2base +NR-C1P1-p1_04.j2k-compare2base +NR-C1P1-p1_05.j2k-compare2base +NR-RIC-subsampling_1.jp2-compare2base +NR-RIC-subsampling_2.jp2-compare2base +NR-RIC-zoo1.jp2-compare2base +NR-RIC-zoo2.jp2-compare2base +NR-ENC-Bretagne2.ppm-7-compare_dec-ref-out2base +NR-DEC-_00042.j2k-2-decode-md5 +NR-DEC-buxI.j2k-9-decode-md5 +NR-DEC-CT_Phillips_JPEG2K_Decompr_Problem.j2k-13-decode-md5 +NR-DEC-Marrin.jp2-18-decode-md5 +NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5 +NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5 +NR-DEC-file409752.jp2-40-decode-md5 +NR-DEC-issue188_beach_64bitsbox.jp2-41-decode-md5 +NR-DEC-issue206_image-000.jp2-42-decode-md5 +NR-DEC-issue205.jp2-43-decode-md5 +NR-DEC-issue228.j2k-60-decode-md5 +NR-DEC-issue134.jp2-67-decode-md5 +NR-DEC-issue208.jp2-69-decode-md5 +NR-DEC-issue211.jp2-70-decode-md5 +NR-DEC-issue414.jp2-110-decode-md5 +NR-DEC-p1_04.j2k-124-decode-md5 +NR-DEC-p1_04.j2k-125-decode-md5 +NR-DEC-p1_04.j2k-126-decode-md5 +NR-DEC-p1_04.j2k-127-decode-md5 +NR-DEC-p1_04.j2k-128-decode-md5 +NR-DEC-p1_04.j2k-129-decode-md5 +NR-DEC-p1_04.j2k-131-decode-md5 +NR-DEC-p1_04.j2k-134-decode-md5 +NR-DEC-p1_04.j2k-138-decode-md5 +NR-DEC-p1_04.j2k-140-decode-md5 +NR-DEC-p0_04.j2k-166-decode-md5 +NR-DEC-p0_04.j2k-168-decode-md5 +NR-DEC-p0_04.j2k-172-decode-md5 +NR-DEC-issue205.jp2-253-decode-md5 +NR-DEC-issue236-ESYCC-CDEF.jp2-254-decode-md5 +NR-DEC-issue559-eci-090-CIELab.jp2-255-decode-md5 +NR-DEC-issue559-eci-091-CIELab.jp2-256-decode-md5 From 0cd240e2e3b1e676c5bf02463141fb13ffd45973 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 11 Oct 2015 17:59:54 +0200 Subject: [PATCH 49/50] Add appveyor.yml --- appveyor.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..255f4b83 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,26 @@ +version: 2.1.1.{build} +branches: + except: + - coverity_scan +skip_tags: true +clone_depth: 50 +environment: + OPJ_NONCOMMERCIAL: 1 + OPJ_CI_SKIP_TESTS: 0 + OPJ_DO_SUBMIT: 1 + matrix: + - OPJ_CI_ARCH: x86 + OPJ_CI_VSCOMNTOOLS: $(VS140COMNTOOLS) + - OPJ_CI_ARCH: x64 + OPJ_CI_VSCOMNTOOLS: $(VS140COMNTOOLS) + - OPJ_CI_ARCH: x86 + OPJ_CI_VSCOMNTOOLS: $(VS100COMNTOOLS) +install: +- cmd: c:\cygwin\bin\bash ./tools/travis-ci/install.sh +build_script: +- cmd: >- + "%OPJ_CI_VSCOMNTOOLS%..\..\VC\vcvarsall.bat" %OPJ_CI_ARCH% + + bash ./tools/travis-ci/run.sh +test: off +deploy: off From 522d13af2ae120fbddfb63886100810fcd26b1bd Mon Sep 17 00:00:00 2001 From: mayeut Date: Mon, 12 Oct 2015 21:29:16 +0200 Subject: [PATCH 50/50] Update ci install script --- tools/travis-ci/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index c7e45ff9..ca5280ed 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -103,7 +103,7 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then install_name_tool -id ${PWD}/libkdu_v77R.dylib libkdu_v77R.dylib install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_compress install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_expand - elif [ "${APPVEYOR:-}" == "True" ]; then + elif [ "${APPVEYOR:-}" == "True" ] || uname -s | grep -i MINGW &> /dev/null || uname -s | grep -i CYGWIN &> /dev/null; then echo "Retrieving Kakadu" wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Win32_150710.msi_.zip cmake -E tar -xf KDU77_Demo_Apps_for_Win32_150710.msi_.zip