summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.travis-functions.sh58
-rw-r--r--.travis.yml4
2 files changed, 58 insertions, 4 deletions
diff --git a/.travis-functions.sh b/.travis-functions.sh
index e4318d6a6..3e16d09a8 100755
--- a/.travis-functions.sh
+++ b/.travis-functions.sh
@@ -19,7 +19,7 @@ export TS_OPT_parsable="yes"
function xconfigure
{
- ./configure "$@"
+ ./configure "$@" $OSX_CONFOPTS
err=$?
if [ "$DUMP_CONFIG_LOG" = "short" ]; then
grep -B1 -A10000 "^## Output variables" config.log | grep -v "_FALSE="
@@ -35,12 +35,13 @@ function check_nonroot
xconfigure \
--disable-use-tty-group \
- --with-python \
--enable-all-programs \
- --enable-gtk-doc \
|| return
$MAKE || return
+
+ osx_prepare_check
$MAKE check TS_OPTS="$opts" || return
+
$MAKE install DESTDIR=/tmp/dest || return
}
@@ -49,12 +50,14 @@ function check_root
local opts="$MAKE_CHECK_OPTS --parallel=1"
xconfigure \
- --with-python \
--enable-all-programs \
|| return
$MAKE || return
+
$MAKE check TS_COMMAND="true" || return
+ osx_prepare_check
sudo -E $MAKE check TS_OPTS="$opts" || return
+
sudo $MAKE install || return
}
@@ -67,6 +70,11 @@ function check_dist
function travis_install_script
{
+ if [ "$TRAVIS_OS_NAME" = "osx" ]; then
+ osx_install_script
+ return
+ fi
+
# install some packages from Ubuntu's default sources
sudo apt-get -qq update || return
sudo apt-get install -qq >/dev/null \
@@ -89,6 +97,48 @@ function travis_install_script
|| true
}
+function osx_install_script
+{
+ brew update >/dev/null
+ brew tap homebrew/dupes
+
+ brew install gettext ncurses socat xz
+ brew link --force gettext
+ brew link --force ncurses
+
+ OSX_CONFOPTS="
+ --disable-runuser \
+ --disable-su \
+ --disable-login \
+ --disable-last \
+ --disable-utmpdump \
+ --disable-agetty \
+ --disable-wall \
+ --disable-ipcrm \
+ --disable-ipcs \
+ --disable-write \
+ "
+}
+
+function osx_prepare_check
+{
+ [ "$TRAVIS_OS_NAME" = "osx" ] || return 0
+
+ # these ones only need to be gnu for our test-suite
+ brew install coreutils findutils gnu-tar gnu-sed
+
+ # symlink minimally needed gnu commands into PATH
+ mkdir ~/bin
+ for cmd in md5sum readlink seq truncate find xargs tar sed; do
+ ln -s /usr/local/bin/g$cmd $HOME/bin/$cmd
+ done
+ hash -r
+
+ export TS_OPT_col_multibyte_known_fail=yes
+ export TS_OPT_colcrt_regressions_known_fail=yes
+ export TS_OPT_column_invalid_multibyte_known_fail=yes
+}
+
function travis_before_script
{
set -o xtrace
diff --git a/.travis.yml b/.travis.yml
index 545b915d7..598b5f13d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,6 +21,10 @@ matrix:
dist: precise
compiler: gcc
env: PRECISE="yes" MAKE_CHECK="root"
+ - os: osx
+ osx_image: xcode7.3
+ compiler: clang
+ env: MAKE_CHECK="nonroot"
branches:
only: