Skip to content

Commit 94aa039

Browse files
committed
build: set up build job for i686 targets
1 parent 83b90d8 commit 94aa039

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

.travis.yml

+11-1
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,15 @@ 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+
- libssl-dev:i386 # openssl dev in Cargo.toml
63+
if: branch IN (auto, try)
5464
- os: windows
5565
env: CARGO_INCREMENTAL=0 OS_WINDOWS=true
5666

@@ -117,7 +127,7 @@ before_script:
117127
SYSROOT=$(rustc --print sysroot)
118128
case "$TRAVIS_OS_NAME" in
119129
windows ) export PATH="${SYSROOT}/bin:${PATH}" ;;
120-
linux ) export LD_LIBRARY_PATH="${SYSROOT}/lib" ;;
130+
linux ) export LD_LIBRARY_PATH="${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" ;;
121131
osx )
122132
# See <https://github.com/nteract/nteract/issues/1523#issuecomment-301623519>
123133
sudo mkdir -p /usr/local/lib

ci/base-tests.sh

-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#!/usr/bin/env bash
22
set -ex
33

4-
# for faster build, share target dir between subcrates
5-
CARGO_TARGET_DIR=$(pwd)/target/
6-
export CARGO_TARGET_DIR
7-
84
echo "Running clippy base tests"
95

106
PATH=$PATH:./node_modules/.bin

setup-toolchain.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,11 @@ if rustc +master -Vv 2>/dev/null | grep -q "$RUST_COMMIT"; then
2626
exit 0
2727
fi
2828

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

0 commit comments

Comments
 (0)