File tree Expand file tree Collapse file tree 2 files changed +23
-14
lines changed Expand file tree Collapse file tree 2 files changed +23
-14
lines changed Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /bin/sh
2
2
set -ex
3
3
4
4
main () {
5
5
local target=
6
- if [ $TRAVIS_OS_NAME = linux ]; then
6
+ if [ ` uname ` = " Linux " ]; then
7
7
target=x86_64-unknown-linux-musl
8
- sort=sort
8
+ else if [ ` uname` = " FreeBSD" ]; then
9
+ target=x86_64-unknown-freebsd
9
10
else
10
11
target=x86_64-apple-darwin
12
+ fi
13
+
14
+ if which -s gsort; then
11
15
sort=gsort # for `sort --sort-version`, from brew's coreutils.
16
+ else
17
+ sort=sort
12
18
fi
13
19
14
20
# Builds for iOS are done on OSX, but require the specific target to be
Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /bin/sh
2
2
# This script takes care of testing your crate
3
3
4
4
set -ex
@@ -8,24 +8,27 @@ main() {
8
8
if [ " $TRAVIS " = true ]; then
9
9
export RUSTFLAGS=--cfg=travis
10
10
fi
11
+ if [ " $CIRRUS_CI " = true ]; then
12
+ export RUSTFLAGS=--cfg=cirrus
13
+ fi
11
14
12
15
IFS=' ;' read -ra TARGET_ARRAY <<< " $TARGET"
13
16
for t in " ${TARGET_ARRAY[@]} " ; do
14
- # Build debug and release targets
15
- cross build --target $t
16
- cross build --target $t --release
17
+ # Build debug and release targets
18
+ cross build --target $t
19
+ cross build --target $t --release
17
20
18
- if [ ! -z $DISABLE_TESTS ]; then
19
- continue
20
- fi
21
+ if [ ! -z $DISABLE_TESTS ]; then
22
+ continue
23
+ fi
21
24
22
- # Run tests on debug and release targets.
23
- cross test --target $t
24
- cross test --target $t --release
25
+ # Run tests on debug and release targets.
26
+ cross test --target $t
27
+ cross test --target $t --release
25
28
done
26
29
}
27
30
28
31
# we don't run the "test phase" when doing deploys
29
- if [ -z $TRAVIS_TAG ]; then
32
+ if [ -z " $TRAVIS_TAG " -a -z " $CIRRUS_TAG " ]; then
30
33
main
31
34
fi
You can’t perform that action at this time.
0 commit comments