@@ -175,7 +175,7 @@ Introduction
175175------------
176176
177177Unlike most parts of the LLVM project, libc++ uses a pre-commit CI [# ]_. This
178- CI is hosted on `Buildkite <https://buildkite.com/llvm-project/libcxx-ci >`__ and
178+ CI used to be hosted on `Buildkite <https://buildkite.com/llvm-project/libcxx-ci >`__, but has migrated to the LLVM CI infrastrcuture, and
179179the build results are visible in the review on GitHub. Please make sure
180180the CI is green before committing a patch.
181181
@@ -246,12 +246,15 @@ Below is a short description of the most interesting CI builds [#]_:
246246 Infrastructure
247247--------------
248248
249- All files of the CI infrastructure are in the directory ``libcxx/utils/ci ``.
250- Note that quite a bit of this infrastructure is heavily Linux focused. This is
251- the platform used by most of libc++'s Buildkite runners and developers.
249+ The files for the CI infrastructure are split between the llvm-project
250+ and the llvm-zorg repositories. All files of the CI infrastructure in
251+ the llvm-project are in the directory ``libcxx/utils/ci ``. Note that
252+ quite a bit of this infrastructure is heavily Linux focused. This is
253+ the platform used by most of libc++'s Buildkite runners and
254+ developers.
252255
253- Dockerfile
254- ~~~~~~~~~~
256+ Dockerfile/Container Images
257+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
255258
256259Contains the Docker image for the Ubuntu CI. Because the same Docker image is
257260used for the ``main `` and ``release `` branch, it should contain no hard-coded
@@ -261,6 +264,67 @@ GCC, and CMake.
261264.. note :: This image is pulled from Docker hub and not rebuild when changing
262265 the Dockerfile.
263266
267+ Updating the CI testing container images
268+ ----------------------------------------
269+
270+ The libcxx linux premerge testing can run on one of three sets of
271+ runner groups. The three runner group names are
272+ "llvm-premerge-libcxx-runners", "llvm-premerge-libcxx-release-runners"
273+ or "llvm-premerge-libcxx-next-runners". Which runner set to use is
274+ controlled by the contents of https://github.com/llvm/llvm-project/blob/main/.github/workflows/libcxx-build-and-test.yaml . By default, it uses
275+ "llvm-premerge-libcxx-runners". To switch to one of the other runner
276+ sets, just replace all uses of "llvm-premerge-libcxx-runners" in the yaml
277+ file with the desired runner set.
278+
279+ Which container image is used by these three runner sets is controlled
280+ and set by the variable values in
281+ https://github.com/llvm/llvm-zorg/blob/main/premerge/premerge_resources/variables.tf.
282+ The table below shows the variable names and
283+ the runner sets to which they correspond. To see their values, follow the
284+ link above (to variables.tf in llvm-zorg).
285+
286+ +------------------------------------+---------------------------+
287+ | Runner Set |Variable |
288+ +====================================+===========================+
289+ | llvm-premerge-libcxx-runners |libcxx_runner_image |
290+ +------------------------------------+---------------------------+
291+ | llvm-premerge-libcxx-release-runners|libcxx_release_runner_image|
292+ +------------------------------------+---------------------------+
293+ | llvm-premerge-libcxx-next-runners |libcxx_next_runner_image |
294+ +------------------------------------+---------------------------+
295+
296+
297+ When updating the container image you can either update just the
298+ runner binary (the part the connects to Github), or you can update
299+ everything (tools, etc.). Whether to update just the runner or to update
300+ everything is controlled by the value of ``ACTIONS_BASE_IMAGE ``, under
301+ ``actions-builder `` in ``libcxx/utils/ci/docker-compose.yml ``.
302+
303+ To update just the runner binary, change the value of
304+ ``ACTIONS_BASE_IMAGE `` to be one of the libcxx runner variable images
305+ from
306+ https://github.com/llvm/llvm-zorg/blob/main/premerge/premerge_resources/variables.tf.
307+
308+ To update the entire container image, set the value of ``ACTIONS_BASE_IMAGE ``
309+ to ``builder-base ``. If the value is already ``builder-base `` (there
310+ have been no just-the-runner updates since the last complete update), then
311+ you need to find the line containing
312+ ``RUN echo "Last forced update executed on `` in
313+ ``libcxx/utils/ci/Dockerfile `` and update the date to be the current date.
314+
315+ Once you have created and merged a PR with those changes, a new image
316+ will be created, and a link to it can be found at
317+ https://github.com/llvm/llvm-project/pkgs/container/libcxx-linux-builder.,
318+ where the actual image name should be
319+ ``ghcr.io/llvm/libcxx-linux-builder:<SHA-of-committed-change-from-PR> ``.
320+
321+ Lastly you need to create a PR in the llvm-zorg repository,
322+ updating the the value of the appropriate libcxx runner variable in
323+ the variables.tf file mentioned above. Once that change has been
324+ merged, an llvm-zorg administrator must use terraform to apply the
325+ change to the running GKE cluster.
326+
327+
264328run-buildbot-container
265329~~~~~~~~~~~~~~~~~~~~~~
266330
0 commit comments