Commit graph

56 commits

Author SHA1 Message Date
Pietro Albini
75dfdcb065
ci: download awscli from our mirror
This fixes multiple network issues we had when downloading awscli from
PyPI on Azure Pipelines by vendoring awscli itself and its dependencies
in our S3 bucket. Instructions on how to update the cache are present at
the top of src/ci/install-awscli.sh
2019-07-27 22:19:00 +02:00
Mazdak Farrokhzad
0222498610
Rollup merge of #63007 - pietroalbini:debug-awscli-install, r=Mark-Simulacrum
ci: debug network failures while downloading awscli from PyPI

This adds some random debug code to our CI script while downloading awscli, to *hopefully* pinpoint what's causing the network failures.

r? @Mark-Simulacrum
cc #62967
2019-07-26 18:57:06 +02:00
Pietro Albini
fb9f3e6dec
ci: add debug checks for pypi network outages 2019-07-26 18:51:01 +02:00
Mazdak Farrokhzad
5ef2162fb1
Rollup merge of #62758 - alexcrichton:llvm-tarball-windows, r=pietroalbini
ci: Install clang on Windows through tarballs

Previously we used the executables built the LLVM project but these
executables are difficult to run in a CI environment, they can
accidentally pollute global state, etc. In testing some of the possible
4-core machine environments for Azure this step would frequently cause
issues.

To assuage these future issues and hopefully make builds slightly more
self-contained, this commit changes to install from a tarball instead.
The tarball isn't provided by LLVM itself, but we use the offical LLVM
installer to extract itself and then we pack up the LLVM installation
directory into the tarball.
2019-07-25 01:04:57 +02:00
Pietro Albini
ace3684286
ci: pin awscli dependencies
docutils 0.15, a dependency of awscli, broke our CI since it's not
compatible with Python 2 due to a bug. This pins all the dependencies of
awscli with docutils 0.14, to make sure this kind of regressions doesn't
happen again.
2019-07-21 20:56:08 +02:00
Alex Crichton
9b4f6de7a4 azure: Prepare configuration for 4-core machines
This commit updates some of our assorted Azure/CI configuration to
prepare for some 4-core machines coming online. We're still in the
process of performance testing them to get final numbers, but some
changes are worth landing ahead of this. The updates here are:

* Use `C:/` instead of `D:/` for submodule checkout since it should have
  plenty of space and the 4-core machines won't have `D:/`

* Update `lzma-sys` to 0.1.14 which has support for VS2019, where 0.1.10
  doesn't.

* Update `src/ci/docker/run.sh` to work when it itself is running inside
  of a docker container (see the comment in the file for more info)

* Print step timings on the `try` branch in addition to the `auto`
  branch in. The logs there should be seen by similarly many humans (not
  many) and can be useful for performance analysis after a `try` build
  runs.

* Install the WIX and InnoSetup tools manually on Windows instead of
  relying on pre-installed copies on the VM. This gives us more control
  over what's being used on the Azure cloud right now (we control the
  version) and in the 4-core machines these won't be pre-installed. Note
  that on AppVeyor we actually already were installing InnoSetup, we
  just didn't carry that over on Azure!
2019-07-19 06:49:19 -07:00
Alex Crichton
795f93b8af ci: Install clang on Windows through tarballs
Previously we used the executables built the LLVM project but these
executables are difficult to run in a CI environment, they can
accidentally pollute global state, etc. In testing some of the possible
4-core machine environments for Azure this step would frequently cause
issues.

To assuage these future issues and hopefully make builds slightly more
self-contained, this commit changes to install from a tarball instead.
The tarball isn't provided by LLVM itself, but we use the offical LLVM
installer to extract itself and then we pack up the LLVM installation
directory into the tarball.
2019-07-17 09:28:02 -07:00
bors
fa6b70658e Auto merge of #62560 - pietroalbini:tools-builders-on-prs, r=alexcrichton
ci: add a pr builder to test tools when submodules are updated

This PR adds the x86_64-gnu-tools builders to PRs where submodules are updated.

Since it's not possible to *start* the builder only when submodule changes are detected, I opted into adding a "decider" task at the start of the job which sets the `SKIP_JOB` environment variable when submodules are not updated, and I gated the most time-consuming tasks (the actual build and artifacts upload) on the variable not being there. All of this is conditionally included in the `steps/run.yml` only when a template parameter is present, so it should only affect that builder on PRs.

The cost for this should be a dummy builder running for 2/3 minutes for each PR, and we should be able to handle it.

Fixes https://github.com/rust-lang/rust/issues/61837
r? @alexcrichton
2019-07-14 00:20:54 +00:00
Pietro Albini
2d2dcb0dc7
ci: add a pr builder to test tools when submodules are updated
The builder will skip time consuming tasks (like the actual tests) when
it detects no updated submodules.
2019-07-10 16:14:25 +02:00
Mark Rousskov
df725c28d6 Ensure that checkout is with \n line endings
During installation of mingw, at least, the git directories change, so
we need to reset the core.autocrlf config to false.

Once we finish checking out submodules, check that the line endings are
\n and not \r\n.
2019-07-10 09:56:47 -04:00
Alex Crichton
0efc7e3898 ci: Configure $CI_JOB_NAME correctly
Looks like some env vars were tweaked on Azure's side of things, so
update how we configure `CI_JOB_NAME`.
2019-07-09 09:09:13 -07:00
Pietro Albini
239a404cae
ci: explicitly disable CRLF conversion on Windows
The Azure image enables CRLF conversion on Windows builders, but that
caused regressions both in our test suite (the miri test suite broke)
and in the ecosystem, since we started shipping install scripts with
CRLF endings instead of the old LF. The Godbolt Compiler Explorer is one
such case of breakage.

This adds a step to the build explicitly disabling the conversion before
the repository is checked out.
2019-07-01 21:57:08 +02:00
Pyry Kontio
9d99ae520b swig@3 is keg-only and not linked by default so add linking so that the build scripts can find it 2019-06-16 01:51:32 +09:00
Pyry Kontio
d6e410b320 Fix rust-lldb wrapper scripts. 2019-06-16 01:51:32 +09:00
Alex Crichton
521edee2e5 ci: Enable toolstate tracking on Azure
Currently just run it through its paces but don't actually push to
official locations. Instead let's just push to a separate fork (mine) as
well as open issues in a separate fork (mine). Make sure that people
aren't pinged for these issues as well!

This should hopefully ensure that everything is working on Azure and
give us a chance to work through any issues that come up.
2019-06-13 07:09:51 -07:00
Pietro Albini
2cd516c1c3
ci: fix ci stats upload condition
The condition I suggested in #61632 was not correct and it errors out
while evaluating. This fixes the condition.

Example of a failure:
https://dev.azure.com/rust-lang/rust/_build/results?buildId=543
2019-06-12 14:21:59 +02:00
Mazdak Farrokhzad
6933034a40
Rollup merge of #61632 - alexcrichton:azure-pipelines-cpu, r=pietroalbini
ci: Collect CPU usage statistics on Azure

This commit adds a script which we'll execute on Azure Pipelines which
is intended to run in the background and passively collect CPU usage
statistics for our builders. The intention here is that we can use this
information over time to diagnose issues with builders, see where we can
optimize our build, fix parallelism issues, etc. This might not end up
being too useful in the long run but it's data we've wanted to collect
for quite some time now, so here's a stab at it!

Comments about how this is intended to work can be found in the python
script used here to collect CPU usage statistics.

Closes #48828
2019-06-12 04:22:48 +02:00
Alex Crichton
f2c37a55a4 ci: Collect CPU usage statistics on Azure
This commit adds a script which we'll execute on Azure Pipelines which
is intended to run in the background and passively collect CPU usage
statistics for our builders. The intention here is that we can use this
information over time to diagnose issues with builders, see where we can
optimize our build, fix parallelism issues, etc. This might not end up
being too useful in the long run but it's data we've wanted to collect
for quite some time now, so here's a stab at it!

Comments about how this is intended to work can be found in the python
script used here to collect CPU usage statistics.

Closes #48828
2019-06-11 06:56:30 -07:00
Wesley Wiser
41e976baa9 Azure: retry failed awscli installs
Fixes #61604
2019-06-09 21:28:47 -04:00
Alex Crichton
fb3bd58e4f azure: Uninstall previous rustc from builders if any
Looks like Azure has updated images recently to install Rust by default,
but that can interfere with our own compiler (for example Cargo's test
suite we think) so be sure to uninstall it before proceeding.
2019-06-05 08:32:40 -07:00
Alex Crichton
0b88e5a87e azure: Make sure docker directory exists
Looks like the Azure image changed recently so let's account for that!
2019-06-05 07:34:48 -07:00
Pietro Albini
80df64b7d4
ci: retry s3 upload on azure if it fails 2019-06-03 11:54:36 +02:00
Pietro Albini
90d4ef3af2
Rollup merge of #61304 - lzybkr:iwr_progress, r=alexcrichton
Speed up Azure CI installing Windows dependencies

There is known issue where PowerShell is unreasonably slow downloading
files due to an issue with rendering the progress bar, see this [issue](https://github.com/PowerShell/PowerShell/issues/2138)

That issue is fixed in PowerShell Core (available in Azure Pipelines as
pwsh.exe) but it can also be worked around by setting:

    $ProgressPreference = 'SilentlyContinue'

I measured downloading LLVM and it took about 220s before, 5s after, so the improvement is significant.
2019-05-31 13:33:54 +02:00
bors
3ade426ede Auto merge of #61353 - alexcrichton:less-tools, r=pietroalbini
ci: Favor SCRIPT instead of RUST_CHECK_TARGET

Since #61212 we've been timing out on OSX, and this looks to be because
we're building tools like Cargo and the RLS twice instead of once. This
turns out to be a slight bug in our configuration. CI builders using the
`RUST_CHECK_TARGET` directive actually execute `make all` just before
their acual target. In `make all` we're building a stage2 cargo, and
then in `make dist` we're building a stage1 cargo.

Other builders use `SCRIPT` which provides explicit control over what
`x.py` script, for example, is used to execute the build. This moves
almost all targets to using `SCRIPT` to ensure that we're explicitly
specifying what's being built where. Additionally this updates the logic
of `RUST_CHECK_TARGET` to remove the pre-flight tidy as well as the
pre-flight `make all`. The system LLVM builder (run on PRs) now
explicitly runs tidy first and then runs the rest of the test suite.
2019-05-30 19:52:11 +00:00
Jason Shirk
6c534c316f
Merge branch 'master' into iwr_progress 2019-05-30 11:00:21 -07:00
Alex Crichton
ebdf42e965 ci: Favor SCRIPT instead of RUST_CHECK_TARGET
Since #61212 we've been timing out on OSX, and this looks to be because
we're building tools like Cargo and the RLS twice instead of once. This
turns out to be a slight bug in our configuration. CI builders using the
`RUST_CHECK_TARGET` directive actually execute `make all` just before
their acual target. In `make all` we're building a stage2 cargo, and
then in `make dist` we're building a stage1 cargo.

Other builders use `SCRIPT` which provides explicit control over what
`x.py` script, for example, is used to execute the build. This moves
almost all targets to using `SCRIPT` to ensure that we're explicitly
specifying what's being built where. Additionally this updates the logic
of `RUST_CHECK_TARGET` to remove the pre-flight tidy as well as the
pre-flight `make all`. The system LLVM builder (run on PRs) now
explicitly runs tidy first and then runs the rest of the test suite.
2019-05-30 07:28:56 -07:00
Alex Crichton
3eda151086 Update all s3 URLs used on CI with subdomains
Ensure that they're all forwards-compatible with AWS updates happening
next year by ensuring the bucket name shows up in the domain name.

Closes #61168
2019-05-29 07:03:50 -07:00
Jason Shirk
642e8d4434 Speed up Azure CI installing Windows dependencies
There is known issue where PowerShell is unreasonably slow downloading
files due to an issue with rendering the progress bar, see:

https://github.com/PowerShell/PowerShell/issues/2138

That issue is fixed in PowerShell Core (available in Azure Pipelines as
pwsh.exe) but it can also be worked around by setting:

    $ProgressPreference = 'SilentlyContinue'
2019-05-28 22:57:12 -07:00
Alex Crichton
a8ac80b7bc Final cleanups
* Clean up the `install-windows-build-deps.yml` file and add some more
  comments where appropriate.

* Add some comments to `run.yml`

* Don't fast path the `rustfmt` submodule, but we'll take care of that
  later if necessary.
2019-05-22 07:09:25 -07:00
Alex Crichton
e0ed2a3f60 Correct the upload_dir in script 2019-05-21 15:55:26 -07:00
Alex Crichton
78965f49c8 Use xcode 9.3 on all osx builders 2019-05-21 15:14:20 -07:00
Pietro Albini
190d1988e0
ci: switch to xcode 9.3 on azure 2019-05-21 21:25:42 +02:00
Alex Crichton
a2255518c7 Only run Window script on Windows 2019-05-21 11:01:39 -07:00
Alex Crichton
ebdc36eb8e Re-enable hack for Windows builds to see if it works 2019-05-21 10:39:37 -07:00
Alex Crichton
a83250dcfa Update upload logic to upload right directory 2019-05-21 10:38:05 -07:00
Alex Crichton
571366f71b Attempt to enable IPv6 for Linux 2019-05-21 10:33:19 -07:00
Alex Crichton
0e5f02f902 Fix typo in key configuration 2019-05-21 10:28:56 -07:00
Pietro Albini
1daab471ce
ci: temp increase of the timeout to 10 hours
Let's see how long a full build takes.
2019-05-21 10:27:41 +02:00
Alex Crichton
9843a79496 Finalize AWS install 2019-05-20 14:37:24 -07:00
Alex Crichton
12f370156d Only execute conditional steps on success
Make sure `succeeded()` is in all the conditionals
2019-05-20 14:34:37 -07:00
Alex Crichton
9b8af0608f Manually install AWS CLI 2019-05-20 14:19:56 -07:00
Alex Crichton
fa8d3b59bd Fix a typo in the run script 2019-05-20 12:46:20 -07:00
Alex Crichton
804ec5faab Execute docker/run.sh on Linux 2019-05-20 12:43:29 -07:00
Alex Crichton
7b266ff181 Fix a typo in clang install 2019-05-20 12:38:17 -07:00
Alex Crichton
528cce96cf Job name config works for all platforms 2019-05-20 12:37:18 -07:00
Alex Crichton
91b1655528 Remove a now stray file 2019-05-20 12:35:21 -07:00
Alex Crichton
1be9fe6a44 Refactor azure pipelines configuration
This commit is intended to go through and review/refactor the azure
pipelines configuration we have. The major changes are:

* The separate `{windows,macos,linux}.yml` files are now all merged into
  one `run.yml`. This allows a shared "master flow" for all platforms
  with divergence only where necessary.

* Some install steps have been separated as `install-*.yml` scripts,
  where each script internally matches on the appropriate OS and then
  delegates accordingly.

* Some various bits and pieces of cruft have been removed which were
  artifacts of Travis's setup or similar.
2019-05-20 12:24:58 -07:00
Alex Crichton
79d28c203f Don't bother with stamp utility
That was just used because Travis doesn't have time stamps on all log
lines, but Azure does, so no need to add our own.
2019-05-20 11:27:18 -07:00
Pietro Albini
9f37b3a4c2
ci: deploy artifacts on azure 2019-05-20 10:11:09 +02:00
Pietro Albini
f23c1ba74b
ci: use ##vso[task.prependpath] on azure 2019-05-20 09:22:47 +02:00