forked from rust-random/rand
-
Notifications
You must be signed in to change notification settings - Fork 2
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
5 changed files
with
183 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
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 @@ | ||
# This script takes care of testing your crate | ||
|
||
set -ex | ||
|
||
# TODO This is the "test phase", tweak it as you see fit | ||
main() { | ||
cross build --target $TARGET | ||
cross build --all --no-default-features --target $TARGET --release | ||
if [ ! -z $NIGHTLY ]; then | ||
cross doc --no-deps --features nightly | ||
fi | ||
|
||
if [ ! -z $DISABLE_TESTS ]; then | ||
return | ||
fi | ||
|
||
cross test --all --target $TARGET | ||
|
||
if [ ! -z $NIGHTLY ]; then | ||
cross test --all --features nightly --target $TARGET | ||
cross test --all --benches --target $TARGET | ||
fi | ||
} | ||
|
||
# we don't run the "test phase" when doing deploys | ||
if [ -z $TRAVIS_TAG ]; then | ||
main | ||
fi |
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