Skip to content

Commit f0651fb

Browse files
committed
Move documentation from TestingLibcxx.rst to Contributing.rst
Also update & correct some of the documentation.
1 parent f37621e commit f0651fb

File tree

2 files changed

+70
-43
lines changed

2 files changed

+70
-43
lines changed

libcxx/docs/Contributing.rst

Lines changed: 70 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Introduction
175175
------------
176176

177177
Unlike 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
179179
the build results are visible in the review on GitHub. Please make sure
180180
the 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

256259
Contains the Docker image for the Ubuntu CI. Because the same Docker image is
257260
used 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+
264328
run-buildbot-container
265329
~~~~~~~~~~~~~~~~~~~~~~
266330

libcxx/docs/TestingLibcxx.rst

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -139,43 +139,6 @@ Also note that the Docker container shares the same filesystem as your local mac
139139
modifying files on your local machine will also modify what the Docker container sees.
140140
This is useful for editing source files as you're testing your code in the Docker container.
141141

142-
Updating the CI testing container images
143-
----------------------------------------
144-
145-
The libcxx linux premerge testing can run on one of three sets of
146-
runner groups. The three runner group names are
147-
"llvm-premerge-libcxx-runners", "llvm-premerge-libcxx-release-runners"
148-
or "llvm-premerge-libcxx-next-runners". Which runner set to use is
149-
controlled by the contents of https://github.com/llvm/llvm-project/blob/main/.github/workflows/libcxx-build-and-test.yaml . By default, it uses
150-
"llvm-premerge-libcxx-runners". To switch to one of the other runner
151-
sets, just replace all uses of "llvm-premerge-libcxx-runners" in the yaml
152-
file with the desired runner set.
153-
154-
Which container image is used by these three runner sets is controlled
155-
and set by the variable values in
156-
https://github.com/llvm/llvm-zorg/blob/main/premerge/premerge_resources/variables.tf.
157-
The table below shows the variable names, their current values, and
158-
the runner sets to which they correspond.
159-
160-
+------------------------------------+---------------------------+--------------------------------------------------------------------------+
161-
|Runner Set |Variable |Image Value |
162-
+====================================+===========================+==========================================================================+
163-
|llvm-premerge-libcxx-runners |libcxx_runner_image |ghcr.io/llvm/libcxx-linux-builder:16f046281bf1a11d344eac1bc44d11f3e50e3b5d|
164-
+------------------------------------+---------------------------+--------------------------------------------------------------------------+
165-
|llvm-premerge-libcxx-release-runners|libcxx_release_runner_image|ghcr.io/llvm/libcxx-linux-builder:16f046281bf1a11d344eac1bc44d11f3e50e3b5d|
166-
+------------------------------------+---------------------------+--------------------------------------------------------------------------+
167-
|llvm-premerge-libcxx-next-runners |libcxx_next_runner_image |ghcr.io/llvm/libcxx-linux-builder:16f046281bf1a11d344eac1bc44d11f3e50e3b5d|
168-
+------------------------------------+---------------------------+--------------------------------------------------------------------------+
169-
170-
Note: The three runner images are (temporarily) all the same, but that
171-
will not normally be the case.
172-
173-
To change the container image, the variable.tf file in llvm-zorg must
174-
be changed. Once that change has been merged, an llvm-zorg
175-
administrator must use terraform to apply the change to the running
176-
GKE cluster.
177-
178-
179142
Writing Tests
180143
=============
181144

0 commit comments

Comments
 (0)