rust/src/ci/docker
Corey Farwell c9737af4ed Rollup merge of #39754 - alexcrichton:less-assertions, r=brson
travis: Add builders without assertions

This commit adds three new builders, one OSX, one Linux, and one MSVC, which
will produce "nightlies" with LLVM assertions disabled. Currently all nightly
releases have LLVM assertions enabled to catch bugs before they reach the
beta/stable channels. The beta/stable channels, however, do not have LLVM
assertions enabled.

Unfortunately though projects like Servo are stuck on nightlies for the near
future at least and are also suffering very long compile times. The purpose of
this commit is to provide artifacts to these projects which are not distributed
through normal channels (e.g. rustup) but are provided for developers to use
locally if need be.

Logistically these builds will all be uploaded to `rustc-builds-alt` instead of
the `rustc-builds` folder of the `rust-lang-ci` bucket. These builds will stay
there forever (until cleaned out if necessary) and there are no plans to
integrate this with rustup and/or the official release process.
2017-02-14 10:07:31 -05:00
..
android Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
armhf-gnu Add support for test suites emulated in QEMU 2017-01-29 14:16:41 -08:00
cross Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
dist-arm-linux Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
dist-armv7-aarch64-linux Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
dist-freebsd Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
dist-mips-linux Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
dist-mips64-linux Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
dist-powerpc-linux Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
dist-powerpc64-linux Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
dist-s390x-linux-netbsd Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
dist-x86-linux Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
emscripten More test fixes from rollup 2017-01-20 13:49:16 -08:00
i686-gnu Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
i686-gnu-nopt travis: Remove extraneous /tmp/obj dirs 2016-12-26 23:04:39 -08:00
linux-tested-targets Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
x86_64-gnu Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
x86_64-gnu-aux Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
x86_64-gnu-debug travis: Start uploading artifacts on commits 2017-01-12 15:29:04 -08:00
x86_64-gnu-distcheck Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
x86_64-gnu-full-bootstrap travis: Start uploading artifacts on commits 2017-01-12 15:29:04 -08:00
x86_64-gnu-incremental travis: Gate on some minimal support for incremental compilation. 2017-01-18 12:06:22 -05:00
x86_64-gnu-llvm-3.7 travis: Remove extraneous /tmp/obj dirs 2016-12-26 23:04:39 -08:00
x86_64-gnu-nopt travis: Remove extraneous /tmp/obj dirs 2016-12-26 23:04:39 -08:00
README.md travis: move IBM backwards in time 2017-01-28 21:25:11 -08:00
run.sh travis: Add builders without assertions 2017-02-11 17:38:09 -08:00

Docker images for CI

This folder contains a bunch of docker images used by the continuous integration (CI) of Rust. An script is accompanied (run.sh) with these images to actually execute them. To test out an image execute:

./src/ci/docker/run.sh $image_name

for example:

./src/ci/docker/run.sh x86_64-gnu

Images will output artifacts in an obj dir at the root of a repository.

Cross toolchains

A number of these images take quite a long time to compile as they're building whole gcc toolchains to do cross builds with. Much of this is relatively self-explanatory but some images use crosstool-ng which isn't quite as self explanatory. Below is a description of where these *.config files come form, how to generate them, and how the existing ones were generated.

Generating a .config file

If you have a linux-cross image lying around you can use that and skip the next two steps.

  • First we spin up a container and copy build_toolchain_root.sh into it. All these steps are outside the container:
# Note: We use ubuntu:15.10 because that's the "base" of linux-cross Docker
# image
$ docker run -it ubuntu:15.10 bash
$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
cfbec05ed730        ubuntu:15.10        "bash"              16 seconds ago      Up 15 seconds                           drunk_murdock
$ docker cp build_toolchain_root.sh drunk_murdock:/
  • Then inside the container we build crosstool-ng by simply calling the bash script we copied in the previous step:
$ bash build_toolchain_root.sh
  • Now, inside the container run the following command to configure the toolchain. To get a clue of which options need to be changed check the next section and come back.
$ ct-ng menuconfig
  • Finally, we retrieve the .config file from the container and give it a meaningful name. This is done outside the container.
$ docker drunk_murdock:/.config arm-linux-gnueabi.config
  • Now you can shutdown the container or repeat the two last steps to generate a new .config file.

Toolchain configuration

Changes on top of the default toolchain configuration used to generate the .config files in this directory. The changes are formatted as follows:

$category > $option = $value -- $comment

arm-linux-gnueabi.config

For targets: arm-unknown-linux-gnueabi

  • Path and misc options > Prefix directory = /x-tools/${CT_TARGET}
  • Target options > Target Architecture = arm
  • Target options > Architecture level = armv6 -- (+)
  • Target options > Floating point = software (no FPU) -- (*)
  • Operating System > Target OS = linux
  • Operating System > Linux kernel version = 3.2.72 -- Precise kernel
  • C-library > glibc version = 2.14.1
  • C compiler > gcc version = 4.9.3
  • C compiler > C++ = ENABLE -- to cross compile LLVM

arm-linux-gnueabihf.config

For targets: arm-unknown-linux-gnueabihf

  • Path and misc options > Prefix directory = /x-tools/${CT_TARGET}
  • Target options > Target Architecture = arm
  • Target options > Architecture level = armv6 -- (+)
  • Target options > Use specific FPU = vfp -- (+)
  • Target options > Floating point = hardware (FPU) -- (*)
  • Target options > Default instruction set mode = arm -- (+)
  • Operating System > Target OS = linux
  • Operating System > Linux kernel version = 3.2.72 -- Precise kernel
  • C-library > glibc version = 2.14.1
  • C compiler > gcc version = 4.9.3
  • C compiler > C++ = ENABLE -- to cross compile LLVM

armv7-linux-gnueabihf.config

For targets: armv7-unknown-linux-gnueabihf

  • Path and misc options > Prefix directory = /x-tools/${CT_TARGET}
  • Target options > Target Architecture = arm
  • Target options > Suffix to the arch-part = v7
  • Target options > Architecture level = armv7-a -- (+)
  • Target options > Use specific FPU = vfpv3-d16 -- (*)
  • Target options > Floating point = hardware (FPU) -- (*)
  • Target options > Default instruction set mode = thumb -- (*)
  • Operating System > Target OS = linux
  • Operating System > Linux kernel version = 3.2.72 -- Precise kernel
  • C-library > glibc version = 2.14.1
  • C compiler > gcc version = 4.9.3
  • C compiler > C++ = ENABLE -- to cross compile LLVM

(*) These options have been selected to match the configuration of the arm toolchains shipped with Ubuntu 15.10 (+) These options have been selected to match the gcc flags we use to compile C libraries like jemalloc. See the mk/cfg/arm(v7)-uknown-linux-gnueabi{,hf}.mk file in Rust's source code.

aarch64-linux-gnu.config

For targets: aarch64-unknown-linux-gnu

  • Path and misc options > Prefix directory = /x-tools/${CT_TARGET}
  • Target options > Target Architecture = arm
  • Target options > Bitness = 64-bit
  • Operating System > Target OS = linux
  • Operating System > Linux kernel version = 4.2.6
  • C-library > glibc version = 2.17 -- aarch64 support was introduced in this version
  • C compiler > gcc version = 5.2.0
  • C compiler > C++ = ENABLE -- to cross compile LLVM

powerpc-linux-gnu.config

For targets: powerpc-unknown-linux-gnu

  • Path and misc options > Prefix directory = /x-tools/${CT_TARGET}
  • Path and misc options > Patches origin = Bundled, then local
  • Path and misc options > Local patch directory = /tmp/patches
  • Target options > Target Architecture = powerpc
  • Target options > Emit assembly for CPU = power4 -- (+)
  • Target options > Tune for CPU = power6 -- (+)
  • Operating System > Target OS = linux
  • Operating System > Linux kernel version = 2.6.32.68 -- ~RHEL6 kernel
  • C-library > glibc version = 2.12.2 -- ~RHEL6 glibc
  • C compiler > gcc version = 4.9.3
  • C compiler > Core gcc extra config = --with-cpu-32=power4 --with-cpu=default32 -- (+)
  • C compiler > gcc extra config = --with-cpu-32=power4 --with-cpu=default32 -- (+)
  • C compiler > C++ = ENABLE -- to cross compile LLVM

(+) These CPU options match the configuration of the toolchains in RHEL6.

powerpc64-linux-gnu.config

For targets: powerpc64-unknown-linux-gnu

  • Path and misc options > Prefix directory = /x-tools/${CT_TARGET}
  • Path and misc options > Patches origin = Bundled, then local
  • Path and misc options > Local patch directory = /tmp/patches
  • Target options > Target Architecture = powerpc
  • Target options > Bitness = 64-bit
  • Target options > Emit assembly for CPU = power4 -- (+)
  • Target options > Tune for CPU = power6 -- (+)
  • Operating System > Target OS = linux
  • Operating System > Linux kernel version = 2.6.32.68 -- ~RHEL6 kernel
  • C-library > glibc version = 2.12.2 -- ~RHEL6 glibc
  • C compiler > gcc version = 4.9.3
  • C compiler > C++ = ENABLE -- to cross compile LLVM

(+) These CPU options match the configuration of the toolchains in RHEL6.

s390x-linux-gnu.config

For targets: s390x-unknown-linux-gnu

  • Path and misc options > Prefix directory = /x-tools/${CT_TARGET}
  • Path and misc options > Patches origin = Bundled, then local
  • Path and misc options > Local patch directory = /build/patches
  • Target options > Target Architecture = s390
  • Target options > Bitness = 64-bit
  • Operating System > Target OS = linux
  • Operating System > Linux kernel version = 2.6.32.68 -- ~RHEL6 kernel
  • C-library > glibc version = 2.12.2 -- ~RHEL6 glibc
  • C compiler > gcc version = 4.9.3
  • C compiler > gcc extra config = --with-arch=z10 -- LLVM's minimum support
  • C compiler > C++ = ENABLE -- to cross compile LLVM