Skip to content

Commit

Permalink
travis osx build
Browse files Browse the repository at this point in the history
• use `pwd`/opt for building libs
• make sure compiler toolchains know these whereabouts
• fixes sustrik#23
• addresses sustrik#12

Signed-off-by: Bent Cardan <[email protected]>
  • Loading branch information
reqshark committed Jan 2, 2017
1 parent 73999d7 commit 089ae56
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@ language: c
sudo: false

os:
- osx
- linux

sudo: required

compiler:
- gcc
- clang

env:
matrix:
- CONF="shared"
Expand All @@ -31,12 +26,22 @@ branches:
only:
- master

before_install:
- '[ `type -P brew` ] && brew install openssl --force || ``'
- export opt=`pwd`/opt
- export {PKG_CONFIG_PATH=$opt/lib/pkgconfig,LD_RUN_PATH=$opt/lib,LD_LIBRARY_PATH=$opt/lib,CFLAGS=-I$opt/include,LDFLAGS=-L$opt/lib}
- git clone --depth 1 https://github.com/sustrik/libdill && cd libdill && ./autogen.sh
- '[ $CONF == "static" ] && ./configure --disable-shared --prefix=$opt || ./configure --prefix=$opt'
- make && make install && cd $opt/lib
- '[ `type -P brew` ] && for i in $(ls /usr/local/Cellar/openssl/1.0.2j/lib/lib*); do ln -s $i; done || ``'
- cd $opt/include
- '[ `type -P brew` ] && ln -s /usr/local/Cellar/openssl/1.0.2j/include/openssl || ``'
- cd ../.. && ./autogen.sh

install:
- wget http://libdill.org/libdill-1.1.tar.gz
- tar -xzf libdill-1.1.tar.gz
- pushd libdill-1.1 && ./configure --prefix=/usr && make && sudo make install && popd
- if [[ $CONF == "shared" ]]; then ./autogen.sh && ./configure --enable-tls && make; fi
- if [[ $CONF == "static" ]]; then ./autogen.sh && ./configure --enable-tls --disable-shared && make; fi
- if [[ $CONF == "shared" ]]; then ./configure --prefix=$opt --enable-tls; fi
- if [[ $CONF == "static" ]]; then ./configure --prefix=$opt --disable-shared --enable-tls; fi
- make

script:
- make check
Expand Down

0 comments on commit 089ae56

Please sign in to comment.