Enable container-based build

Remove use of "sudo", build and install in local directory in order
to enable container-based CI builds
This commit is contained in:
Luca Boccassi 2015-08-17 01:26:35 +01:00
parent 7f45c052c4
commit e39517c9f5

View File

@ -6,13 +6,23 @@ os:
- linux - linux
- osx - osx
sudo: false
env:
global:
- BUILD_PREFIX=$PWD/tmp
- CFLAGS=-I${BUILD_PREFIX}/include
- CPPFLAGS=-I${BUILD_PREFIX}/include
- CXXFLAGS=-I${BUILD_PREFIX}/include
- LDFLAGS=-L${BUILD_PREFIX}/lib
- PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig
# Build required projects first # Build required projects first
before_script: before_script:
- mkdir tmp
# libsodium # libsodium
- git clone git://github.com/jedisct1/libsodium.git - git clone git://github.com/jedisct1/libsodium.git
- ( cd libsodium; ./autogen.sh; ./configure; make check; sudo make install; - ( cd libsodium; ./autogen.sh; ./configure --prefix=${BUILD_PREFIX}; make check; make install )
if [ $TRAVIS_OS_NAME != "osx" ] ; then sudo ldconfig ; fi )
# ZMQ stress tests need more open socket (files) than the usual default # ZMQ stress tests need more open socket (files) than the usual default
# On OSX, it seems the way to set the max files limit is constantly changing, so # On OSX, it seems the way to set the max files limit is constantly changing, so
@ -21,5 +31,5 @@ before_script:
# Build and check this project # Build and check this project
script: script:
- ./autogen.sh && ./configure && make && make check - ./autogen.sh && ./configure --prefix=${BUILD_PREFIX} && make && make check
- sudo make install - make install