Skip to content

Commit

Permalink
travis: Try to build Mac binaries without OpenSSL (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
emk committed Oct 22, 2016
1 parent a98ea45 commit 19b1df8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 22 deletions.
33 changes: 13 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,36 @@ cache:
- "$TRAVIS_BUILD_DIR/target"
- "$HOME/Library/Python/2.7"
sudo: required
os:
- linux
- osx
rust:
- stable
matrix:
include:
- os: linux
rust: stable
- os: linux
rust: beta
- os: linux
rust: nightly
# We get an extra `--features unstable` from travis-cargo.
env: "FEATURE_OPTS=--no-default-features"
- os: osx
rust: stable
# Disable OpenSSL on MacOS X, because the binaries aren't really
# portable between machines. Also we want to test this config anyway.
env: "FEATURE_OPTS=--no-default-features --features default_minimal"
services:
- docker
before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update &&
brew outdated openssl || brew upgrade openssl &&
export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include &&
export OPENSSL_LIB_DIR=`brew --prefix openssl`/lib
fi
before_script:
- |
(cargo install rustfmt || true) &&
pip install 'travis-cargo<0.2' --user &&
export PATH=$HOME/.local/bin:$HOME/Library/Python/2.7/bin:$HOME/.cargo/bin:$PATH
script:
- |
if [[ "$TRAVIS_RUST_VERSION" == nightly ]]; then
EXTRA_ARGS="-- --no-default-features"
fi &&
travis-cargo build $EXTRA_ARGS &&
travis-cargo test $EXTRA_ARGS &&
travis-cargo build $FEATURE_OPTS &&
travis-cargo test $FEATURE_OPTS &&
(cargo fmt -- --write-mode=diff || true) &&
if [[ "$TRAVIS_RUST_VERSION" == beta ]]; then
travis-cargo bench $EXTRA_ARGS &&
travis-cargo doc $EXTRA_ARGS
travis-cargo bench $FEATURE_OPTS &&
travis-cargo doc $FEATURE_OPTS
fi
before_deploy: "./build-release cage ${TRAVIS_TAG}-${TRAVIS_OS_NAME}"
deploy:
Expand Down
4 changes: 2 additions & 2 deletions build-release
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ rust-musl-builder() {
case `uname -s` in
Linux)
echo "Building static binaries using ekidd/rust-musl-builder"
rust-musl-builder cargo build --release
rust-musl-builder cargo build --release $FEATURE_OPTS
zip -j "$1"-"$2"-"`uname -m`".zip target/x86_64-unknown-linux-musl/release/$1
;;
*)
echo "Building standard release binaries"
cargo build --release
cargo build --release $FEATURE_OPTS
zip -j "$1"-"$2"-"`uname -m`".zip target/release/$1
;;
esac

0 comments on commit 19b1df8

Please sign in to comment.