Travis mingw
[openjpeg.git] / .travis.yml
index b63aeffcd2fb2d1b6db94b69f0f3fe15ce5cdeb9..ebcbd7a32d32caece598b9e7f9d10849087b602c 100644 (file)
@@ -1,29 +1,44 @@
 language: c
+os:
+  - linux
+#  - osx
 compiler:
-  - gcc
+#  - 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
+  
+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: 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
+    - os: osx
+      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_ASAN=1
+  
+addons:
+  apt:
+    packages:
+      - 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
 
-before_install:
-  - cmake --version
-  - git clone --depth=1 --branch=master git://github.com/uclouvain/openjpeg-data.git data
-  - wget -qO - https://github.com/openpreserve/jpylyzer/archive/1.14.2.tar.gz | tar -xvz
-# 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 echo -e "Testing will use Kakadu trial binaries. Here's the copyright notice from kakadu:\nCopyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney.\nYou are free to trial these executables and even to re-distribute them,\nso long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain.\nNote: Binaries can only be used for non-commercial purposes.\n"; fi
-  - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip; fi
 install:
-  - chmod +x jpylyzer-1.14.2/jpylyzer/jpylyzer.py
-  - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then cmake -E tar -xf KDU77_Demo_Apps_for_Linux-x86-64_150710.zip; fi
-  - export LD_LIBRARY_PATH=${PWD}/KDU77_Demo_Apps_for_Linux-x86-64_150710:${LD_LIBRARY_PATH}
-  - export PATH=${PWD}/KDU77_Demo_Apps_for_Linux-x86-64_150710:${PATH}
+  - ./tools/travis-ci/install.sh
 
 script:
-    - mkdir build
-    - cd build
-    - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_CODEC=ON -DBUILD_THIRDPARTY=ON -DBUILD_TESTING=ON -DOPJ_DATA_ROOT=${PWD}/../data -DJPYLYZER_EXECUTABLE=${PWD}/../jpylyzer-1.14.2/jpylyzer/jpylyzer.py -DSITE=travis-ci.org -DBUILDNAME=${TRAVIS_OS_NAME}-${CC}$(${CC} -dumpversion)-x86_64-${TRAVIS_BRANCH}$( [[ "${TRAVIS_PULL_REQUEST}" != "false" ]] && echo "-pr${TRAVIS_PULL_REQUEST}" )-Release-3rdP ..
-    - ctest -D ExperimentalStart
-    - ctest -D ExperimentalBuild -V
-    - ctest -D ExperimentalTest -j2 || true
-    - ctest -D ExperimentalSubmit || true
+  - ./tools/travis-ci/run.sh