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:
- 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
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;
--- /dev/null
+{
+ "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"
+ }]
+}
--- /dev/null
+#!/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
trap exit_handler EXIT
trap exit ERR
-# We don't need anything for coverity scan builds
-
-if [ "${COVERITY_SCAN_BRANCH:-}" != "1" ]; then
+# 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 [ "${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
+fi
- if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then
+if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then
- OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd)
+ 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 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
+ # 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
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
OPJ_CI_RESULT=1
fi
fi
-
-
fi
exit ${OPJ_CI_RESULT}