build: set up build job for i686 targets

This commit is contained in:
Lzu Tao 2019-10-26 00:16:14 +07:00
parent 83b90d8a86
commit 94aa0398c2
3 changed files with 18 additions and 6 deletions

View File

@ -25,6 +25,7 @@ env:
- secure: "OKulfkA5OGd/d1IhvBKzRkHQwMcWjzrzbimo7+5NhkUkWxndAzl+719TB3wWvIh1i2wXXrEXsyZkXM5FtRrHm55v1VKQ5ibjEvFg1w3NIg81iDyoLq186fLqywvxGkOAFPrsePPsBj5USd5xvhwwbrjO6L7/RK6Z8shBwOSc41s=" - secure: "OKulfkA5OGd/d1IhvBKzRkHQwMcWjzrzbimo7+5NhkUkWxndAzl+719TB3wWvIh1i2wXXrEXsyZkXM5FtRrHm55v1VKQ5ibjEvFg1w3NIg81iDyoLq186fLqywvxGkOAFPrsePPsBj5USd5xvhwwbrjO6L7/RK6Z8shBwOSc41s="
before_install: before_install:
- export CARGO_TARGET_DIR="$TRAVIS_BUILD_DIR/target"
- curl -sSL https://sh.rustup.rs | sh -s -- -y --default-toolchain=nightly --profile=minimal - curl -sSL https://sh.rustup.rs | sh -s -- -y --default-toolchain=nightly --profile=minimal
- export PATH="$HOME/.cargo/bin:$PATH" - export PATH="$HOME/.cargo/bin:$PATH"
install: install:
@ -51,6 +52,15 @@ matrix:
include: include:
# Builds that are executed for every PR # Builds that are executed for every PR
- os: linux - os: linux
# i686 toolchain could run on x86_64 system.
- os: linux
env: HOST_TOOLCHAIN=i686-unknown-linux-gnu
addons:
apt:
packages:
- gcc-multilib
- libssl-dev:i386 # openssl dev in Cargo.toml
if: branch IN (auto, try)
- os: windows - os: windows
env: CARGO_INCREMENTAL=0 OS_WINDOWS=true env: CARGO_INCREMENTAL=0 OS_WINDOWS=true
@ -117,7 +127,7 @@ before_script:
SYSROOT=$(rustc --print sysroot) SYSROOT=$(rustc --print sysroot)
case "$TRAVIS_OS_NAME" in case "$TRAVIS_OS_NAME" in
windows ) export PATH="${SYSROOT}/bin:${PATH}" ;; windows ) export PATH="${SYSROOT}/bin:${PATH}" ;;
linux ) export LD_LIBRARY_PATH="${SYSROOT}/lib" ;; linux ) export LD_LIBRARY_PATH="${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" ;;
osx ) osx )
# See <https://github.com/nteract/nteract/issues/1523#issuecomment-301623519> # See <https://github.com/nteract/nteract/issues/1523#issuecomment-301623519>
sudo mkdir -p /usr/local/lib sudo mkdir -p /usr/local/lib

View File

@ -1,10 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -ex set -ex
# for faster build, share target dir between subcrates
CARGO_TARGET_DIR=$(pwd)/target/
export CARGO_TARGET_DIR
echo "Running clippy base tests" echo "Running clippy base tests"
PATH=$PATH:./node_modules/.bin PATH=$PATH:./node_modules/.bin

View File

@ -26,5 +26,11 @@ if rustc +master -Vv 2>/dev/null | grep -q "$RUST_COMMIT"; then
exit 0 exit 0
fi fi
rustup-toolchain-install-master -f -n master -c rustc-dev -- "$RUST_COMMIT" if [[ -n "$HOST_TOOLCHAIN" ]]; then
TOOLCHAIN=('--host' "$HOST_TOOLCHAIN")
else
TOOLCHAIN=()
fi
rustup-toolchain-install-master -f -n master "${TOOLCHAIN[@]}" -c rustc-dev -- "$RUST_COMMIT"
rustup override set master rustup override set master