File tree Expand file tree Collapse file tree 3 files changed +22
-15
lines changed Expand file tree Collapse file tree 3 files changed +22
-15
lines changed Original file line number Diff line number Diff line change @@ -13,22 +13,10 @@ matrix:
13
13
env : TARGET=x86_64-unknown-linux-gnu
14
14
15
15
install :
16
- # NOTE(TRAVIS_BRANCH) Travis is configured to only build *pushes* (not PRs).
17
- - if [ $TRAVIS_BRANCH != master ] || [ $TRAVIS_EVENT_TYPE = cron ]; then
18
- curl https://sh.rustup.rs -sSf |
19
- sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION;
20
-
21
- source ~/.cargo/env;
22
-
23
- curl -LSfs http://japaric.github.io/trust/install.sh | \
24
- sh -s -- --force --git japaric/cross --tag v0.1.2 --target x86_64-unknown-linux-gnu --to ~/.cargo/bin;
25
- fi
16
+ - sh ci/install.sh
26
17
27
18
script :
28
- # NOTE(TRAVIS_BRANCH) See the NOTE in the `install` section
29
- - if [ $TRAVIS_BRANCH != master ] || [ $TRAVIS_EVENT_TYPE = cron ]; then
30
- sh ci/script.sh;
31
- fi
19
+ - sh ci/script.sh
32
20
33
21
cache : cargo
34
22
before_cache :
Original file line number Diff line number Diff line change
1
+ set -ex
2
+
3
+ main () {
4
+ curl https://sh.rustup.rs -sSf | \
5
+ sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION
6
+
7
+ source ~ /.cargo/env
8
+
9
+ curl -LSfs http://japaric.github.io/trust/install.sh | \
10
+ sh -s -- --force --git japaric/cross --tag v0.1.2 --target $TARGET
11
+ }
12
+
13
+ # NOTE(TRAVIS_BRANCH) Travis is configured to only build *pushes* (not PRs)
14
+ if [ $TRAVIS_BRANCH != master ] || [ $TRAVIS_EVENT_TYPE = cron ]; then
15
+ main
16
+ fi
Original file line number Diff line number Diff line change @@ -11,4 +11,7 @@ main() {
11
11
esac
12
12
}
13
13
14
- main
14
+ # NOTE See the NOTE in `install.sh`
15
+ if [ $TRAVIS_BRANCH != master ] || [ $TRAVIS_EVENT_TYPE = cron ]; then
16
+ main
17
+ fi
You can’t perform that action at this time.
0 commit comments