-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #40382 - alexcrichton:split-tested-targets, r=brson
travis: Split the linux-tested-targets builder Travis only gives us 30GB disk space and we don't currently have an option to increase that. Each musl target generates "hello world" binaries of about 3.5MB in size, and we're testing two targets in the same image. We have around 3k run-pass tests and 2 musl targets which works out to around 20GB. That's dangerously close to the limit and is causing PRs to bounce. This PR splits up the builder in two, one for x86_64 musl and the other for i686. Hopefully that'll keep us under the disk limit. Closes #40359
- Loading branch information
Showing
6 changed files
with
87 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
FROM ubuntu:16.04 | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
g++ \ | ||
make \ | ||
file \ | ||
curl \ | ||
ca-certificates \ | ||
python2.7 \ | ||
git \ | ||
cmake \ | ||
xz-utils \ | ||
sudo \ | ||
gdb \ | ||
patch \ | ||
libssl-dev \ | ||
pkg-config | ||
|
||
WORKDIR /build/ | ||
COPY build-musl.sh /build/ | ||
RUN sh /build/build-musl.sh && rm -rf /build | ||
|
||
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \ | ||
dpkg -i dumb-init_*.deb && \ | ||
rm dumb-init_*.deb | ||
ENTRYPOINT ["/usr/bin/dumb-init", "--"] | ||
|
||
RUN curl -o /usr/local/bin/sccache \ | ||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-02-25-sccache-x86_64-unknown-linux-musl && \ | ||
chmod +x /usr/local/bin/sccache | ||
|
||
ENV RUST_CONFIGURE_ARGS \ | ||
--target=x86_64-unknown-linux-musl \ | ||
--musl-root-x86_64=/musl-x86_64 | ||
|
||
# Newer binutils broke things on some vms/distros (i.e., linking against | ||
# unknown relocs disabled by the following flag), so we need to go out of our | ||
# way to produce "super compatible" binaries. | ||
# | ||
# See: https://github.com/rust-lang/rust/issues/34978 | ||
ENV CFLAGS_x86_64_unknown_linux_musl=-Wa,-mrelax-relocations=no | ||
|
||
ENV SCRIPT \ | ||
python2.7 ../x.py test --target x86_64-unknown-linux-musl && \ | ||
python2.7 ../x.py dist --target x86_64-unknown-linux-musl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh | ||
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT | ||
# file at the top-level directory of this distribution and at | ||
# http://rust-lang.org/COPYRIGHT. | ||
# | ||
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
# option. This file may not be copied, modified, or distributed | ||
# except according to those terms. | ||
|
||
set -ex | ||
|
||
# We need to mitigate rust-lang/rust#34978 when compiling musl itself as well | ||
export CFLAGS="-fPIC -Wa,-mrelax-relocations=no" | ||
export CXXFLAGS="-Wa,-mrelax-relocations=no" | ||
|
||
MUSL=musl-1.1.14 | ||
curl https://www.musl-libc.org/releases/$MUSL.tar.gz | tar xzf - | ||
cd $MUSL | ||
./configure --prefix=/musl-x86_64 --disable-shared | ||
make -j10 | ||
make install | ||
|
||
cd .. | ||
rm -rf $MUSL | ||
|
||
# To build MUSL we're going to need a libunwind lying around, so acquire that | ||
# here and build it. | ||
curl -L https://github.com/llvm-mirror/llvm/archive/release_37.tar.gz | tar xzf - | ||
curl -L https://github.com/llvm-mirror/libunwind/archive/release_37.tar.gz | tar xzf - | ||
|
||
mkdir libunwind-build | ||
cd libunwind-build | ||
cmake ../libunwind-release_37 -DLLVM_PATH=/build/llvm-release_37 \ | ||
-DLIBUNWIND_ENABLE_SHARED=0 | ||
make -j10 | ||
cp lib/libunwind.a /musl-x86_64/lib |