2014-02-22 10:29:21 -07:00
|
|
|
language: c
|
2014-11-27 07:10:36 -07:00
|
|
|
os:
|
|
|
|
- linux
|
2014-04-22 10:40:19 -07:00
|
|
|
env:
|
2014-05-31 07:19:14 -07:00
|
|
|
global:
|
2014-11-27 07:10:36 -07:00
|
|
|
- CI_SCRIPTS=$TRAVIS_BUILD_DIR/.ci
|
|
|
|
# Travis reports back that it has 32-cores via /proc/cpuinfo, but it's not
|
|
|
|
# what we really have available. According to their documentation, it only has
|
|
|
|
# 1.5 virtual cores.
|
|
|
|
# See
|
|
|
|
# http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM
|
|
|
|
# for more information.
|
|
|
|
- MAKE_CMD="make -j2"
|
|
|
|
# Force verification of DLOG macros.
|
|
|
|
- CFLAGS='-DMIN_LOG_LEVEL=0'
|
2014-05-31 07:19:14 -07:00
|
|
|
matrix:
|
2014-08-07 05:07:26 -07:00
|
|
|
- CI_TARGET=clang-asan
|
2014-09-29 05:43:52 -07:00
|
|
|
- CI_TARGET=gcc
|
|
|
|
- CI_TARGET=gcc-32
|
2014-08-07 05:07:26 -07:00
|
|
|
- CI_TARGET=clint
|
2014-11-27 07:10:36 -07:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: osx
|
|
|
|
env: CI_TARGET=clang-asan
|
|
|
|
- os: osx
|
|
|
|
env: CI_TARGET=gcc
|
|
|
|
compiler: gcc-4.9
|
|
|
|
allow_failures:
|
|
|
|
- os: osx
|
2014-07-16 10:35:12 -07:00
|
|
|
before_install:
|
2014-11-27 07:10:36 -07:00
|
|
|
# Pins the version of the java package installed on the Travis VMs
|
|
|
|
# and avoids a lengthy upgrade process for them.
|
|
|
|
- if [ $TRAVIS_OS_NAME = linux ]; then
|
|
|
|
sudo apt-mark hold oracle-java7-installer oracle-java8-installer;
|
|
|
|
sudo apt-get update;
|
|
|
|
elif [ $TRAVIS_OS_NAME = osx ]; then
|
|
|
|
brew update;
|
|
|
|
fi
|
|
|
|
install:
|
|
|
|
- if [ $TRAVIS_OS_NAME = linux ]; then
|
|
|
|
sudo apt-get install xclip gdb;
|
|
|
|
fi
|
|
|
|
before_script:
|
2014-07-16 10:35:12 -07:00
|
|
|
# Adds user to a dummy group.
|
|
|
|
# That allows to test changing the group of the file by `os_fchown`.
|
2014-10-23 06:40:52 -07:00
|
|
|
# Need xvfb for running some tests with xclip
|
2014-11-27 07:10:36 -07:00
|
|
|
- if [ $TRAVIS_OS_NAME = linux ]; then
|
|
|
|
sudo groupadd chown_test;
|
|
|
|
sudo usermod -a -G chown_test $USER;
|
|
|
|
export DISPLAY=:99.0;
|
|
|
|
sh -e /etc/init.d/xvfb start;
|
|
|
|
elif [ $TRAVIS_OS_NAME = osx ]; then
|
|
|
|
sudo dscl . -create /Groups/chown_test;
|
|
|
|
sudo dscl . -append /Groups/chown_test GroupMembership $USER;
|
|
|
|
fi
|
2014-03-13 08:11:03 -07:00
|
|
|
script:
|
2014-07-16 10:35:12 -07:00
|
|
|
# This will pass the environment variables down to a bash process which runs
|
|
|
|
# as $USER, while retaining the environment variables defined and belonging
|
|
|
|
# to secondary groups given above in usermod.
|
2014-11-27 07:10:36 -07:00
|
|
|
- sudo -E su $USER -c "ulimit -c 102400; sh -e \"$CI_SCRIPTS/$CI_TARGET.sh\""
|