Skip to content

Commit 1044787

Browse files
committed
build: set up build job for i686 targets
1 parent 135f80c commit 1044787

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.travis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ matrix:
5656
env: BASE_TESTS=true
5757
- os: linux
5858
env: BASE_TESTS=true
59+
# We cannot cross-compile on x86_64 toolchain for i686 target,
60+
# but i686 toolchain could run on x86_64 system.
61+
- os: linux
62+
env: HOST_TOOLCHAIN=i686-unknown-linux-gnu
63+
if: type = pull_request OR branch = master
5964
- os: windows
6065
env: CARGO_INCREMENTAL=0 BASE_TESTS=true OS_WINDOWS=true
6166

setup-toolchain.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,10 @@ if [[ "$CI" == true ]] || ! command -v rustup-toolchain-install-master > /dev/nu
99
cargo install -Z install-upgrade rustup-toolchain-install-master --bin rustup-toolchain-install-master
1010
fi
1111

12-
rustup-toolchain-install-master -f -n master
12+
TOOLCHAIN=()
13+
if [[ -n "$HOST_TOOLCHAIN" ]]; then
14+
TOOLCHAIN=('--host', "$HOST_TOOLCHAIN")
15+
fi
16+
17+
rustup-toolchain-install-master -f -n master "${TOOLCHAIN[@]}"
1318
rustup override set master

0 commit comments

Comments
 (0)