set -ex
-# Install a 32-bit compiler for linux
-sudo apt-get update
-sudo apt-get install gcc-multilib
-target=unknown-linux-gnu
+if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
+ target=apple-darwin
+else
+ # Install a 32-bit compiler for linux
+ sudo apt-get update
+ sudo apt-get install gcc-multilib
+ target=unknown-linux-gnu
+fi
# Install both 64 and 32 bit libraries. Apparently travis barfs if you try to
# just install the right ones? This should enable cross compilation in the
lib/rustlib/manifest.in)
sudo ./rust-nightly-x86_64-$target/install.sh
+export RUSTC="rustc --target=${ARCH}-${target}"
+
+set +ex
+
language: rust
install:
- - ./.travis.install.deps.sh
+ - . ./.travis.install.deps.sh
script:
- make CC="$CC" RUSTC="$RUSTC" -j4
- make CC="$CC" RUSTC="$RUSTC" test -j4
env:
- - ARCH=i686 CC='cc -m32' RUSTC='rustc --target=i686-unknown-linux-gnu'
- - ARCH=x86_64 CC=cc RUSTC='rustc --target=x86_64-unknown-linux-gnu'
+ - ARCH=i686 CC='cc -m32'
+ - ARCH=x86_64 CC=cc
os:
- linux