summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryant Mairs <bryant@mai.rs>2017-04-17 21:12:16 -0700
committerBryant Mairs <bryant@mai.rs>2017-06-06 09:53:10 -0700
commit0332f832415fcc90c2e48469bace59112331b6ba (patch)
tree37005526d6dbac38e34b0ab80231c3697868a079
parent41dbfae3273bf05c878cb41d6efe8d5bba70a7e4 (diff)
downloadnix-0332f832415fcc90c2e48469bace59112331b6ba.zip
Synchronize CI with upstream trust configuration
-rw-r--r--.travis.yml4
-rw-r--r--ci/install.sh17
2 files changed, 14 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml
index ca2413ab..7cda4a67 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -85,6 +85,8 @@ matrix:
os: osx
rust: nightly
+before_install: set -e
+
install:
- sh ci/install.sh
- source ~/.cargo/env || true
@@ -92,6 +94,8 @@ install:
script:
- bash ci/script.sh
+after_script: set +e
+
before_deploy:
- sh ci/before_deploy.sh
diff --git a/ci/install.sh b/ci/install.sh
index 4093c9b2..748ad9a9 100644
--- a/ci/install.sh
+++ b/ci/install.sh
@@ -1,23 +1,26 @@
set -ex
main() {
- curl https://sh.rustup.rs -sSf | \
- sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION
-
local target=
if [ $TRAVIS_OS_NAME = linux ]; then
- target=x86_64-unknown-linux-gnu
+ target=x86_64-unknown-linux-musl
+ sort=sort
else
target=x86_64-apple-darwin
+ sort=gsort # for `sort --sort-version`, from brew's coreutils.
fi
- # TODO At some point you'll probably want to use a newer release of `cross`,
- # simply change the argument to `--tag`.
+ # This fetches latest stable release
+ local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \
+ | cut -d/ -f3 \
+ | grep -E '^v[0.1.0-9.]+$' \
+ | $sort --version-sort \
+ | tail -n1)
curl -LSfs https://japaric.github.io/trust/install.sh | \
sh -s -- \
--force \
--git japaric/cross \
- --tag v0.1.4 \
+ --tag $tag \
--target $target
}