language: rust
rust:
- stable
- beta
- nightly
notifications:
  email:
  - mitchell.nordine@gmail.com
os:
- osx
- linux
before_script:
- rustc --version
- cargo --version
- rustup component add rustfmt
- if [ "$TRAVIS_OS_NAME" = linux ]; then rustup target add x86_64-apple-darwin; fi
script:
- if [ "$TRAVIS_OS_NAME" = linux ]; then curl -sL https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.13.sdk.tar.xz | tar -Jxf -; export COREAUDIO_SDK_PATH="$PWD/MacOSX10.13.sdk"; fi
- cargo build --verbose --target=x86_64-apple-darwin
- if [ "$TRAVIS_OS_NAME" = osx ]; then cargo test --verbose; fi

language: rust
rust:
- stable
- beta
- nightly
notifications:
  email:
  - mitchell.nordine@gmail.com
os:
- osx
- linux
before_script:
- rustc --version
- cargo --version
- rustup component add rustfmt
- if [ "$TRAVIS_OS_NAME" = linux ]; then rustup target add x86_64-apple-darwin; fi
script:
- if [ "$TRAVIS_OS_NAME" = linux ]; then curl -sL https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.13.sdk.tar.xz | tar -Jxf -; export COREAUDIO_SDK_PATH="$PWD/MacOSX10.13.sdk"; fi
- RUSTFMT=rustfmt cargo build --verbose --target=x86_64-apple-darwin
- if [ "$TRAVIS_OS_NAME" = osx ]; then RUSTFMT=rustfmt cargo test --verbose; fi

Set RUSTFMT env var so that we can find rustfmt
Set RUSTFMT env var so that we can find rustfmt

The crates.io release of bindgen requires users to specify
rustfmt either through the API or through env vars.

The next release of bindgen will just use rustfmt from PATH
due to: https://github.com/rust-lang/rust-bindgen/pull/1629
