Skip to content

Commit

Permalink
ci: Add Linux builds and update scripts
Browse files Browse the repository at this point in the history
This should get us OpenSSL & Vault support on the Mac.
  • Loading branch information
emk committed Apr 8, 2020
1 parent 078bed5 commit 904cd5e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 37 deletions.
50 changes: 18 additions & 32 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,32 @@
language: rust
dist: trusty
sudo: required
os:
- linux
- osx
rust:
- stable
services:
- docker
matrix:
fast_finish: true
allow_failures:
- rust: nightly
include:
- os: linux
rust: stable
env: "FEATURE_OPTS=''"
- os: linux
rust: beta
env: "FEATURE_OPTS=''"
- os: linux
rust: nightly
env: "FEATURE_OPTS=''"
- os: osx
rust: stable
# Still no SSL on the Mac, because upgrading would need to deal with
# https://github.com/faradayio/boondock/issues/14
env: "FEATURE_OPTS='--no-default-features'"
before_script:
- rustup component add rustfmt
- rustup component add clippy
script:
- cargo test $FEATURE_OPTS
- cargo build $FEATURE_OPTS
# Require `cargo fmt` to have been run.
- cargo fmt -- --check
# Require clippy to pass without warnings. This also fails for regular Rust
# warnings.
- cargo clippy -- -D warnings
# Build the code.
- cargo build --verbose
# Run the tests.
- cargo test --verbose
before_deploy: "./build-release cage ${TRAVIS_TAG}-${TRAVIS_OS_NAME}"
deploy:
provider: releases
api_key:
secure: JLDn2TGYLpu/sPB5jQ8pZk1yhsub3hPlvqoR+Z0WI9nxwHDWqPSP2nvO93tGkbjOSU4jOB79fg5m4mi1jKoBfSTb+xqFxwBig3WT++rjvHLkht5Gq7Vz63YglgwYGFL2ElCmdWXp3YKmZGNRpoXBs+mmA2/ZKOOmoJqYKqBdfm68y7iQi+jCAl9whv3/mmVloEP4xPEyCuenGyzxpCHxPHFgXZOHCV2djgFLcMmVM0ykBskYz4+EnOl3l9p+NctKB6PEshdkXmdgS/3FtbTTBouDzOGld6vKIdK3g5YA+7btzXTaAUxLS9Pn2R2uLnkicWu+U5Glf3Ur80pydBm8xLiqT0qM+7EYDmFKvF3vBPEofrW9ZFx2aDRWb5Lze7KrWx1I/3nXqczFF60FU+duKmQ+JoPE9htvEOsQmRHhA4TFpye5A7+/lw/bdI8nnllnuN000+tzM64dAYwzmS5rhhe8Iof+LxLGegfG8DyHzGFB8oXoVGBo3G4wP5TiO5rEJFp+YdZ3mHK4Kdfz4GSwzORB4CT2Z+2jTxzLvRkZ/1xyBd0mVYHAnzMDfCnZFAtV17XezZPSiul9EMlt7Xlnr+5zn8ff1/QA0+x1vyq4oPn4ZzyInLRESNYCY58YB6ThmuDp4YskHCfGF0Pthik5ogweQdJn8sODWdLcLALpMEM=
api_key: $GITHUB_TOKEN
file_glob: true
file: "cage-${TRAVIS_TAG}-${TRAVIS_OS_NAME}.*"
skip_cleanup: true
on:
repo: faradayio/cage
rust: stable
tags: true
notifications:
webhooks:
urls:
- "https://webhooks.gitter.im/e/717bec1dd1d6de43c44c"
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ FROM ekidd/rust-musl-builder

# We need to add the source code to the image because `rust-musl-builder`
# assumes a UID of 1000, but TravisCI has switched to 2000.
ADD . ./
RUN sudo chown -R rust:rust .
ADD --chown=rust:rust . ./

CMD cargo build --release
CMD cargo build --release
4 changes: 2 additions & 2 deletions build-release
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ case `uname -s` in
;;
*)
echo "Building standard release binaries"
cargo build --release --no-default-features
cargo build --release
zip -j "$1"-"$2".zip target/release/"$1"
;;
esac
esac

0 comments on commit 904cd5e

Please sign in to comment.