Add ABI tracker

This commit is contained in:
mayeut 2015-10-08 20:06:59 +02:00
parent 3ea4486bed
commit 1b2ebfc69a
6 changed files with 245 additions and 87 deletions

View File

@ -1,38 +1,10 @@
language: c language: c
os: os:
- linux - linux
- osx
compiler: compiler:
- gcc - gcc
- clang
- x86_64-w64-mingw32-gcc
env: env:
- OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release - OPJ_CI_ABI_CHECK=1
- 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
addons: addons:
apt: apt:
@ -44,9 +16,14 @@ addons:
- gcc-mingw-w64-i686 - gcc-mingw-w64-i686
- gcc-mingw-w64-x86-64 - gcc-mingw-w64-x86-64
- gcc-mingw-w64 - gcc-mingw-w64
- libelf-dev
- elfutils
- wdiff
- exuberant-ctags
install: install:
- ./tools/travis-ci/install.sh - ./tools/travis-ci/install.sh
script: script:
- ./tools/travis-ci/run.sh - ./tools/travis-ci/run.sh
- ./tools/travis-ci/abi-check.sh

View File

@ -677,6 +677,8 @@ typedef struct opj_image {
OPJ_BYTE *icc_profile_buf; OPJ_BYTE *icc_profile_buf;
/** size of ICC profile */ /** size of ICC profile */
OPJ_UINT32 icc_profile_len; OPJ_UINT32 icc_profile_len;
/** size of ICC profile */
OPJ_UINT32 icc_profile_len2;
} opj_image_t; } opj_image_t;

View File

@ -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"
}]
}

45
tools/travis-ci/abi-check.sh Executable file
View File

@ -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

View File

@ -19,67 +19,67 @@ function exit_handler ()
trap exit_handler EXIT trap exit_handler EXIT
trap exit ERR 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 if [ "${OPJ_CI_SKIP_TESTS:-}" != "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 OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd)
# copy to a directory that will not changed every version
mv cmake-3.3.1-Linux-x86_64 cmake-install # 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 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) # 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.
# We need test data # You are free to trial these executables and even to re-distribute them,
if [ "${TRAVIS_BRANCH:-}" == "" ]; then # so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain.
TRAVIS_BRANCH=$(git -C ${OPJ_SOURCE_DIR} branch | grep '*' | tr -d '*[[:blank:]]') #default to same branch as we're setting up # Note: Binaries can only be used for non-commercial purposes.
fi if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then
OPJ_DATA_HAS_BRANCH=$(git ls-remote --heads git://github.com/uclouvain/openjpeg-data.git ${TRAVIS_BRANCH} | wc -l) if [ "${TRAVIS_OS_NAME:-}" == "linux" ] || uname -s | grep -i Linux &> /dev/null; then
if [ ${OPJ_DATA_HAS_BRANCH} -ne 0 ]; then echo "Retrieving Kakadu"
OPJ_DATA_BRANCH=${TRAVIS_BRANCH} wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip
else cmake -E tar -xf KDU77_Demo_Apps_for_Linux-x86-64_150710.zip
OPJ_DATA_BRANCH=master #default to master mv KDU77_Demo_Apps_for_Linux-x86-64_150710 kdu
fi elif [ "${TRAVIS_OS_NAME:-}" == "osx" ] || uname -s | grep -i Darwin &> /dev/null; then
echo "Cloning openjpeg-data from ${OPJ_DATA_BRANCH} branch" echo "Retrieving Kakadu"
git clone --depth=1 --branch=${OPJ_DATA_BRANCH} git://github.com/uclouvain/openjpeg-data.git data 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
# We need jpylyzer for the test suite wget -q http://downloads.sourceforge.net/project/catacombae/HFSExplorer/0.23/hfsexplorer-0.23-bin.zip
echo "Retrieving jpylyzer" mkdir hfsexplorer && cmake -E chdir hfsexplorer tar -xf ../hfsexplorer-0.23-bin.zip
wget -qO - https://github.com/openpreserve/jpylyzer/archive/1.14.2.tar.gz | tar -xz ./hfsexplorer/bin/unhfs.sh -o ./ -fsroot Kakadu-demo-apps.pkg KDU77_Demo_Apps_for_OSX109_150710.dmg
mv jpylyzer-1.14.2 jpylyzer pkgutil --expand Kakadu-demo-apps.pkg ./kdu
chmod +x jpylyzer/jpylyzer/jpylyzer.py cd kdu
cat libkduv77r.pkg/Payload | gzip -d | cpio -id
# When OPJ_NONCOMMERCIAL=1, kakadu trial binaries are used for testing. Here's the copyright notice from kakadu: cat kduexpand.pkg/Payload | gzip -d | cpio -id
# Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney. cat kducompress.pkg/Payload | gzip -d | cpio -id
# You are free to trial these executables and even to re-distribute them, install_name_tool -id ${PWD}/libkdu_v77R.dylib libkdu_v77R.dylib
# so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain. install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_compress
# Note: Binaries can only be used for non-commercial purposes. install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_expand
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
fi fi
fi fi

View File

@ -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 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 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 # Set-up some variables
if [ "${OPJ_CI_BUILD_CONFIGURATION:-}" == "" ]; then if [ "${OPJ_CI_BUILD_CONFIGURATION:-}" == "" ]; then
export OPJ_CI_BUILD_CONFIGURATION=Release #default export OPJ_CI_BUILD_CONFIGURATION=Release #default
@ -207,8 +212,6 @@ New/unknown test failure found!!!
OPJ_CI_RESULT=1 OPJ_CI_RESULT=1
fi fi
fi fi
fi fi
exit ${OPJ_CI_RESULT} exit ${OPJ_CI_RESULT}