Skip to content

Commit 3f81864

Browse files
committed
build: set up build job for i686 targets
1 parent e63758c commit 3f81864

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.travis.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ env:
2525
- secure: "OKulfkA5OGd/d1IhvBKzRkHQwMcWjzrzbimo7+5NhkUkWxndAzl+719TB3wWvIh1i2wXXrEXsyZkXM5FtRrHm55v1VKQ5ibjEvFg1w3NIg81iDyoLq186fLqywvxGkOAFPrsePPsBj5USd5xvhwwbrjO6L7/RK6Z8shBwOSc41s="
2626

2727
before_install:
28+
- export CARGO_TARGET_DIR="$TRAVIS_BUILD_DIR/target"
2829
- curl -sSL https://sh.rustup.rs | sh -s -- -y --default-toolchain=nightly --profile=minimal
2930
- export PATH="$HOME/.cargo/bin:$PATH"
3031
install:
@@ -51,6 +52,16 @@ matrix:
5152
include:
5253
# Builds that are executed for every PR
5354
- os: linux
55+
# i686 toolchain could run on x86_64 system.
56+
- os: linux
57+
env: HOST_TOOLCHAIN=i686-unknown-linux-gnu
58+
addons:
59+
apt:
60+
packages:
61+
- gcc-multilib
62+
if: branch IN (auto, try)
63+
- os: osx
64+
if: branch IN (auto, try)
5465
- os: windows
5566
env: CARGO_INCREMENTAL=0 OS_WINDOWS=true
5667

@@ -119,7 +130,7 @@ before_script:
119130
SYSROOT=$(rustc --print sysroot)
120131
case "$TRAVIS_OS_NAME" in
121132
windows ) export PATH="${SYSROOT}/bin:${PATH}" ;;
122-
linux ) export LD_LIBRARY_PATH="${SYSROOT}/lib" ;;
133+
linux ) export LD_LIBRARY_PATH="${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" ;;
123134
osx )
124135
# See <https://github.com/nteract/nteract/issues/1523#issuecomment-301623519>
125136
sudo mkdir -p /usr/local/lib

setup-toolchain.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,11 @@ if rustc +master -Vv 2>/dev/null | grep -q "$RUST_COMMIT"; then
2828
exit 0
2929
fi
3030

31-
rustup-toolchain-install-master -f -n master -c rustc-dev -- "$RUST_COMMIT"
31+
if [[ -n "$HOST_TOOLCHAIN" ]]; then
32+
TOOLCHAIN=('--host' "$HOST_TOOLCHAIN")
33+
else
34+
TOOLCHAIN=()
35+
fi
36+
37+
rustup-toolchain-install-master -f -n master "${TOOLCHAIN[@]}" -c rustc-dev -- "$RUST_COMMIT"
3238
rustup override set master

0 commit comments

Comments
 (0)