Get travis working on OSX

This commit is contained in:
Alex Crichton 2014-06-19 15:27:12 -07:00
parent fce9983203
commit 608133376a
2 changed files with 15 additions and 7 deletions

View File

@ -1,9 +1,13 @@
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
@ -19,3 +23,7 @@ cp -r rust-nightly-i686-$target/lib/rustlib/i686-$target \
lib/rustlib/manifest.in)
sudo ./rust-nightly-x86_64-$target/install.sh
export RUSTC="rustc --target=${ARCH}-${target}"
set +ex

View File

@ -1,15 +1,15 @@
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