Skip to content

Commit d8b05e5

Browse files
committed
MAINT: Edit travis for multiarch builds
1 parent 1d772bd commit d8b05e5

File tree

1 file changed

+33
-11
lines changed

1 file changed

+33
-11
lines changed

.travis.yml

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,43 @@
11
language: rust
22
sudo: false
33

4-
# run builds for all the trains (and more)
5-
rust:
6-
- 1.12.0
7-
- stable
8-
- beta
9-
- nightly
4+
matrix:
5+
include:
6+
- rust: stable
7+
env:
8+
TARGET=x86_64-unknown-linux-gnu
9+
- rust: stable
10+
env:
11+
TARGET=i686-unknown-linux-gnu
12+
- rust: beta
13+
env:
14+
TARGET=x86_64-unknown-linux-gnu
15+
- rust: nightly
16+
env:
17+
TARGET=x86_64-unknown-linux-gnu
18+
- rust: nightly
19+
env:
20+
TARGET=aarch64-unknown-linux-gnu
21+
BUILD_ONLY=1
22+
23+
addons:
24+
apt:
25+
packages:
26+
# needed for i686-unknown-linux-gnu target
27+
- gcc-multilib
28+
install:
29+
# "rustup error: cannot re-add" without this conditional check
30+
- if [[ $HOST != $TARGET ]]; then rustup target add $TARGET; fi
1031

1132
# the main build
1233
script:
1334
- |
14-
cargo build &&
15-
cargo test &&
16-
cargo test --release &&
17-
cargo doc &&
18-
cargo bench
35+
cargo build --target=$TARGET &&
36+
([ -n "$BUILD_ONLY" ] || (
37+
cargo test --target=$TARGET &&
38+
cargo test --release --target=$TARGET &&
39+
cargo doc --target=$TARGET &&
40+
cargo bench --target=$TARGET ))
1941
2042
branches:
2143
only:

0 commit comments

Comments
 (0)