Commit Graph

207 Commits

Author SHA1 Message Date
kennytm
2ccf71c3b2
Migrate the toolstate update bot to rust-highfive 2018-05-14 22:34:53 +08:00
Alex Crichton
7e5b9ac41e ci: Compile LLVM with Clang 6.0.0
Currently on CI we predominately compile LLVM with the default system compiler
which means gcc on Linux, some version of Clang on OSX, MSVC on Windows, and
gcc on MinGW. This commit switches Linux, OSX, and Windows to all use Clang
6.0.0 to build LLVM (aka the C/C++ compiler as part of the bootstrap). This
looks to generate faster code according to #49879 which translates to a faster
rustc (as LLVM internally is faster)

The major changes here were to the containers that build Linux releases,
basically adding a new step that uses the previous gcc 4.8 compiler to compile
the next Clang 6.0.0 compiler. Otherwise the OSX and Windows scripts have been
updated to download precompiled versions of Clang 6 and configure the build to
use them.

Note that `cc` was updated here to fix using `clang-cl` with `cc-rs` on MSVC, as
well as an update to `sccache` on Windows which was needed to correctly work
with `clang-cl`. Finally the MinGW compiler is entirely left out here
intentionally as it's currently thought that Clang can't generate C++ code for
MinGW and we need to use gcc, but this should be verified eventually.
2018-05-09 14:45:34 -07:00
Mark Simulacrum
de345332b5 Add check builder for Windows to Travis 2018-04-12 11:09:31 -06:00
kennytm
649f431acf
Give a name to every CI job.
Bots that read the log can simply look for `[CI_JOB_NAME=...]` to find out
the job's name.
2018-04-06 01:09:59 +08:00
Alex Crichton
621ccf8917 ci: Remove x86_64-gnu-incremental builder
This builder is starting to time out frequently causing PRs to bounce and
otherwise doesn't seem to be catching too many bugs, so this commit removes it
entirely. We've had a number of timeouts in the last few weeks related to this
builder:

* https://travis-ci.org/rust-lang/rust/jobs/360947582
* https://travis-ci.org/rust-lang/rust/jobs/360464190
* https://travis-ci.org/rust-lang/rust/jobs/359946975
* https://travis-ci.org/rust-lang/rust/jobs/361213241
* https://travis-ci.org/rust-lang/rust/jobs/362346279
* https://travis-ci.org/rust-lang/rust/jobs/362072331

On a good run this builder takes about 2h15m, which is already too long for
Travis and the variable build times end up pushing it beyond the 3h limit
occasionally.

The timeouts here are somewhat expected in that an incrementally compiled rustc
compiler isn't optimized like a normal rustc, disallowing inlining between
codegen units and losing lots of optimization opportunities.
2018-04-04 17:35:42 -07:00
Alex Crichton
64f7e11fc3 Update sccache to its master branch
Ideally I'd like to soon enable sccache for rustbuild itself and some of the
stage0 tools, but for that to work we'll need some better Rust support than the
pretty old version we were previously using!
2018-04-02 12:24:50 -07:00
Alex Crichton
a09e9e9a2a ci: Don't use Travis caches for docker images
This commit moves away from caching on Travis to our own caching on S3 for
caching docker layers between builds. Unfortunately the Travis caches have over
time had a few critical pain points:

* Caches are only updated for successful builds, meaning that if a build times
  out or fails in a different location the sucessfully-created docker images
  isn't always cached. While this makes sense as a general rule of caches it
  hurts our use cases.

* Caches are per-branch and builder which means that we don't have a separate
  cache on each release channel. All our merges go through the `auto` branch
  which means that they're all sharing the same cache, even those for merging to
  master/beta. This means that PRs which switch between master/beta will keep
  rebuilting and having cache misses.

* Caches have historically been invaliated somewhat regularly a little more
  aggressively than we'd want (I think).

* We don't always need to update the contents of the cache if the Docker image
  didn't change at all, and saving off the docker layers can sometimes be quite
  expensive.

For all these reasons this commit drops the usage of Travis's built-in caching
support. Instead our own caching is used by storing blobs to S3. Normally this
would be a very risky endeavour but we're basically priming a cache for a cache
(docker) so if we get this wrong the failure mode is longer builds, not stale
caches. We'll notice that pretty quickly and hopefully fix it!

The logic here is inserted directly into the `src/ci/docker/run.sh` script to
download an image based on a shasum of the `Dockerfile` and other assorted files.
This blob, if found, is loaded into docker and we record what layers were
inserted. After docker finishes the build (hopefully quickly with lots of cache
hits) we then see the sha of the final image. If it's one of the layers we
loaded then there's no need to update the cache. Otherwise we upload our layers
to the global cache, possibly overwriting what we previously just downloaded.

This is hopefully a step towards mitigating #49278 although it doesn't
completely fix it as it means we'll still probably have to retry builds that
bust the cache.
2018-03-22 18:31:45 -07:00
kennytm
c7bdd371a6
Revert "Apply a fix to travis-ci/dpl#788 manually until dpl 1.9.5 is released."
This reverts commit 20e65f11f3.
2018-03-21 22:03:24 +08:00
kennytm
20e65f11f3
Apply a fix to travis-ci/dpl#788 manually until dpl 1.9.5 is released. 2018-03-21 06:07:24 +08:00
bors
5f2efb0935 Auto merge of #48907 - kennytm:minor-ci-stuff, r=alexcrichton
Some minor CI changes

1. On macOS, ensure crash log printing won't error, and only real crash logs are printed. This may avoid the `find` process exiting abnormally and truncated the Travis log (I guess).

2. Print `/proc/cpuinfo` and `/proc/meminfo`. To determine if there's any variation in the reported clock rate between jobs.
2018-03-11 13:40:13 +00:00
bors
e5acb0c8f6 Auto merge of #48799 - alexcrichton:more-osx-cores, r=Mark-Simulacrum
travis: Upgrade OSX builders

This upgrades the OSX builders to the `xcode9.3-moar` image which has 3 cores as
opposed to the 2 that our builders currently have. Should help make those OSX
builds a bit speedier!
2018-03-11 09:43:50 +00:00
kennytm
b8cd6e5d7b
Prevents the crash log printer on macOS from crashing the entire job. 2018-03-10 19:57:02 +08:00
Alex Crichton
d65dfd13ec travis: Upgrade dist builders for OSX
This commit upgrades the dist builders for OSX to Travis's new `xcode9.3-moar`
image which has 3 cores available to it instead of 2. This should help us
provide speedier builds on OSX and hit timeouts less in theory!

Note that historically the dist builders for OSX have been a different version
than the ones that are running tests. I had forgotten why this was the case and
digging around brought up 307615567 where apparently Xcode 8 wasn't able to
compile LLVM with `MACOSX_DEPLOYMENT_TARGET=10.7` which we desired. On a whim I
gave this PR a spin and it [looks like][green] this has since been fixed (maybe
in LLVM?). In any case those green builds should hopefully mean that we can
safely upgrade and get faster infrastructure to boot.

This commit also includes an upgrade of OpenSSL. This is not done for security
reasons but rather build system reasons. Originally builds with the new image
[did not succeed][red] due to weird build failures in OpenSSL, but upgrading
seems to have made the spurious errors go away to here's to also hoping that's
fixed!

[green]: https://travis-ci.org/rust-lang/rust/builds/351353412
[red]: https://travis-ci.org/rust-lang/rust/builds/350969248
2018-03-09 13:03:13 -08:00
Alex Crichton
55a2fdf2cf travis: Upgrade OSX builders
This upgrades the OSX builders to the `xcode9.3-moar` image which has 3 cores as
opposed to the 2 that our builders currently have. Should help make those OSX
builds a bit speedier!
2018-03-07 10:47:38 -08:00
Alex Crichton
d69b24805b rust: Import LLD for linking wasm objects
This commit imports the LLD project from LLVM to serve as the default linker for
the `wasm32-unknown-unknown` target. The `binaryen` submoule is consequently
removed along with "binaryen linker" support in rustc.

Moving to LLD brings with it a number of benefits for wasm code:

* LLD is itself an actual linker, so there's no need to compile all wasm code
  with LTO any more. As a result builds should be *much* speedier as LTO is no
  longer forcibly enabled for all builds of the wasm target.
* LLD is quickly becoming an "official solution" for linking wasm code together.
  This, I believe at least, is intended to be the main supported linker for
  native code and wasm moving forward. Picking up support early on should help
  ensure that we can help LLD identify bugs and otherwise prove that it works
  great for all our use cases!
* Improvements to the wasm toolchain are currently primarily focused around LLVM
  and LLD (from what I can tell at least), so it's in general much better to be
  on this bandwagon for bugfixes and new features.
* Historical "hacks" like `wasm-gc` will soon no longer be necessary, LLD
  will [natively implement][gc] `--gc-sections` (better than `wasm-gc`!) which
  means a postprocessor is no longer needed to show off Rust's "small wasm
  binary size".

LLD is added in a pretty standard way to rustc right now. A new rustbuild target
was defined for building LLD, and this is executed when a compiler's sysroot is
being assembled. LLD is compiled against the LLVM that we've got in tree, which
means we're currently on the `release_60` branch, but this may get upgraded in
the near future!

LLD is placed into rustc's sysroot in a `bin` directory. This is similar to
where `gcc.exe` can be found on Windows. This directory is automatically added
to `PATH` whenever rustc executes the linker, allowing us to define a `WasmLd`
linker which implements the interface that `wasm-ld`, LLD's frontend, expects.

Like Emscripten the LLD target is currently only enabled for Tier 1 platforms,
notably OSX/Windows/Linux, and will need to be installed manually for compiling
to wasm on other platforms. LLD is by default turned off in rustbuild, and
requires a `config.toml` option to be enabled to turn it on.

Finally the unstable `#![wasm_import_memory]` attribute was also removed as LLD
has a native option for controlling this.

[gc]: https://reviews.llvm.org/D42511
2018-03-03 20:21:35 -08:00
kennytm
e18105079e
Submit a comment to the PR in additional to pushing a commit.
Fix rust-lang-nursery/rust-toolstate#2.
2018-02-23 03:30:10 +08:00
kennytm
bf69b0feed
Upgrade the Travis CI macOS images for testing from Xcode 8.3 to 9.2. 2018-02-11 14:28:28 +08:00
Alex Crichton
c6daea7c9a rustc: Split Emscripten to a separate codegen backend
This commit introduces a separately compiled backend for Emscripten, avoiding
compiling the `JSBackend` target in the main LLVM codegen backend. This builds
on the foundation provided by #47671 to create a new codegen backend dedicated
solely to Emscripten, removing the `JSBackend` of the main codegen backend in
the process.

A new field was added to each target for this commit which specifies the backend
to use for translation, the default being `llvm` which is the main backend that
we use. The Emscripten targets specify an `emscripten` backend instead of the
main `llvm` one.

There's a whole bunch of consequences of this change, but I'll try to enumerate
them here:

* A *second* LLVM submodule was added in this commit. The main LLVM submodule
  will soon start to drift from the Emscripten submodule, but currently they're
  both at the same revision.
* Logic was added to rustbuild to *not* build the Emscripten backend by default.
  This is gated behind a `--enable-emscripten` flag to the configure script. By
  default users should neither check out the emscripten submodule nor compile
  it.
* The `init_repo.sh` script was updated to fetch the Emscripten submodule from
  GitHub the same way we do the main LLVM submodule (a tarball fetch).
* The Emscripten backend, turned off by default, is still turned on for a number
  of targets on CI. We'll only be shipping an Emscripten backend with Tier 1
  platforms, though. All cross-compiled platforms will not be receiving an
  Emscripten backend yet.

This commit means that when you download the `rustc` package in Rustup for Tier
1 platforms you'll be receiving two trans backends, one for Emscripten and one
that's the general LLVM backend. If you never compile for Emscripten you'll
never use the Emscripten backend, so we may update this one day to only download
the Emscripten backend when you add the Emscripten target. For now though it's
just an extra 10MB gzip'd.

Closes #46819
2018-01-28 18:32:45 -08:00
Marco A L Barbosa
882cd3cf0b Add i586-unknown-linux-musl target 2018-01-11 15:57:28 -02:00
kennytm
8ed16fe47a
Requires tools to test-pass if the corresponding submodule is updated.
If a PR intends to update a tool but its test has failed, abort the merge
regardless of current channel. This should help the tool maintainers if the
update turns out to be failing due to changes in latest master.
2017-12-30 17:15:40 +08:00
bors
503153e950 Auto merge of #46554 - kennytm:45861-step-4-5-6-7-upload-test-result-and-remove-toolstate-toml, r=alexcrichton
[auto-toolstate] Upload the toolstate result to an external git repository, and removes BuildExpectation

This PR consists of 3 commits.

1. (Steps 4–6) The `toolstate.json` output previously collected is now pushed to the https://github.com/rust-lang-nursery/rust-toolstate repository.
2. (Step 7) Revert commit ab018c7, thus removing all traces of `BuildExpectation` and `toolstate.toml`.
3. (Step 8) Adjust CONTRIBUTION.md for the new procedure.

These are the last steps of #45861. After this PR, the toolstate will be automatically computed and published to https://rust-lang-nursery.github.io/rust-toolstate/. There is no need to manage toolstate.toml again.

Closes #45861.
2017-12-26 18:03:00 +00:00
kennytm
44954ab52d
Clarify toolstate names. Move publish.py to a more convenient location. 2017-12-27 00:00:46 +08:00
kennytm
519f92f2aa
Upload the toolstate to the remote repository. 2017-12-27 00:00:45 +08:00
kennytm
472a3c104b
Follow up to #46924
It seems using `fe80::/64` causes `docker start` to fail with "Address
already in use". Try to change to a unique local address range instead.
2017-12-26 02:36:17 +08:00
kennytm
8d76e281bf
Enable IPv6 support in Dockers to workaround travis-ci/travis-ci#8891. 2017-12-23 18:12:01 +08:00
kennytm
2352a888a1
Revert "Temporarily use the old Travis image."
This reverts commit c0c26a649e.
2017-12-23 18:10:36 +08:00
bors
2974104276 Auto merge of #45002 - oli-obk:miri, r=eddyb
Validate miri against the HIR const evaluator

r? @eddyb

cc @alexcrichton @arielb1 @RalfJung

The interesting parts are the last few functions in `librustc_const_eval/eval.rs`

* We warn if miri produces an error while HIR const eval does not.
* We warn if miri produces a value that does not match the value produced by HIR const eval
* if miri succeeds and HIR const eval fails, nothing is emitted, but we still return the HIR error
* if both error, nothing is emitted and the HIR const eval error is returned

So there are no actual changes, except that miri is forced to produce the same values as the old const eval.

* This does **not** touch the const evaluator in trans at all. That will come in a future PR.
* This does **not** cause any code to compile that didn't compile before. That will also come in the future

It would be great if someone could start a crater run if travis passes
2017-12-14 15:37:39 +00:00
kennytm
c0c26a649e
Temporarily use the old Travis image.
Use it until travis-ci/travis-ci#8891 is fixed.
2017-12-13 04:23:12 +08:00
Oliver Schneider
acac58502b
Move large chunks of miri from rustc::mir::interpret to rustc_mir::interpret 2017-12-12 17:27:07 +01:00
Oliver Schneider
acdf83f228
Update miri to rustc changes 2017-12-06 09:25:29 +01:00
Marco A L Barbosa
79b47a1f26 Rename cross(2) builder to dist-various-{1,2}
Follows the convention of the other builders.
2017-12-04 16:38:19 -02:00
kennytm
128199e39c
Move the swap the tools test and cargotest within check-aux.
The cargotest job is renamed to tools for clarification.
2017-12-03 18:36:56 +08:00
bors
78fcf33883 Auto merge of #46366 - kennytm:revert-46360, r=kennytm
Revert #46360, re-enable macOS dist images.

This PR reverts #46360, which disabled all macOS dist images to workaround travis-ci/travis-ci#8821.

This PR should be merged as soon as the Travis bug has been fixed.

Closes #46357.

cc @rust-lang/infra
2017-11-30 01:28:44 +00:00
kennytm
6b5f430a6c
Revert "Auto merge of #46360 - kennytm:workaround-travis-8821, r=kennytm"
This reverts commit dc0e227745, reversing
changes made to 77ab3a1d5f.

[skip ci]
2017-11-29 21:03:53 +08:00
bors
0a2e9ade83 Auto merge of #46362 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests

- Successful merges: #45969, #46077, #46219, #46287, #46293, #46322, #46323, #46330, #46354, #46356
- Failed merges:
2017-11-29 12:17:45 +00:00
kennytm
9a93df9b58 Rollup merge of #46354 - Mark-Simulacrum:alt-try, r=alexcrichton
Deploy builds both with asserts enabled and asserts disabled to CI.

This also removes uploads to the 'try' bucket, and instead dumps
everything into the two rustc-builds and rustc-builds-alt buckets. This
makes lives easier, as there is only one location for a given "type" of
build, and since we have the git commit hash in the filenames, this is
fine; we won't run into uploads of the same commit.

cc @aidanhs -- this will break crater's logic for downloading `try#xxx` commits since the try bucket won't be uploaded into

r? @alexcrichton
2017-11-29 18:37:53 +08:00
kennytm
1e49d4a6cd Rollup merge of #46330 - SimonSapin:patch-6, r=kennytm
Update comment on alternate builds in .travis.yml

https://github.com/rust-lang/rust/pull/45810#issuecomment-347257640
2017-11-29 18:37:52 +08:00
kennytm
666c24136b
Disable all macOS dist images to workaround travis-ci/travis-ci#8821
[skip ci]
2017-11-29 17:39:36 +08:00
Mark Simulacrum
2485afa123 Deploy builds both with asserts enabled and asserts disabled to CI.
This also removes uploads to the 'try' bucket, and instead dumps
everything into the two rustc-builds and rustc-builds-alt buckets. This
makes lives easier, as there is only one location for a given "type" of
build, and since we have the git commit hash in the filenames, this is
fine; we won't run into uploads of the same commit.
2017-11-28 19:55:19 -07:00
Alex Crichton
73970bf6f2 ci: Start running wasm32 tests on Travis
This commit allocates a builder to running wasm32 tests on Travis. Not all test
suites pass right now so this is starting out with just the run-pass and the
libcore test suites. This'll hopefully give us a pretty broad set of coverage
for integration in rustc itself as well as a somewhat broad coverage of the llvm
backend itself through integration/unit tests.
2017-11-28 09:27:35 -08:00
Simon Sapin
a6d1895404
Update comment on alternate builds in .travis.yml
https://github.com/rust-lang/rust/pull/45810#issuecomment-347257640
2017-11-28 14:26:59 +01:00
kennytm
cd57b761ce
Travis/macOS: Improve crash log collection accuracy. 2017-11-16 01:06:53 +08:00
bors
b7ccb0a5a7 Auto merge of #45810 - SimonSapin:ac-dc, r=aturon
Disable LLVM assertions on Nightly, enable them in "alt" builds.

Per IRC discussion https://mozilla.logbot.info/rust-infra/20171106#c13812170-c13812204

Background: https://internals.rust-lang.org/t/disabling-llvm-assertions-in-nightly-builds/5388/14
2017-11-13 11:46:55 +00:00
Simon Sapin
8b8bdb63a4 Make the try branch use alternate builds. 2017-11-11 23:31:41 +01:00
kennytm
eee10cc482
Try to print the crash logs on macOS on failure.
An attempt to debug #45230.
2017-11-06 03:53:42 +08:00
kennytm
9cfdabaf3c
Force gem update --system before deployment.
Try to prevent #44159.
2017-11-06 03:53:41 +08:00
Simon Sapin
f4f18586e7 Move cargotest to separate jobs on Travis-CI and AppVeyor 2017-10-23 13:12:12 +02:00
kennytm
c77068a94b Rollup merge of #45326 - cuviper:min-llvm-3.9, r=alexcrichton
Bump the minimum LLVM to 3.9

Old LLVM bugs are reportedly cropping up harder, but 3.9 seems to be OK.

Fixes #45277.
2017-10-19 01:59:52 +08:00
Josh Stone
68311bdf2b Bump the minimum LLVM to 3.9
Old LLVM bugs are reportedly cropping up harder, but 3.9 seems to be OK.

Fixes #45277.
2017-10-16 13:10:16 -07:00
Alex Crichton
978349ea43 ci: Update Travis OSX builders
Looks like Travis [has announced][blog] that our current `xcode8.2` image is
being deprecated and the recommended Xcode 7 image is `xcode7.3`. This updates
us to these ahead of time to make sure we can shake out any bugs, if any.

[blog]: https://blog.travis-ci.com/2017-10-16-a-new-default-os-x-image-is-coming
2017-10-16 08:27:03 -07:00