This directory contains code shared by LLVM Buildbot workers. The typical pipeline of a ScriptedBuilder-based builder is as follows.
-
A commit is pushed to main
-
The Buildbot master polls the repository and finds new commits. It schedules build requests on every relevant worker. Alternatively, a build request of a specific llvm-project commit can be created using the "Force Build" or "Rebuild" buttons.
-
When a worker is ready, the master sends the build steps determined by ScriptedBuilder to the worker.
-
The checkout step checks out llvm-project commit into a directory named
llvm.srcon the worker. -
The annotate step executes a predefined Python script from the llvm-project source tree on the worker. Its working directory is an initially empty sibling directory named
build. The argument--workdir=.is passed to override the default build directory (which is different to avoid accidentally spilling clutter into the cwd) -
The script is expected to use the utilities from
worker.pyto build LLVM. Thewith w.step("stepname"):pattern is used to visually separate additional steps in the Buildbot GUI.
Users can execute the worker script directly to reproduce a build problem with
a worker using the llvm-project source tree in which it is located. By default
it will use a new directory with .workdir suffix (so it can be
.gitignore-ignored) next to the script as build directory.
The ScriptedBuilder system tries to keep all worker/build settings within the
script, but some parameters can be overridden using command line parameters.
For instance, --jobs overrides the Ninja and llvm-lit -j argument that the
worker would use. Script should be written to honor these overrides where they
apply, and may also add additional ones.
See
worker.py
or a
reference script
for further details.