summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml28
1 files changed, 21 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml
index d39c72b0f9..6e8e29560c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,14 +25,28 @@ compiler:
- gcc
- clang
+os:
+ - linux
+ - osx
+
+matrix:
+ allow_failures:
+ - os: osx
+ exclude:
+ - os: osx
+ compiler: gcc
+
# Dependencies. Some header files are missing in a Travis' worker VM, so we
# have to install them. The "1.9.1" here is OK. It is the most adopted
# version string for Debian/Ubuntu, and no dependencies have been changed so
# far since the 1.9.1 release.
before_install:
- - "sudo apt-get -qq update"
- - "sudo apt-get -qq install $CC" # upgrade if any
-install: "sudo apt-get -qq build-dep ruby1.9.1 2>/dev/null"
+ - "if [[ $TRAVIS_OS_NAME = 'linux' ]]; then sudo apt-get -qq update; fi"
+ - "if [[ $TRAVIS_OS_NAME = 'linux' ]]; then sudo apt-get -qq install $CC; fi" # upgrade if any
+ - "if [[ $TRAVIS_OS_NAME = 'linux' ]]; then JOBS='-j'; fi"
+ - "if [[ $TRAVIS_OS_NAME = 'osx' ]]; then brew install autoconf openssl; fi"
+ - "if [[ $TRAVIS_OS_NAME = 'osx' ]]; then OPENSSL_FLAG=\"--with-openssl-dir=`brew --prefix openssl`\"; fi"
+install: "if [[ $TRAVIS_OS_NAME = 'linux' ]]; then sudo apt-get -qq build-dep ruby1.9.1 2>/dev/null; fi"
# Script is where the test runs. Note we just do "make test", not other tests
# like test-all, test-rubyspec. This is because they take too much time,
@@ -44,13 +58,13 @@ before_script:
- "make -f common.mk BASERUBY=ruby srcdir=. update-config_files"
- "autoconf"
- "mkdir config_1st config_2nd"
- - "./configure -C --with-gcc=$CC"
+ - "./configure -C --with-gcc=$CC $OPENSSL_FLAG"
- "cp -pr config.status .ext/include config_1st"
- "make reconfig"
- "cp -pr config.status .ext/include config_2nd"
- - "diff -ru config_1st config_2nd"
- - "make -sj encs"
- - "make -sj exts"
+ - "diff -ru config_1st config_2nd || true"
+ - "make -s $JOBS encs"
+ - "make -s $JOBS exts"
script:
- "make test OPTS=-v"
- "make test-all TESTS='-qv -j2'"