Skip to content

Commit

Permalink
Synchronize CI with upstream trust configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Susurrus committed Apr 18, 2017
1 parent e9e6225 commit 9a8c514
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,17 @@ matrix:
os: osx
rust: nightly

before_install: set -e

install:
- sh ci/install.sh
- source ~/.cargo/env || true

script:
- bash ci/script.sh

after_script: set +e

before_deploy:
- sh ci/before_deploy.sh

Expand Down
17 changes: 10 additions & 7 deletions ci/install.sh
Original file line number Diff line number Diff line change
@@ -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
}

Expand Down

0 comments on commit 9a8c514

Please sign in to comment.