From d359cb8c619d267133f521114d8c361ef08ca7df Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 2 Jan 2017 17:15:56 -0500 Subject: [PATCH 1/6] .travis.yml: remove stray 'matrix.exclude' value --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4573615..a8c299e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,8 +19,6 @@ env: - 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: From 574397bde6ccfcb954b89b33a4140a761fe29fdf Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sun, 8 Jan 2017 13:20:00 -0500 Subject: [PATCH 2/6] *BSD support --- .travis.yml | 5 +++++ README.md | 8 ++++++++ ci/install.sh | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a8c299e..ca74187 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,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 diff --git a/README.md b/README.md index a5620f6..0cf7ebd 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,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/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 } From b43b9a31bc19ed25942a71ece348acf3ef730c53 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sun, 8 Jan 2017 13:20:39 -0500 Subject: [PATCH 3/6] ci/script.sh: it's no longer necessary to explicitly generate a lockfile --- ci/script.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ci/script.sh b/ci/script.sh index 2c05f4f..9eb018e 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -4,8 +4,6 @@ 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 From dcfad00ecdfbee35e760a682b5d8f06602b192d1 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sun, 8 Jan 2017 13:20:58 -0500 Subject: [PATCH 4/6] ci/script.sh: reduce rightward drift --- ci/script.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ci/script.sh b/ci/script.sh index 9eb018e..de1f77c 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -7,13 +7,15 @@ main() { 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 From 1f5e9962309fbac0b7bc4477f736473e2832b342 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sun, 8 Jan 2017 13:24:34 -0500 Subject: [PATCH 5/6] .travis.yml: remove the $DEPLOY_VERSION variable move the TODO to deploy.on.condition and explain how that works this is more flexible and matches how appveyor.yml works --- .travis.yml | 9 +++++---- appveyor.yml | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index ca74187..6e47cb7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,6 @@ 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 @@ -78,7 +75,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/appveyor.yml b/appveyor.yml index 72e75bc..cb701ca 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -64,7 +64,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 From 4b629c91c81dce6515233561d35ef4ef9d08e763 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sun, 8 Jan 2017 14:58:06 -0500 Subject: [PATCH 6/6] release v0.1.1 --- .travis.yml | 3 +++ CHANGELOG.md | 19 +++++++++++++++++++ Cargo.toml | 2 +- README.md | 35 +++++++++++++++++++++++++++++++++++ appveyor.yml | 3 +++ 5 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md diff --git a/.travis.yml b/.travis.yml index 6e47cb7..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 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 0cf7ebd..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 diff --git a/appveyor.yml b/appveyor.yml index cb701ca..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