diff --git a/.travis.yml b/.travis.yml index 4573615..cf1fa42 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,6 @@ +# Based on the "trust" template v0.1.1 +# https://github.com/japaric/trust/tree/v0.1.1 + dist: trusty language: rust services: docker @@ -12,15 +15,10 @@ env: # TODO Update this to match the name of your project. - CRATE_NAME=trust - # TODO This is the channel that will be used to produce binary releases - - DEPLOY_VERSION=stable - # default job - TARGET=x86_64-unknown-linux-gnu matrix: - exclude: - - language: rust # TODO These are all the build jobs. Adjust as necessary. Comment out what you # don't need include: @@ -36,6 +34,11 @@ matrix: - env: TARGET=x86_64-apple-darwin os: osx + # *BSD + - env: TARGET=i686-unknown-freebsd DISABLE_TESTS=1 + - env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1 + - env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1 + # Other architectures - env: TARGET=aarch64-unknown-linux-gnu - env: TARGET=armv7-unknown-linux-gnueabihf @@ -75,7 +78,11 @@ deploy: file_glob: true file: $CRATE_NAME-$TRAVIS_TAG-$TARGET.* on: - condition: $TRAVIS_RUST_VERSION = $DEPLOY_VERSION + # TODO Here you can pick which targets will generate binary releases + # In this example, there are some targets that are tested using the stable + # and nightly channels. This condition makes sure there is only one release + # for such targets and that's generated using the stable channel + condition: $TRAVIS_RUST_VERSION = stable tags: true provider: releases skip_cleanup: true diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..f88e41f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,19 @@ +# Change Log + +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](http://semver.org/). + +## [Unreleased] + +## [v0.1.1] - 2017-01-08 + +### Added + +- Cross compilation / deploy support for FreeBSD and NetBSD. + +## v0.1.0 - 2017-01-01 + +- Initial release + +[Unreleased]: https://github.com/japaric/trust/compare/v0.1.1...HEAD +[v0.1.1]: https://github.com/japaric/trust/compare/v0.1.0...v0.1.1 diff --git a/Cargo.toml b/Cargo.toml index daf4e45..ac74945 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Jorge Aparicio "] build = "build.rs" name = "trust" -version = "0.1.0" +version = "0.1.1" [build-dependencies] gcc = { git = "https://github.com/alexcrichton/gcc-rs" } diff --git a/README.md b/README.md index a5620f6..aa1bd68 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,41 @@ $ curl -LSfs https://japaric.github.io/trust/install.sh | \ For more details about this installation script see `install.sh -h` +### How to disable deploys? + +If you don't want to generate binary releases at all, perhaps because your Cargo +project is a library or you only want to test your project, then you can simply +change `deploy.on.condition`, in `.travis.yml`, and `deploy.on`, in +`appveyor.yml`, to always be false. For example: + +``` yml +# .travis.yml +deploy: + on: + condition: $DEPLOY = never +``` + +### How to upgrade your CI configuration? + +First, figure out which version of the trust template you are using. The version +is written in the header of the `.travis.yml` and `appveyor.yml` files. If +there's no header, that means you are using version `v0.1.0`. + +Next, look at the [change log](CHANGELOG.md) to check if there's a new release +and to learn, at a high level, how the template has changed: what has been +fixed, what has been added, etc. + +If it makes sense for you to upgrade, you can see the required "code" changes by +looking at the "diff" between the version you are using and the version you are +going to upgrade to. For example: + +https://github.com/japaric/trust/compare/v0.1.0...v0.1.1 + +As for the upgrade itself, GitHub can generate a patch from the above diff that +then you can apply to your repository with `git am` or similar: + +https://github.com/japaric/trust/compare/v0.1.0...v0.1.1.patch + ## Supported targets ### Linux @@ -119,6 +154,14 @@ would - `x86_64-apple-darwin` +### *BSD + +- `i686-unknown-freebsd` + +- `x86_64-unknown-freebsd` + +- `x86_64-unknown-netbsd` + ### Windows (MinGW) - `i686-pc-windows-gnu` diff --git a/appveyor.yml b/appveyor.yml index 72e75bc..ca13308 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,3 +1,6 @@ +# Based on the "trust" template v0.1.1 +# https://github.com/japaric/trust/tree/v0.1.1 + environment: global: # TODO This is the Rust channel that build jobs will use by default but can be @@ -64,7 +67,10 @@ deploy: secure: t3puM/2hOig26EHhAodcZBc61NywF7/PFEpimR6SwGaCiqS07KR5i7iAhSABmBp7 description: '' on: - # TODO This is the channel that will be used to produce binary releases + # TODO Here you can pick which targets will generate binary releases + # In this example, there are some targets that are tested using the stable + # and nightly channels. This condition makes sure there is only one release + # for such targets and that's generated using the stable channel RUST_VERSION: stable appveyor_repo_tag: true provider: GitHub diff --git a/ci/install.sh b/ci/install.sh index 87f76e0..4093c9b 100644 --- a/ci/install.sh +++ b/ci/install.sh @@ -17,7 +17,7 @@ main() { sh -s -- \ --force \ --git japaric/cross \ - --tag v0.1.3 \ + --tag v0.1.4 \ --target $target } diff --git a/ci/script.sh b/ci/script.sh index 2c05f4f..de1f77c 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -4,18 +4,18 @@ set -ex # TODO This is the "test phase", tweak it as you see fit main() { - test -f Cargo.lock || cargo generate-lockfile - cross build --target $TARGET cross build --target $TARGET --release - if [ -z $DISABLE_TESTS ]; then - cross test --target $TARGET - cross test --target $TARGET --release - - cross run --target $TARGET - cross run --target $TARGET --release + if [ -n $DISABLE_TESTS ]; then + return fi + + cross test --target $TARGET + cross test --target $TARGET --release + + cross run --target $TARGET + cross run --target $TARGET --release } # we don't run the "test phase" when doing deploys