-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
151 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# From https://github.com/japaric/trust | ||
|
||
set -ex | ||
|
||
main() { | ||
local target= | ||
if [ $TRAVIS_OS_NAME = linux ]; then | ||
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 | ||
|
||
# Builds for iOS are done on OSX, but require the specific target to be | ||
# installed. | ||
case $TARGET in | ||
aarch64-apple-ios) | ||
rustup target install aarch64-apple-ios | ||
;; | ||
armv7-apple-ios) | ||
rustup target install armv7-apple-ios | ||
;; | ||
armv7s-apple-ios) | ||
rustup target install armv7s-apple-ios | ||
;; | ||
i386-apple-ios) | ||
rustup target install i386-apple-ios | ||
;; | ||
x86_64-apple-ios) | ||
rustup target install x86_64-apple-ios | ||
;; | ||
esac | ||
|
||
# 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 $tag \ | ||
--target $target | ||
} | ||
|
||
main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Derived from https://github.com/japaric/trust | ||
|
||
set -ex | ||
|
||
main() { | ||
if [ ! -z $DISABLE_TESTS ]; then | ||
if [ ! -z $DISABLE_STD ]; then | ||
cross build --all --no-default-features --target $TARGET --release | ||
else | ||
cross build --all --features log,serde-1 --target $TARGET | ||
fi | ||
return | ||
fi | ||
|
||
if [ ! -z $NIGHTLY ]; then | ||
cross test --all --tests --no-default-features --features alloc --target $TARGET | ||
cross test --all --features serde-1,log,nightly --target $TARGET | ||
cross test --all --benches --target $TARGET | ||
else | ||
cross test --all --tests --no-default-features --target $TARGET | ||
cross test --all --features serde-1,log --target $TARGET | ||
fi | ||
} | ||
|
||
# we don't run the "test phase" when doing deploys | ||
if [ -z $TRAVIS_TAG ]; then | ||
main | ||
fi |