Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 008cc2d

Browse files
committedNov 11, 2016
Move all Linux/OSX CI infastructure to Travis
This commit configures our `.travis.yml` to test the full suite of tests we have on Buildbot right now. A whole mess of docker images are added to the `src/ci` directory which represent all the build environments for each configuration. Each of these environments is then configured in `.travis.yml` to run on the auto branch. Note that the full matrix of tests aren't intended to be run on all PRs. Instead, we continue to run only one entry in the matrix, forcing all others to finish quickly. Only the `auto` branch should run the full matrix of builds. Also note that the infrastructure hasn't quite been allocated yet to the rust-lang/rust repository, so everything is disabled for now except for the one build that happens on PRs. Once that infrastructure is allocated though we can enable this and let it fly! Notable modifications from the current test suite today: * Android tests are run in rustbuild instead of the makefiles, for whatever reason I couldn't get the makefiles to work on Travis. * A debuginfo test was updated to work with the current version of the Android NDK. * Some dependencies in `mk/tests.mk` were fixed to allow running tests in parallel.
1 parent ab03f85 commit 008cc2d

File tree

24 files changed

+734
-25
lines changed

24 files changed

+734
-25
lines changed
 

‎.travis.yml

Lines changed: 68 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,82 @@
1-
language: generic
1+
language: rust
22
sudo: required
3+
dist: trusty
34
services:
45
- docker
56

6-
# LLVM takes awhile to check out and otherwise we'll manage the submodules in
7-
# our configure script, so disable auto submodule management.
87
git:
9-
submodules: false
108
depth: 1
9+
submodules: false
1110

12-
before_install:
13-
- docker build -t rust -f src/etc/Dockerfile src/etc
11+
matrix:
12+
include:
13+
# Linux builders, all docker images
14+
- env: IMAGE=arm-android
15+
- env: IMAGE=cross
16+
- env: IMAGE=i686-gnu
17+
- env: IMAGE=i686-gnu-nopt
18+
- env: IMAGE=x86_64-freebsd
19+
- env: IMAGE=x86_64-gnu
20+
- env: IMAGE=x86_64-gnu-cargotest
21+
- env: IMAGE=x86_64-gnu-debug
22+
- env: IMAGE=x86_64-gnu-nopt
23+
- env: IMAGE=x86_64-gnu-rustbuild
24+
- env: IMAGE=x86_64-gnu-llvm-3.7 ALLOW_PR=1
25+
- env: IMAGE=x86_64-musl
26+
27+
# OSX builders
28+
- env: >
29+
RUST_CHECK_TARGET=check
30+
RUST_CONFIGURE_ARGS=--target=x86_64-apple-darwin
31+
SRC=.
32+
os: osx
33+
install: brew install ccache
34+
- env: >
35+
RUST_CHECK_TARGET=check
36+
RUST_CONFIGURE_ARGS=--target=i686-apple-darwin
37+
SRC=.
38+
os: osx
39+
install: brew install ccache
40+
- env: >
41+
RUST_CHECK_TARGET=check
42+
RUST_CONFIGURE_ARGS=--target=x86_64-apple-darwin --enable-rustbuild
43+
SRC=.
44+
os: osx
45+
install: brew install ccache
46+
- env: >
47+
RUST_CHECK_TARGET=
48+
RUST_CONFIGURE_ARGS=--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios
49+
SRC=.
50+
os: osx
51+
install: brew install ccache
1452
1553
script:
16-
- docker run -v `pwd`:/build rust
17-
sh -c "
18-
./configure --enable-vendor --enable-rustbuild --llvm-root=/usr/lib/llvm-3.7 --enable-quiet-tests &&
19-
make tidy &&
20-
make check -j4
21-
"
54+
- if [ -z "$ALLOW_PR" ] && [ "$TRAVIS_BRANCH" != "auto" ]; then
55+
echo skipping, not a full build;
56+
elif [ -z "$ENABLE_AUTO" ] then
57+
echo skipping, not quite ready yet
58+
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
59+
git submodule update --init;
60+
src/ci/run.sh;
61+
else
62+
git submodule update --init;
63+
src/ci/docker/run.sh $IMAGE;
64+
fi
2265

23-
# Real testing happens on http://buildbot.rust-lang.org/
24-
#
25-
# See https://github.com/rust-lang/rust-buildbot
26-
# CONTRIBUTING.md#pull-requests
66+
# Save tagged docker images we created and load them if they're available
67+
before_cache:
68+
- docker history -q rust-ci |
69+
grep -v missing |
70+
xargs docker save |
71+
gzip -9 > $HOME/docker/rust-ci.tar.gz
72+
before_install:
73+
- zcat $HOME/docker/rust-ci.tar.gz | docker load || true
2774

2875
notifications:
2976
email: false
3077

31-
branches:
32-
only:
33-
- master
78+
cache:
79+
directories:
80+
- $HOME/docker
81+
- $HOME/.ccache
82+
- $HOME/.cargo

‎mk/tests.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,8 @@ CTEST_DEPS_ui_$(1)-T-$(2)-H-$(3) = $$(UI_TESTS)
697697
CTEST_DEPS_mir-opt_$(1)-T-$(2)-H-$(3) = $$(MIR_OPT_TESTS)
698698
CTEST_DEPS_rustdocck_$(1)-T-$(2)-H-$(3) = $$(RUSTDOCCK_TESTS) \
699699
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
700+
$$(CSREQ$(1)_T_$(3)_H_$(3)) \
701+
$$(SREQ$(1)_T_$(3)_H_$(3)) \
700702
$(S)src/etc/htmldocck.py
701703

702704
endef

‎src/bootstrap/mk/Makefile.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ else
5757
$(Q)$(BOOTSTRAP) dist --install $(BOOTSTRAP_ARGS)
5858
endif
5959
tidy:
60-
$(Q)$(BOOTSTRAP) test src/tools/tidy $(BOOTSTRAP_ARGS)
60+
$(Q)$(BOOTSTRAP) test src/tools/tidy $(BOOTSTRAP_ARGS) --stage 0
61+
62+
check-stage2-android:
63+
$(Q)$(BOOTSTRAP) --step check-target --target arm-linux-androideabi
6164

6265
.PHONY: dist

‎src/ci/docker/arm-android/Dockerfile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
FROM ubuntu:16.04
2+
3+
RUN dpkg --add-architecture i386 && \
4+
apt-get update && \
5+
apt-get install -y --no-install-recommends \
6+
g++ \
7+
make \
8+
file \
9+
curl \
10+
ca-certificates \
11+
python2.7 \
12+
python-minimal \
13+
git \
14+
cmake \
15+
ccache \
16+
unzip \
17+
expect \
18+
openjdk-9-jre \
19+
sudo \
20+
libstdc++6:i386
21+
22+
WORKDIR /android/
23+
ENV PATH=$PATH:/android/ndk-arm-9/bin:/android/sdk/tools:/android/sdk/platform-tools
24+
25+
COPY install-ndk.sh install-sdk.sh accept-licenses.sh /android/
26+
RUN sh /android/install-ndk.sh
27+
RUN sh /android/install-sdk.sh
28+
29+
COPY start-emulator.sh /android/
30+
ENTRYPOINT ["/android/start-emulator.sh"]
31+
32+
ENV TARGETS=arm-linux-androideabi
33+
ENV TARGETS=$TARGETS,i686-linux-android
34+
ENV TARGETS=$TARGETS,aarch64-linux-android
35+
ENV TARGETS=$TARGETS,armv7-linux-androideabi
36+
37+
ENV RUST_CONFIGURE_ARGS \
38+
--target=$TARGETS \
39+
--arm-linux-androideabi-ndk=/android/ndk-arm-9 \
40+
--armv7-linux-androideabi-ndk=/android/ndk-arm-9 \
41+
--i686-linux-android-ndk=/android/ndk-x86-9 \
42+
--aarch64-linux-android-ndk=/android/ndk-aarch64 \
43+
--enable-rustbuild
44+
ENV RUST_CHECK_TARGET check-stage2-android
45+
RUN mkdir /tmp/obj
46+
RUN chmod 777 /tmp/obj
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/expect -f
2+
# ignore-license
3+
4+
set timeout 1800
5+
set cmd [lindex $argv 0]
6+
set licenses [lindex $argv 1]
7+
8+
spawn {*}$cmd
9+
expect {
10+
"Do you accept the license '*'*" {
11+
exp_send "y\r"
12+
exp_continue
13+
}
14+
eof
15+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/sh
2+
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
11+
12+
set -ex
13+
14+
cpgdb() {
15+
cp android-ndk-r11c/prebuilt/linux-x86_64/bin/gdb /android/$1/bin/$2-gdb
16+
cp android-ndk-r11c/prebuilt/linux-x86_64/bin/gdb-orig /android/$1/bin/gdb-orig
17+
cp -r android-ndk-r11c/prebuilt/linux-x86_64/share /android/$1/share
18+
}
19+
20+
# Prep the Android NDK
21+
#
22+
# See https://github.com/servo/servo/wiki/Building-for-Android
23+
curl -O https://dl.google.com/android/repository/android-ndk-r11c-linux-x86_64.zip
24+
unzip -q android-ndk-r11c-linux-x86_64.zip
25+
bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \
26+
--platform=android-9 \
27+
--toolchain=arm-linux-androideabi-4.9 \
28+
--install-dir=/android/ndk-arm-9 \
29+
--ndk-dir=/android/android-ndk-r11c \
30+
--arch=arm
31+
cpgdb ndk-arm-9 arm-linux-androideabi
32+
bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \
33+
--platform=android-21 \
34+
--toolchain=aarch64-linux-android-4.9 \
35+
--install-dir=/android/ndk-aarch64 \
36+
--ndk-dir=/android/android-ndk-r11c \
37+
--arch=arm64
38+
bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \
39+
--platform=android-9 \
40+
--toolchain=x86-4.9 \
41+
--install-dir=/android/ndk-x86-9 \
42+
--ndk-dir=/android/android-ndk-r11c \
43+
--arch=x86
44+
45+
rm -rf ./android-ndk-r11c-linux-x86_64.zip ./android-ndk-r11c
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/sh
2+
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
11+
12+
set -ex
13+
14+
# Prep the SDK and emulator
15+
#
16+
# Note that the update process requires that we accept a bunch of licenses, and
17+
# we can't just pipe `yes` into it for some reason, so we take the same strategy
18+
# located in https://github.com/appunite/docker by just wrapping it in a script
19+
# which apparently magically accepts the licenses.
20+
21+
mkdir sdk
22+
curl https://dl.google.com/android/android-sdk_r24.4-linux.tgz | \
23+
tar xzf - -C sdk --strip-components=1
24+
25+
filter="platform-tools,android-18"
26+
filter="$filter,sys-img-armeabi-v7a-android-18"
27+
28+
./accept-licenses.sh "android - update sdk -a --no-ui --filter $filter"
29+
30+
echo "no" | android create avd \
31+
--name arm-18 \
32+
--target android-18 \
33+
--abi armeabi-v7a
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
11+
12+
set -ex
13+
ANDROID_EMULATOR_FORCE_32BIT=true \
14+
emulator @arm-18 -no-window -partition-size 2047 &
15+
exec "$@"

‎src/ci/docker/cross/Dockerfile

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++ \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
python-minimal \
11+
git \
12+
cmake \
13+
ccache \
14+
sudo \
15+
gcc-aarch64-linux-gnu libc6-dev-arm64-cross \
16+
gcc-arm-linux-gnueabi libc6-dev-armel-cross \
17+
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross \
18+
gcc-mips-linux-gnu libc6-dev-mips-cross \
19+
gcc-mipsel-linux-gnu libc6-dev-mipsel-cross \
20+
gcc-mips64-linux-gnuabi64 libc6-dev-mips64-cross \
21+
gcc-mips64el-linux-gnuabi64 libc6-dev-mips64el-cross \
22+
gcc-powerpc-linux-gnu libc6-dev-powerpc-cross \
23+
gcc-powerpc64-linux-gnu libc6-dev-ppc64-cross \
24+
gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross \
25+
gcc-s390x-linux-gnu libc6-dev-s390x-cross
26+
27+
ENV TARGETS=aarch64-unknown-linux-gnu
28+
ENV TARGETS=$TARGETS,arm-unknown-linux-gnueabi
29+
ENV TARGETS=$TARGETS,arm-unknown-linux-gnueabihf
30+
ENV TARGETS=$TARGETS,armv7-unknown-linux-gnueabihf
31+
ENV TARGETS=$TARGETS,asmjs-unknown-emscripten
32+
ENV TARGETS=$TARGETS,mips-unknown-linux-gnu
33+
ENV TARGETS=$TARGETS,mips64-unknown-linux-gnuabi64
34+
ENV TARGETS=$TARGETS,mips64el-unknown-linux-gnuabi64
35+
ENV TARGETS=$TARGETS,mipsel-unknown-linux-gnu
36+
ENV TARGETS=$TARGETS,powerpc-unknown-linux-gnu
37+
ENV TARGETS=$TARGETS,powerpc64-unknown-linux-gnu
38+
ENV TARGETS=$TARGETS,powerpc64le-unknown-linux-gnu
39+
ENV TARGETS=$TARGETS,s390x-unknown-linux-gnu
40+
ENV TARGETS=$TARGETS,wasm32-unknown-emscripten
41+
42+
#ENV TARGETS=$TARGETS,mips-unknown-linux-musl
43+
#ENV TARGETS=$TARGETS,arm-unknown-linux-musleabi
44+
#ENV TARGETS=$TARGETS,arm-unknown-linux-musleabihf
45+
#ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabihf
46+
#ENV TARGETS=$TARGETS,x86_64-rumprun-netbsd
47+
48+
ENV RUST_CONFIGURE_ARGS \
49+
--target=$TARGETS \
50+
--enable-rustbuild
51+
ENV RUST_CHECK_TARGET ""
52+
53+
ENV AR_s390x_unknown_linux_gnu=s390x-linux-gnu-ar \
54+
CC_s390x_unknown_linux_gnu=s390x-linux-gnu-gcc \
55+
AR_mips64_unknown_linux_gnuabi64=mips64-linux-gnuabi64-ar \
56+
CC_mips64_unknown_linux_gnuabi64=mips64-linux-gnuabi64-gcc \
57+
AR_mips64el_unknown_linux_gnuabi64=mips64el-linux-gnuabi64-ar \
58+
CC_mips64el_unknown_linux_gnuabi64=mips64el-linux-gnuabi64-gcc \
59+
AR_powerpc64_unknown_linux_gnu=powerpc64-linux-gnu-ar \
60+
CC_powerpc64_unknown_linux_gnu=powerpc64-linux-gnu-gcc
61+
62+
# FIXME(rust-lang/rust#36150): powerpc unfortunately aborts right now
63+
ENV NO_LLVM_ASSERTIONS=1
64+
65+
RUN mkdir /tmp/obj
66+
RUN chmod 777 /tmp/obj
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++-multilib \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
git \
11+
cmake \
12+
ccache \
13+
sudo \
14+
gdb
15+
16+
ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu --disable-optimize-tests
17+
ENV RUST_CHECK_TARGET check
18+
RUN mkdir /tmp/obj
19+
RUN chmod 777 /tmp/obj

‎src/ci/docker/i686-gnu/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++-multilib \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
git \
11+
cmake \
12+
ccache \
13+
sudo \
14+
gdb
15+
16+
ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu
17+
ENV RUST_CHECK_TARGET check
18+
RUN mkdir /tmp/obj
19+
RUN chmod 777 /tmp/obj

‎src/ci/docker/run.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/sh
2+
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
11+
12+
set -e
13+
14+
script=`cd $(dirname $0) && pwd`/`basename $0`
15+
image=$1
16+
17+
docker_dir="`dirname $script`"
18+
ci_dir="`dirname $docker_dir`"
19+
src_dir="`dirname $ci_dir`"
20+
root_dir="`dirname $src_dir`"
21+
22+
docker build \
23+
--rm \
24+
-t rust-ci \
25+
"`dirname "$script"`/$image"
26+
27+
mkdir -p $HOME/.ccache
28+
mkdir -p $HOME/.cargo
29+
30+
exec docker run \
31+
--volume "$root_dir:/checkout:ro" \
32+
--workdir /tmp/obj \
33+
--env SRC=/checkout \
34+
--env CCACHE_DIR=/ccache \
35+
--volume "$HOME/.ccache:/ccache" \
36+
--env CARGO_HOME=/cargo \
37+
--env LOCAL_USER_ID=`id -u` \
38+
--volume "$HOME/.cargo:/cargo" \
39+
--interactive \
40+
--tty \
41+
rust-ci \
42+
/checkout/src/ci/run.sh
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++ \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
python-minimal \
11+
git \
12+
cmake \
13+
ccache \
14+
sudo \
15+
bzip2 \
16+
xz-utils \
17+
wget
18+
19+
COPY build-toolchain.sh /tmp/
20+
RUN sh /tmp/build-toolchain.sh
21+
22+
ENV \
23+
AR_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-ar \
24+
CC_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-gcc
25+
26+
ENV RUST_CONFIGURE_ARGS --target=x86_64-unknown-freebsd --enable-rustbuild
27+
ENV RUST_CHECK_TARGET ""
28+
RUN mkdir /tmp/obj
29+
RUN chmod 777 /tmp/obj
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
#!/bin/bash
2+
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
11+
12+
set -ex
13+
14+
ARCH=x86_64
15+
BINUTILS=2.25.1
16+
GCC=5.3.0
17+
18+
mkdir binutils
19+
cd binutils
20+
21+
# First up, build binutils
22+
curl https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS.tar.bz2 | tar xjf -
23+
mkdir binutils-build
24+
cd binutils-build
25+
../binutils-$BINUTILS/configure \
26+
--target=$ARCH-unknown-freebsd10
27+
make -j10
28+
make install
29+
cd ../..
30+
rm -rf binutils
31+
32+
# Next, download the FreeBSD libc and relevant header files
33+
34+
mkdir freebsd
35+
case "$ARCH" in
36+
x86_64)
37+
URL=ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/10.2-RELEASE/base.txz
38+
;;
39+
i686)
40+
URL=ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/10.2-RELEASE/base.txz
41+
;;
42+
esac
43+
curl $URL | tar xJf - -C freebsd ./usr/include ./usr/lib ./lib
44+
45+
dst=/usr/local/$ARCH-unknown-freebsd10
46+
47+
cp -r freebsd/usr/include $dst/
48+
cp freebsd/usr/lib/crt1.o $dst/lib
49+
cp freebsd/usr/lib/Scrt1.o $dst/lib
50+
cp freebsd/usr/lib/crti.o $dst/lib
51+
cp freebsd/usr/lib/crtn.o $dst/lib
52+
cp freebsd/usr/lib/libc.a $dst/lib
53+
cp freebsd/usr/lib/libutil.a $dst/lib
54+
cp freebsd/usr/lib/libutil_p.a $dst/lib
55+
cp freebsd/usr/lib/libm.a $dst/lib
56+
cp freebsd/usr/lib/librt.so.1 $dst/lib
57+
cp freebsd/usr/lib/libexecinfo.so.1 $dst/lib
58+
cp freebsd/lib/libc.so.7 $dst/lib
59+
cp freebsd/lib/libm.so.5 $dst/lib
60+
cp freebsd/lib/libutil.so.9 $dst/lib
61+
cp freebsd/lib/libthr.so.3 $dst/lib/libpthread.so
62+
63+
ln -s libc.so.7 $dst/lib/libc.so
64+
ln -s libm.so.5 $dst/lib/libm.so
65+
ln -s librt.so.1 $dst/lib/librt.so
66+
ln -s libutil.so.9 $dst/lib/libutil.so
67+
ln -s libexecinfo.so.1 $dst/lib/libexecinfo.so
68+
rm -rf freebsd
69+
70+
# Finally, download and build gcc to target FreeBSD
71+
mkdir gcc
72+
cd gcc
73+
curl https://ftp.gnu.org/gnu/gcc/gcc-$GCC/gcc-$GCC.tar.bz2 | tar xjf -
74+
cd gcc-$GCC
75+
./contrib/download_prerequisites
76+
77+
mkdir ../gcc-build
78+
cd ../gcc-build
79+
../gcc-$GCC/configure \
80+
--enable-languages=c \
81+
--target=$ARCH-unknown-freebsd10 \
82+
--disable-multilib \
83+
--disable-nls \
84+
--disable-libgomp \
85+
--disable-libquadmath \
86+
--disable-libssp \
87+
--disable-libvtv \
88+
--disable-libcilkrts \
89+
--disable-libada \
90+
--disable-libsanitizer \
91+
--disable-libquadmath-support \
92+
--disable-lto
93+
make -j10
94+
make install
95+
cd ../..
96+
rm -rf gcc
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++ \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
python-minimal \
11+
git \
12+
cmake \
13+
ccache \
14+
libssl-dev \
15+
sudo
16+
17+
ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --enable-rustbuild
18+
ENV RUST_CHECK_TARGET check-cargotest
19+
RUN mkdir /tmp/obj
20+
RUN chmod 777 /tmp/obj
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++ \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
git \
11+
cmake \
12+
ccache \
13+
sudo \
14+
gdb
15+
16+
ENV RUST_CONFIGURE_ARGS \
17+
--build=x86_64-unknown-linux-gnu \
18+
--enable-debug \
19+
--enable-optimize
20+
ENV RUST_CHECK_TARGET ""
21+
RUN mkdir /tmp/obj
22+
RUN chmod 777 /tmp/obj
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++ \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
python2.7-minimal \
11+
git \
12+
cmake \
13+
ccache \
14+
sudo \
15+
gdb \
16+
llvm-3.7-tools \
17+
libedit-dev \
18+
zlib1g-dev
19+
20+
ENV RUST_CONFIGURE_ARGS \
21+
--build=x86_64-unknown-linux-gnu \
22+
--enable-rustbuild \
23+
--llvm-root=/usr/lib/llvm-3.7
24+
ENV RUST_CHECK_TARGET check
25+
RUN mkdir /tmp/obj
26+
RUN chmod 777 /tmp/obj
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++ \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
git \
11+
cmake \
12+
ccache \
13+
sudo \
14+
gdb
15+
16+
ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --disable-optimize-tests
17+
ENV RUST_CHECK_TARGET check
18+
RUN mkdir /tmp/obj
19+
RUN chmod 777 /tmp/obj
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++ \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
python-minimal \
11+
git \
12+
cmake \
13+
ccache \
14+
sudo \
15+
gdb
16+
17+
ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --enable-rustbuild
18+
ENV RUST_CHECK_TARGET check
19+
RUN mkdir /tmp/obj
20+
RUN chmod 777 /tmp/obj

‎src/ci/docker/x86_64-gnu/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++ \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
git \
11+
cmake \
12+
ccache \
13+
sudo \
14+
gdb
15+
16+
ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu
17+
ENV RUST_CHECK_TARGET check
18+
RUN mkdir /tmp/obj
19+
RUN chmod 777 /tmp/obj

‎src/ci/docker/x86_64-musl/Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++ \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
git \
11+
cmake \
12+
ccache \
13+
xz-utils \
14+
sudo \
15+
gdb
16+
17+
WORKDIR /build/
18+
COPY build-musl.sh /build/
19+
RUN sh /build/build-musl.sh && rm -rf /build
20+
21+
ENV RUST_CONFIGURE_ARGS \
22+
--target=x86_64-unknown-linux-musl \
23+
--musl-root=/musl-x86_64
24+
ENV RUST_CHECK_TARGET check-stage2-T-x86_64-unknown-linux-musl-H-x86_64-unknown-linux-gnu
25+
26+
RUN mkdir /tmp/obj
27+
RUN chmod 777 /tmp/obj
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/sh
2+
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
11+
12+
set -ex
13+
14+
export CFLAGS="-fPIC"
15+
MUSL=musl-1.1.14
16+
curl https://www.musl-libc.org/releases/$MUSL.tar.gz | tar xzf -
17+
cd $MUSL
18+
./configure --prefix=/musl-x86_64 --disable-shared
19+
make -j10
20+
make install
21+
make clean
22+
cd ..
23+
24+
# To build MUSL we're going to need a libunwind lying around, so acquire that
25+
# here and build it.
26+
curl -L https://github.com/llvm-mirror/llvm/archive/release_37.tar.gz | tar xzf -
27+
curl -L https://github.com/llvm-mirror/libunwind/archive/release_37.tar.gz | tar xzf -
28+
mkdir libunwind-build
29+
cd libunwind-build
30+
cmake ../libunwind-release_37 -DLLVM_PATH=/build/llvm-release_37 \
31+
-DLIBUNWIND_ENABLE_SHARED=0
32+
make -j10
33+
cp lib/libunwind.a /musl-x86_64/lib

‎src/ci/run.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/sh
2+
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
11+
12+
set -e
13+
14+
if [ "$LOCAL_USER_ID" != "" ]; then
15+
useradd --shell /bin/bash -u $LOCAL_USER_ID -o -c "" -m user
16+
export HOME=/home/user
17+
export LOCAL_USER_ID=
18+
exec sudo -E -u user env PATH=$PATH "$0"
19+
fi
20+
21+
if [ "$NO_LLVM_ASSERTIONS" = "" ]; then
22+
LLVM_ASSERTIONS=--enable-llvm-assertions
23+
fi
24+
25+
set -ex
26+
27+
$SRC/configure \
28+
--disable-manage-submodules \
29+
--enable-debug-assertions \
30+
--enable-quiet-tests \
31+
--enable-ccache \
32+
--enable-vendor \
33+
$LLVM_ASSERTIONS \
34+
$RUST_CONFIGURE_ARGS
35+
36+
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
37+
ncpus=$(sysctl -n hw.ncpu)
38+
else
39+
ncpus=$(nproc)
40+
fi
41+
42+
make -j $ncpus tidy
43+
make -j $ncpus
44+
exec make $RUST_CHECK_TARGET -j $ncpus

‎src/test/debuginfo/vec-slices.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@
2121

2222
// gdb-command:print singleton.length
2323
// gdb-check:$2 = 1
24-
// gdbg-command:print *((int64_t[1]*)(singleton.data_ptr))
24+
// gdbg-command:print *((i64[1]*)(singleton.data_ptr))
2525
// gdbr-command:print *(singleton.data_ptr as &[i64; 1])
2626
// gdbg-check:$3 = {1}
2727
// gdbr-check:$3 = [1]
2828

2929
// gdb-command:print multiple.length
3030
// gdb-check:$4 = 4
31-
// gdbg-command:print *((int64_t[4]*)(multiple.data_ptr))
31+
// gdbg-command:print *((i64[4]*)(multiple.data_ptr))
3232
// gdbr-command:print *(multiple.data_ptr as &[i64; 4])
3333
// gdbg-check:$5 = {2, 3, 4, 5}
3434
// gdbr-check:$5 = [2, 3, 4, 5]
3535

3636
// gdb-command:print slice_of_slice.length
3737
// gdb-check:$6 = 2
38-
// gdbg-command:print *((int64_t[2]*)(slice_of_slice.data_ptr))
38+
// gdbg-command:print *((i64[2]*)(slice_of_slice.data_ptr))
3939
// gdbr-command:print *(slice_of_slice.data_ptr as &[i64; 2])
4040
// gdbg-check:$7 = {3, 4}
4141
// gdbr-check:$7 = [3, 4]
@@ -61,14 +61,14 @@
6161
// gdbg-command:print 'vec_slices::MUT_VECT_SLICE'.length
6262
// gdbr-command:print MUT_VECT_SLICE.length
6363
// gdb-check:$14 = 2
64-
// gdbg-command:print *((int64_t[2]*)('vec_slices::MUT_VECT_SLICE'.data_ptr))
64+
// gdbg-command:print *((i64[2]*)('vec_slices::MUT_VECT_SLICE'.data_ptr))
6565
// gdbr-command:print *(MUT_VECT_SLICE.data_ptr as &[i64; 2])
6666
// gdbg-check:$15 = {64, 65}
6767
// gdbr-check:$15 = [64, 65]
6868

6969
//gdb-command:print mut_slice.length
7070
//gdb-check:$16 = 5
71-
//gdbg-command:print *((int64_t[5]*)(mut_slice.data_ptr))
71+
//gdbg-command:print *((i64[5]*)(mut_slice.data_ptr))
7272
//gdbr-command:print *(mut_slice.data_ptr as &[i64; 5])
7373
//gdbg-check:$17 = {1, 2, 3, 4, 5}
7474
//gdbr-check:$17 = [1, 2, 3, 4, 5]

0 commit comments

Comments
 (0)
Please sign in to comment.