-
-
Notifications
You must be signed in to change notification settings - Fork 500
Trust/cross compiled test targets #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
138006c
eeea689
aee678a
718aef7
9dc68f0
f35a70e
250b623
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 |
| 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is/should this list be the same as in
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see why that's required; e.g. I don't see much point testing docs on multiple platforms.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be honest I did not check the list completely. And you are right, not everything is interesting to test on all platforms. The
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I revised the tests for non-cross builds and combined the two nightly targets we've had for ages, as well as a bit more clean-up. Yes, |
||
| fi | ||
| } | ||
|
|
||
| # we don't run the "test phase" when doing deploys | ||
| if [ -z $TRAVIS_TAG ]; then | ||
| main | ||
| fi | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍