Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Appveyor #627

Merged
merged 51 commits into from
Oct 13, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
1b2ebfc
Add ABI tracker
mayeut Oct 8, 2015
a7ae153
ABI Check
mayeut Oct 9, 2015
d2ddf00
retrieve & compile wdiff
mayeut Oct 9, 2015
e224dee
travis debugging
mayeut Oct 9, 2015
1a9cb9a
Use gcc-4.8 for ABI tracker
mayeut Oct 9, 2015
4123c0b
Merge branch 'master' into travis-abi
mayeut Oct 9, 2015
cba89a6
Revert modification made to check incompatibility
mayeut Oct 9, 2015
a4eade8
disable output for diff build
mayeut Oct 9, 2015
5c3632b
Remove travis debugging
mayeut Oct 9, 2015
74f71ec
Use matrix
mayeut Oct 9, 2015
87d4460
Update exception list for gcc 4.6.4
mayeut Oct 9, 2015
27102f0
Update ABI tools
mayeut Oct 9, 2015
32ac092
Disable ABI check. Keep API check.
mayeut Oct 9, 2015
d05b190
Add appveyor support
mayeut Oct 10, 2015
62006e2
which provided by git, try wget
mayeut Oct 10, 2015
d5c460f
Download jpylyzer for windows
mayeut Oct 10, 2015
50b561e
Debug wget jpylyzer on appveyor
mayeut Oct 10, 2015
d03c477
Continue debugging wget jpylyzer
mayeut Oct 10, 2015
1ed6ede
Debug wget jpylyzer
mayeut Oct 10, 2015
d035952
jpylyzer download
mayeut Oct 10, 2015
d92c2b2
Run under appveyor
mayeut Oct 10, 2015
b816ac1
change os guessing
mayeut Oct 10, 2015
9df5546
Change OS guessing
mayeut Oct 10, 2015
cf6db16
get proper path
mayeut Oct 10, 2015
8d2019a
Correct source path
mayeut Oct 10, 2015
f33f501
Add OPJ_BINARY_DIR
mayeut Oct 10, 2015
4560d27
Correct make script
mayeut Oct 10, 2015
70a16d8
Debug build
mayeut Oct 10, 2015
53d7f70
remove cygwin specifics
mayeut Oct 10, 2015
a01f7cd
debug appveyor
mayeut Oct 10, 2015
cc9bf1d
Use make under windows
mayeut Oct 10, 2015
f0a980e
verbose
mayeut Oct 10, 2015
229d9cd
export TRAVIS_OS_NAME
mayeut Oct 10, 2015
d609379
correct warnings
mayeut Oct 10, 2015
891e7c2
debug appveyor
mayeut Oct 10, 2015
caeb911
export updated path
mayeut Oct 10, 2015
4042210
run with appveyor
mayeut Oct 10, 2015
c349306
correct OPJ_SITE
mayeut Oct 10, 2015
99c4376
kdb copy
mayeut Oct 10, 2015
30a0180
correct kdu copy
mayeut Oct 10, 2015
2c8ba10
update script
mayeut Oct 10, 2015
101a003
Re-enable cloning data
mayeut Oct 10, 2015
c5a8732
Update kdu copy
mayeut Oct 10, 2015
7a7901c
Correct script
mayeut Oct 10, 2015
813121e
Add exceptions
mayeut Oct 10, 2015
11a27e6
Correct exceptions
mayeut Oct 10, 2015
0f1b1c6
Add exceptions
mayeut Oct 11, 2015
d02bf25
Find out Visual Studio version
mayeut Oct 11, 2015
dac03fd
Add exceptions
mayeut Oct 11, 2015
0cd240e
Add appveyor.yml
mayeut Oct 11, 2015
522d13a
Update ci install script
mayeut Oct 12, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 28 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,53 @@
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:
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
- os: osx
compiler: x86_64-w64-mingw32-gcc
- compiler: clang
env: OPJ_CI_ARCH=i386 OPJ_CI_BUILD_CONFIGURATION=Release
- compiler: clang
- 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=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

- 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:
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- gcc-multilib
- gcc-mingw-w64-base
- binutils-mingw-w64-i686
- binutils-mingw-w64-x86-64
- gcc-mingw-w64-i686
- gcc-mingw-w64-x86-64
- gcc-mingw-w64
- libelf-dev
- elfutils
- texinfo
- exuberant-ctags

install:
- ./tools/travis-ci/install.sh

script:
- ./tools/travis-ci/run.sh
- ./tools/travis-ci/abi-check.sh
26 changes: 26 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -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
131 changes: 131 additions & 0 deletions tools/abi-tracker/openjpeg.json
Original file line number Diff line number Diff line change
@@ -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": "src/openjpeg/current",
"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"
}]
}
29 changes: 23 additions & 6 deletions tools/ctest_scripts/travis-ci.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,21 @@
cmake_minimum_required(VERSION 2.8)

set( ENV{LANG} en_US.UTF-8)
set( CTEST_DASHBOARD_ROOT "$ENV{PWD}/build" )
set( CTEST_CMAKE_GENERATOR "Unix Makefiles") # Always makefile in travis-ci environment
if($ENV{OPJ_BINARY_DIR})
set( CTEST_DASHBOARD_ROOT "$ENV{OPJ_BINARY_DIR}" )
else()
set( CTEST_DASHBOARD_ROOT "$ENV{PWD}/build" )
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 "")
set( CTEST_BUILD_CONFIGURATION "Release")
Expand Down Expand Up @@ -66,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()
Expand All @@ -81,7 +98,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}
Expand All @@ -93,7 +110,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}

" )

Expand Down
77 changes: 77 additions & 0 deletions tools/travis-ci/abi-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/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_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)


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 &> /dev/null
make &> /dev/null
make check &> /dev/null
make install &> /dev/null
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.4.tar.gz | tar -xz
mkdir ${PWD}/tools/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
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

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

if [ ${OPJ_UPLOAD_ABI_REPORT} -eq 1 ]; then
echo "TODO: Where to upload the report"
fi
exit $EXIT_CODE
Loading