From 5c34a55d2e47436b50becca1bf6e5cc96a620203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Wed, 18 Oct 2017 00:21:39 +0200 Subject: [PATCH] Backported travis config --- .travis.yml | 48 ++++++++++++++++------------------------------ .travis/install.sh | 12 ++++++++++++ .travis/run.sh | 13 +++++++++++++ 3 files changed, 42 insertions(+), 31 deletions(-) create mode 100755 .travis/install.sh create mode 100755 .travis/run.sh diff --git a/.travis.yml b/.travis.yml index 8af0ea6d8d..f8059ccff5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,40 +1,26 @@ language: cpp -sudo: false +sudo: required -addons: - apt: - packages: - - cmake - - zlib1g-dev - - libssh-dev - - libssh - - libcurl4-openssl-dev - - gettext - sources: - - kalakris-cmake - compiler: - gcc - clang -before_install: - - echo $LANG - - echo $LC_ALL - - if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install libssh curl; fi - - rvm use $RVM --install --binary --fuzzy - - gem update --system -# - gem --version - -script: - - cmake -DCMAKE_INSTALL_PREFIX=..\dist -EXIV2_ENABLE_NLS=ON -DEXIV2_ENABLE_CURL=OFF -DEXIV2_ENABLE_SSH=OFF . - - cmake --build . && cmake --build . --target install - - cmake -DCMAKE_INSTALL_PREFIX=..\dist2 -EXIV2_ENABLE_NLS=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_ENABLE_SSH=ON -DEXIV2_ENABLE_WEBREADY=ON . - - cmake --build . && cmake --build . --target install - -notifications: - email: false - os: - linux - - osx \ No newline at end of file + - osx + +matrix: + exclude: + - os: osx + compiler: gcc + +env: + #- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release" # Default + #- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF" # Default (Debug mode + static libs) + - CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DEXIV2_ENABLE_VIDEO=ON -DEXIV2_ENABLE_WEBREADY=ON" # All enabled + #- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DEXIV2_ENABLE_XMP=OFF -DEXIV2_ENABLE_NLS=OFF -DEXIV2_ENABLE_LENSDATA=OFF" # All disabled + #- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=OFF -DEXIV2_ENABLE_SSH=OFF" # WebReady without SSH nor CURL + +install: ./.travis/install.sh +script: ./.travis/run.sh diff --git a/.travis/install.sh b/.travis/install.sh new file mode 100755 index 0000000000..d05c6e3f92 --- /dev/null +++ b/.travis/install.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -e # Enables cheking of return values from each command +set -x # Prints every command + +if [[ "$(uname -s)" == 'Linux' ]]; then + sudo apt-get install cmake zlib1g-dev libssh-dev gettext expat libcurl4-openssl-dev + sudo pip install virtualenv +else + brew update + brew install gettext libssh cmake expat zlib curl + # By default it already has cmake 3.6.2 +fi diff --git a/.travis/run.sh b/.travis/run.sh new file mode 100755 index 0000000000..c5b0327691 --- /dev/null +++ b/.travis/run.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e +set -x + +mkdir build && cd build +cmake ${CMAKE_OPTIONS} .. +cmake -DCMAKE_INSTALL_PREFIX=install .. +make -j 2 +make tests +make install +cd test +make test