Commit c0cc5fdaa237b67e86f22d2f6e13f3b42d9aae33

Anthony Green 2014-03-16T07:57:59

Merge pull request #89 from joshtriplett/travis32 .travis.yml: Test on both 32-bit and 64-bit

diff --git a/.travis.yml b/.travis.yml
index c321813..5d8b048 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,7 +2,16 @@ language: c
 compiler:
   - gcc
   - clang
+env:
+  - build32=false
+  - build32=true
+matrix:
+  exclude:
+    - compiler: clang
+      env: build32=true
 
-before_script: sudo apt-get install dejagnu texinfo
+before_script:
+  - sudo apt-get install dejagnu texinfo
+  - if $build32 ; then sudo apt-get install gcc-multilib g++-multilib ; fi
 
-script: ./autogen.sh && ./configure && make && make check
+script: run= && if $build32 ; then run=i386 && mkdir path32 && PATH="$(pwd)/path32:$PATH" && printf '#!/bin/sh\nexec /usr/bin/'"$CC"' -m32 "$@"' > "path32/$CC" && chmod a+x "path32/$CC" ; fi && ./autogen.sh && $run ./configure && make && make check