Skip to content

Commit

Permalink
Backported travis config
Browse files Browse the repository at this point in the history
  • Loading branch information
D4N committed Oct 18, 2017
1 parent 2d957cc commit 5c34a55
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 31 deletions.
48 changes: 17 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
- 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
12 changes: 12 additions & 0 deletions .travis/install.sh
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions .travis/run.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5c34a55

Please sign in to comment.