language: rust
rust:
  - nightly
  - beta
  - stable
sudo: 9000
dist: trusty
os:
  - linux
  - osx
osx_image: xcode9.3

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
      - llvm-toolchain-trusty-5.0
    packages:
      - autoconf2.13
      - g++-6
      - clang-5.0

env:
  - FEATURES=""
  - FEATURES="--features debugmozjs"

before_script:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CC=gcc-6; export CXX=g++-6; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew install autoconf@2.13 ccache yasm; fi

script:
  - ccache -z
  - CCACHE=$(which ccache) travis_wait cargo build --verbose $FEATURES
  - CCACHE=$(which ccache) RUST_BACKTRACE=1 cargo test --verbose $FEATURES
  - ccache -s

notifications:
  webhooks: http://build.servo.org:54856/travis

cache: ccache

language: rust
rust:
  - nightly
  - beta
  - stable
sudo: 9000
dist: trusty
os:
  - linux
  - osx
osx_image: xcode9.3

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
      - llvm-toolchain-trusty-5.0
    packages:
      - autoconf2.13
      - g++-6
      - clang-5.0

env:
  - FEATURES=""
  - FEATURES="--features debugmozjs"

before_script:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CC=gcc-6; export CXX=g++-6; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew install autoconf@2.13 ccache llvm yasm; fi

script:
  - ccache -z
  - CCACHE=$(which ccache) travis_wait cargo build --verbose $FEATURES
  - CCACHE=$(which ccache) RUST_BACKTRACE=1 cargo test --verbose $FEATURES
  - ccache -s

notifications:
  webhooks: http://build.servo.org:54856/travis

cache: ccache

Install LLVM on macOS CI
Install LLVM on macOS CI

Work around:

```
error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
```
