ABI Check
This commit is contained in:
parent
1b2ebfc69a
commit
a7ae153a46
|
@ -2,7 +2,6 @@
|
||||||
"Name": "openjpeg",
|
"Name": "openjpeg",
|
||||||
"Title": "OpenJPEG",
|
"Title": "OpenJPEG",
|
||||||
"SourceUrl": "https://github.com/uclouvain/openjpeg/tags",
|
"SourceUrl": "https://github.com/uclouvain/openjpeg/tags",
|
||||||
"Git": "https://github.com/uclouvain/openjpeg.git",
|
|
||||||
"Maintainer": "Antonin D.",
|
"Maintainer": "Antonin D.",
|
||||||
"MaintainerUrl": "http://www.openjpeg.org/",
|
"MaintainerUrl": "http://www.openjpeg.org/",
|
||||||
"Package": "version.",
|
"Package": "version.",
|
||||||
|
@ -11,7 +10,7 @@
|
||||||
{
|
{
|
||||||
"Number": "current",
|
"Number": "current",
|
||||||
"Installed": "installed/openjpeg/current",
|
"Installed": "installed/openjpeg/current",
|
||||||
"Source": "@OPJ_SRC_DIR@",
|
"Source": "src/openjpeg/current",
|
||||||
"Changelog": "On",
|
"Changelog": "On",
|
||||||
"HeadersDiff": "On",
|
"HeadersDiff": "On",
|
||||||
"PkgDiff": "Off",
|
"PkgDiff": "Off",
|
||||||
|
|
|
@ -13,33 +13,53 @@ if [ "${OPJ_CI_ABI_CHECK:-}" != "1" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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)
|
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
|
cd ${HOME}/abi-check
|
||||||
|
# Let's get tools not available with apt
|
||||||
if [ ! -f ${HOME}/abi-check/.restored ]; then
|
mkdir tools
|
||||||
# Clean all if .restored is not present
|
wget -qO - https://tools.ietf.org/tools/rfcdiff/rfcdiff-1.42.tgz | tar -xz
|
||||||
touch not.empty
|
mv rfcdiff-1.42 ${PWD}/tools/rfcdiff
|
||||||
rm -rf ./*
|
wget -qO - https://github.com/lvc/installer/archive/0.2.tar.gz | tar -xz
|
||||||
# Let's get tools not available with apt
|
mkdir ${PWD}/tools/abi-tracker
|
||||||
mkdir tools
|
make -C installer-0.2 install prefix=${PWD}/tools/abi-tracker target=abi-tracker
|
||||||
wget -qO - https://tools.ietf.org/tools/rfcdiff/rfcdiff-1.42.tgz | tar -xz
|
rm -rf installer-0.2
|
||||||
mv rfcdiff-1.42 ${PWD}/tools/rfcdiff
|
export PATH=${PWD}/tools/rfcdiff:${PWD}/tools/abi-tracker/bin:$PATH
|
||||||
wget -qO - https://github.com/lvc/installer/archive/0.2.tar.gz | tar -xz
|
mkdir tracker
|
||||||
mkdir ${PWD}/tools/abi-tracker
|
cp -f ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json ./tracker/openjpeg.json
|
||||||
make -C installer-0.2 install prefix=${PWD}/tools/abi-tracker target=abi-tracker
|
|
||||||
mkdir tracker
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd tracker
|
cd tracker
|
||||||
|
|
||||||
# Check ABI
|
# Let's create all we need
|
||||||
export PATH=${PWD}/../tools/rfcdiff:${PWD}/../tools/abi-tracker/bin:$PATH
|
abi-monitor ${OPJ_LIMIT_ABI_BUILDS} -get openjpeg.json
|
||||||
sed -e "s/@OPJ_SOURCE_DIR@/${OPJ_SOURCE_DIR//\//\\/}/g" ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json > openjpeg.json
|
cp -rf ${OPJ_SOURCE_DIR} src/openjpeg/current
|
||||||
abi-monitor -get openjpeg.json
|
abi-monitor ${OPJ_LIMIT_ABI_BUILDS} -build openjpeg.json
|
||||||
abi-monitor -build openjpeg.json
|
|
||||||
abi-tracker -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
|
||||||
|
|
Loading…
Reference in New Issue