Skip to content

Commit 5341f8f

Browse files
author
Jorge Aparicio
committed
use cross
1 parent 75e0800 commit 5341f8f

File tree

9 files changed

+24
-95
lines changed

9 files changed

+24
-95
lines changed

.travis.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
cache: cargo
21
dist: trusty
32
language: rust
43
rust: nightly
@@ -16,20 +15,24 @@ env: TARGET=x86_64-unknown-linux-gnu
1615
install:
1716
# NOTE(TRAVIS_BRANCH) Travis is configured to only build *pushes* (not PRs).
1817
- if [ $TRAVIS_BRANCH != master ] || [ $TRAVIS_EVENT_TYPE = cron ]; then
19-
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION;
18+
curl https://sh.rustup.rs -sSf |
19+
sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION;
20+
2021
source ~/.cargo/env;
21-
rustup component add rust-src;
22+
23+
cargo install --git https://github.com/japaric/cross -f;
2224
fi
2325

2426
script:
2527
# NOTE(TRAVIS_BRANCH) See the NOTE in the `install` section
26-
# chmod: Travis can't cache files that are not readable by "others"
2728
- if [ $TRAVIS_BRANCH != master ] || [ $TRAVIS_EVENT_TYPE = cron ]; then
28-
cargo generate-lockfile;
29-
sh ci/run-docker.sh $TARGET;
30-
chmod -R a+r $HOME/.cargo;
29+
sh ci/script.sh
3130
fi
3231

32+
cache: cargo
33+
before_cache:
34+
- chmod -R a+r $HOME/.cargo;
35+
3336
branches:
3437
only:
3538
- auto

ci/docker/thumbv6m-none-eabi/Dockerfile

Lines changed: 0 additions & 9 deletions
This file was deleted.

ci/docker/thumbv7em-none-eabi/Dockerfile

Lines changed: 0 additions & 9 deletions
This file was deleted.

ci/docker/thumbv7em-none-eabihf/Dockerfile

Lines changed: 0 additions & 9 deletions
This file was deleted.

ci/docker/thumbv7m-none-eabi/Dockerfile

Lines changed: 0 additions & 9 deletions
This file was deleted.

ci/docker/x86_64-unknown-linux-gnu/Dockerfile

Lines changed: 0 additions & 5 deletions
This file was deleted.

ci/run-docker.sh

Lines changed: 0 additions & 35 deletions
This file was deleted.

ci/run.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

ci/script.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
set -ex
2+
3+
main() {
4+
case $TARGET in
5+
thumbv*-none-eabi*)
6+
cross build --target $TARGET
7+
;;
8+
*)
9+
cross test --target $TARGET
10+
;;
11+
esac
12+
}
13+
14+
main

0 commit comments

Comments
 (0)