Commit Graph

180 Commits

Author SHA1 Message Date
Louis Dionne 3765d284c4 [libc++] Provide a way to trigger rebuild of Docker images in the CI 2021-09-09 09:59:44 -04:00
Louis Dionne d61ec93ff2 [libc++] Move additional build bots to the from-scratch config
Once all the bots are passing with from-scratch configs, we can attempt
to make the from-scratch config the default configuration.

Differential Revision: https://reviews.llvm.org/D103417
2021-09-09 09:14:43 -04:00
Louis Dionne 8660b89c0c [libc++] Clean up the no-unicode CI job
It was added after we changed the way the CI jobs are run, in particular
how they are pinned down to Linux instances only. As a result, the job
would sometimes run on Mac machines, which we're trying to keep only for
jobs that absolutely need it due to capacity concerns.
2021-09-09 08:39:30 -04:00
Mark de Wever df2af9936c [libc++][format] Add a CMake Unicode option.
This option is used to select between the format headers output column
width option. This option should be independent of the locale setting.
It's encouraged to default to Unicode unless the platform doesn't offer
that option.

[format.string.std]/10
```
  For the purposes of width computation, a string is assumed to be in a
  locale-independent, implementation-defined encoding. Implementations
  should use a Unicode encoding on platforms capable of displaying Unicode
```

Reviewed By: #libc, ldionne, vitaut

Differential Revision: https://reviews.llvm.org/D103379
2021-09-04 11:55:10 +02:00
Louis Dionne dc0d4b97a2 [libc++] Update the version of CMake in the Docker image 2021-08-17 13:35:57 -04:00
Louis Dionne d232ec3c2a [libc++] Add timeout to BuildKite jobs
We just had a case where a build bot stalled in an infinite loop during
testing, and the whole pipeline got stuck. To avoid that from happening
in the future, use a timeout on BuildKite jobs.

Differential Revision: https://reviews.llvm.org/D107765
2021-08-09 15:31:04 -04:00
David Spickett e517a2405f Revert "[libcxx][CI] Work around Arm buildkite failures"
This reverts commit f8bef47348.

Buildkite agent 3.32.0 includes a fix for the PATH issue.
https://github.com/buildkite/agent/releases/tag/v3.32.0

Differential Revision: https://reviews.llvm.org/D107172
2021-08-02 09:32:08 +01:00
Louis Dionne 45478619e3 [libc++] CI: Run -std=c++03 on Clang ToT
Differential Revision: https://reviews.llvm.org/D106104
2021-07-27 14:13:28 -04:00
Louis Dionne 496a3815f4 [libc++] NFC: Try to trigger Docker image rebuild on CI nodes 2021-07-27 10:02:00 -04:00
Mark de Wever 1139fd4270 [libc++][ci] Detect not committed generated files.
The Generated output CI job only tests for modified files. This job
should also fail the generated output contains new files.

It would be possible to test modified and untracked files in one
execution of `git ls-files`. However the diff is stored as an artifact
so the execution of `git diff` would still be required.

Discussion: Would it be better to do `git ls-files -om` and remove the
excution of
`! grep -q '^--- a' ${BUILD_DIR}/generated_output.patch || false` ?
(Obviously then the name `generated_output.untracked` should change to
something like `generated_output.status`)

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D106534
2021-07-26 16:41:57 +02:00
Louis Dionne fbc3e69f58 [libc++] ci: Create ~/Library/LaunchAgents if it does not exist yet 2021-07-16 11:48:10 -04:00
Louis Dionne 18e21e6832 [libc++] CI: Setup BuildKite agents through launchd
This makes sure that even if a node goes down, the BuildKite agent will
be started again when it goes back up.
2021-07-16 11:40:08 -04:00
Louis Dionne 851a335b1e [libc++] Add a job running GCC with C++11
This configuration is interesting because GCC has a different level of
strictness for some C++ rules. In particular, it implements the older
standards more stringently than Clang, which can help find places where
we are non-conforming (especially in the test suite).

Differential Revision: https://reviews.llvm.org/D105936
2021-07-15 22:13:03 -04:00
Louis Dionne 4628ff4c31 [libc++] NFC: Reindent the run-buildbot script 2021-07-15 13:29:58 -04:00
Louis Dionne 1f8e286cdc [libc++] Add a CMake target to re-generate files and revamp CONTRIBUTING.rst
As we automate more and more things in the library, it becomes useful for
contributors to have a single target for running all the automation as
part of their workflow. This commit adds a new `libcxx-generate-files`
target that should re-generate all the auto-generated files in the library.

As a fly-by, I also revamped the documentation on Contributing to account
for this new target and present it as a bullet list of things to check
before committing. I also added a few things that are often overlooked
to that list, such as updating the synopsis and the status files.

Differential Revision: https://reviews.llvm.org/D106067
2021-07-15 12:07:26 -04:00
Louis Dionne 2a399e60b6 [libc++] Add a CI job for macOS on arm64 hardware 🥳
Differential Revision: https://reviews.llvm.org/D105848
2021-07-13 13:49:05 -04:00
Louis Dionne 04942a7ffc [libc++] NFC: Add comment for running macOS CI setup script remotely 2021-07-13 13:35:29 -04:00
Louis Dionne c5ad8bb8d4 [libc++] Target x86_64 only for the backdeployment jobs
Differential Revision: https://reviews.llvm.org/D105846
2021-07-13 10:29:08 -04:00
Louis Dionne e47444e216 [libc++] ci: Properly target macOS nodes per-os 2021-07-12 17:26:16 -04:00
Louis Dionne cb30d597c4 [libc++] Add the 'os=macos' tag to macOS nodes to workaround lack of wildcard matching 2021-07-12 17:22:34 -04:00
Louis Dionne 15df9c9881 [libc++][ci] Clean up the Docker image
- Remove symlinks that are not used anymore
- Stop installing GCC 10, which isn't tested anymore
2021-07-12 17:04:25 -04:00
Louis Dionne 877e97a954 [libc++] Use 'os' tags to target Linux libc++ builders 2021-07-12 17:01:54 -04:00
Louis Dionne 0a9afaf736 [libc++] Encode the arch and OS in buildkite agent tags 2021-07-12 16:01:38 -04:00
Louis Dionne 1ca748608d [libc++] Exit from macos-ci-setup upon error 2021-07-12 15:44:35 -04:00
Louis Dionne 87bfc49db5 [libc++][ci] Add arch and os tags to the macOS CI builders 2021-07-12 15:34:57 -04:00
Louis Dionne 85cce4d485 [libc++] Test on Clang ToT by default
This is what ffccf96e90 should have enabled, however the symlink
in the Docker image was not pointing to the right compiler, so we were
testing with Clang 12 instead of ToT.
2021-07-12 11:13:43 -04:00
David Spickett f8bef47348 [libcxx][CI] Work around Arm buildkite failures
For reasons unknown, the build is now using compilers
from /usr/bin instead of /usr/local/bin which is where
we have our clang-12 aliases placed.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D105704
2021-07-09 15:29:49 -04:00
Louis Dionne 7a372c4ce1 [libc++][ci] Keep the C++03 build job on Clang 12
Because of https://reviews.llvm.org/D104500, libc++ is broken with
recent Clangs in C++03 mode.
2021-07-09 12:22:48 -04:00
Louis Dionne ffccf96e90 [libc++][ci] Test Clang ToT by default, and add jobs on Clang 11 and 12
It makes the most sense to test with Clang ToT by default since that's
exactly what we're trying to QA: that libc++ works with whatever compiler
we're going to release next.
2021-07-09 10:17:12 -04:00
Louis Dionne 8ea2b951c6 [libc++][ci] Install Clang 11, Clang 12 and Clang ToT in the Docker image
The compiler support policy mentions that we support Clang 11 and 12, so
we should test those. We already test on Clang 12, but I'll add testers
for Clang 11 once the new Docker image is in use on all the builders.
2021-07-08 14:14:17 -04:00
Louis Dionne d2a8d362c5 [libc++][ci] Stop testing on GCC previous, since we don't support it anymore
This is the first of a few commits that update the CI to match the
recently officialized compiler support policy. I'm staging those
changes to try and keep the CI green at all times, accounting how
builders refresh their Docker image.
2021-07-08 12:33:26 -04:00
Louis Dionne 6e43f3fc14 [libc++] Do not set CMAKE_BUILD_WITH_INSTALL_NAME_DIR
I'm not sure what that gains us, and it creates a problem when
trying to run the tests against libc++ with a custom install name
dir (e.g. /usr/lib), since the library that we link against (in
the build tree) will advertise itself as /usr/lib/libc++.dylib,
so we end up linking against the system dylib at runtime.

Differential Revision: https://reviews.llvm.org/D105499
2021-07-06 14:46:47 -04:00
Louis Dionne 2ce0df4dfb [libc++][docs] Overhaul the documentation for building and using libc++
This patch overhauls the documentation around building libc++
for vendors, and using libc++ for end-users. It also:

- Removes mention of the standalone build, which we've been trying to
  get rid of for a long time.
- Removes mention of using a local ABI installation, which we don't do
  and is documented as "not recommended".
- Removes mention of the separate libc++filesystem.a library, which isn't
  relevant anymore since filesystem support is in the main library.
- Adds mention of the GDB pretty printers and how to use them.
2021-07-06 14:09:14 -04:00
Louis Dionne c475efe916 [libc++] Fix incorrect shell expansion in macos-ci-setup 2021-07-01 10:09:20 -04:00
Louis Dionne 9b371f5da4 [libc++] NFC: Fix outdated comment about secrets.env
That file (secrets.env) has now been removed, so the comment was
referencing something that didn't exist anymore.
2021-06-21 16:22:26 -04:00
Louis Dionne 4f194d0db7 [libc++] Promote GCC 11 to mandatory CI
Also, fix the last issue that prevented GCC 11 from passing the test
suite. Thanks to everyone else who fixed issues.

Differential Revision: https://reviews.llvm.org/D104315
2021-06-15 20:54:58 -04:00
Louis Dionne 1b87573aaf [libc++][ci] Enable modules in the Runtimes build
The runtimes build has assertions enabled, which is necessary to catch
some of the modules-related issues we've been seeing recently. This
patch enables testing with modules in the runtimes build so as to cover
those cases.

In the future, a better solution would be to systematically use versions
of Clang that have assertions enabled. However, the Clangs we release
currently don't have assertions enabled by default, which causes a
challenge for the CI (we could try to build our own Clang from ToT with
assertions in the CI, but that poses some problems).

Differential Revision: https://reviews.llvm.org/D104252
2021-06-14 23:05:23 -04:00
Louis Dionne d9d20802d0 [libc++] Clean up scripts to setup CI on macOS 2021-06-14 15:55:36 -04:00
Louis Dionne b648c611ed [libc++] Fix libc++ build with assertions enabled
This fixes http://llvm.org/PR50534. This is another take on D103960
which is less disruptive.

Differential Revision: https://reviews.llvm.org/D103964
2021-06-09 12:58:53 -04:00
Christopher Di Bella cdb9d242de [libcxx][ci] enables assertions for runtimes-build
This will catch nasty Clang bugs like
https://bugs.llvm.org/show_bug.cgi?id=50592 before we merge stuff into
libc++ main.

Differential Revision: https://reviews.llvm.org/D103863
2021-06-09 15:38:26 +00:00
Louis Dionne 4d680b06c9 [libc++] Add a CI configuration for the modular build
Differential Revision: https://reviews.llvm.org/D103559
2021-06-08 13:32:08 -04:00
Louis Dionne d515a52a3a [libc++] Simplify apple-install-libcxx since we always use the same CMake cache 2021-06-03 18:26:38 -04:00
Louis Dionne ae4dad2b73 [libc++] Add a CI job to test libc++ when building for 32 bit
Differential Revision: https://reviews.llvm.org/D92508
2021-06-01 22:07:43 -04:00
Louis Dionne aad878f112 [libc++] NFC: Make it easier for vendors to extend the run-buildbot script 2021-05-27 16:51:47 -04:00
Louis Dionne cc622aee30 [libc++] Add a job testing on GCC 11
I'm adding the job as a soft-fail for now, but once all the tests have
been fixed to work on it, we'll switch over from GCC 10 to GCC 11 and
remove the soft-fail.

Differential Revision: https://reviews.llvm.org/D103116
2021-05-26 15:48:33 -04:00
Louis Dionne 66781efd0a [libc++] Install GCC 11 on CI builders 2021-05-25 17:35:08 -04:00
Louis Dionne d95a4b950d [libc++] Try to fix the oss-fuzz failure 2021-05-25 12:52:22 -04:00
Louis Dionne b274728b1a [libc++] Switch a few CI jobs to the minimal Lit configuration
Eventually, this should become the default way of running the tests.
For now, only move a few CI nodes to it, and keep a node that runs the
legacy configuration.

Differential Revision: https://reviews.llvm.org/D97565
2021-05-20 10:46:59 -04:00
Louis Dionne c42007e266 [libc++] Use Xcode's CMake if it's present
This resolves issues when the CMake in use on the host is too old to
configure libc++ properly, but Xcode has a sufficiently recent version.
It is technically possible for the reverse issue to happen, where the
Xcode version would be too old and the user-installed version would be
better, however in the context of our build bots, we use AppleClang on
Apple platforms, and the CMake shipped with Xcode should work with the
AppleClang shipped alongside that Xcode.

Differential Revision: https://reviews.llvm.org/D102083
2021-05-08 07:40:35 -04:00
Louis Dionne 8002c5d65f [libc++][ci] Run longer CI jobs first
Jobs that test with a more recent standard version run more tests, so
they take longer. We'll decrease the average latency by running them
first instead of last.
2021-05-07 13:57:07 -04:00