Commit c3caf38895252b82febb76c6bb323c67a4e01929

Anthony Green 2016-09-04T09:21:18

Update travis to test linux 32/64 and osx with a mix of gcc and clang

diff --git a/.travis.yml b/.travis.yml
index 8a63980..8e32d3d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,22 +1,24 @@
 language: cpp
+os:
+  - linux
+  - osx
 compiler:
   - gcc
   - clang
-env:
-  - HOST=i386-pc-linux-gnu
 matrix:
-  exclude:
-    - compiler: clang
+  include:
+    - os: linux
+      compiler: gcc
       env: HOST=i386-pc-linux-gnu
 
-before_script:
-  - sudo apt-get update
-  - sudo apt-get install dejagnu texinfo
-  - if [ "$HOST" = i386-pc-linux-gnu ] ; then sudo apt-get install gcc-multilib g++-multilib && CC="$CC -m32" && CXX="$CXX -m32" ; fi
+install:
+  - ./.travis/install.sh
 
 script:
   - ./autogen.sh
+  - if test x"$HOST" = x"i386-pc-linux-gnu"; then CC="$CC -m32"; CXX="$CXX -m32"; fi
   - ./configure ${HOST+--host=$HOST}
   - make
   - make dist
   - make check
+  - cat */testsuite/libffi.log
diff --git a/.travis/install.sh b/.travis/install.sh
new file mode 100644
index 0000000..67b5104
--- /dev/null
+++ b/.travis/install.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+if [[ $TRAVIS_OS_NAME != 'linux' ]]; then
+  brew update
+  # fix an issue with libtool on travis by reinstalling it
+  brew uninstall libtool;
+  brew install libtool dejagnu;
+else
+  sudo apt-get update
+  sudo apt-get install dejagnu texinfo
+  if [ "$HOST" = i386-pc-linux-gnu ] ; then
+      sudo apt-get install gcc-multilib g++-multilib;
+  fi
+fi