Skip to content

Re-enable OSX builds on Travis CI #464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ addons:

os:
- linux
- osx

rust:
- stable
Expand Down
15 changes: 14 additions & 1 deletion ci/before_install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
set -e
pushd ~

# Workaround for Travis CI macOS bug (https://github.com/travis-ci/travis-ci/issues/6307)
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
rvm get head || true
fi

function llvm_version_triple() {
if [ "$1" == "3.8" ]; then
echo "3.8.0"
Expand All @@ -18,9 +23,17 @@ function llvm_download() {
tar -xf ${LLVM}.tar.xz -C llvm --strip-components=1

export LLVM_CONFIG_PATH=`pwd`/llvm/bin/llvm-config
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
cp llvm/lib/libclang.dylib /usr/local/lib/libclang.dylib
fi
}

llvm_download linux-gnu-ubuntu-14.04

if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
llvm_download linux-gnu-ubuntu-14.04
else
llvm_download apple-darwin
fi

popd
set +e