1 Understanding Jenkins builds
2 ============================
4 This page documents what different Jenkins builds actually run from the
5 |Gromacs| source tree. The purpose is two-fold:
7 * Provide information on how to interpret Jenkins failures and how to run the
8 same tasks locally to diagnose issues (in most cases, referring to the
9 special targets described in :doc:`build-system`).
10 * Provide information on what changes in the build system (or other parts of
11 the repository) need special care to not break Jenkins builds.
13 .. todo:: Add a link to a wiki page about general Jenkins documentation, once
14 there is more of that.
16 Pre-submit verification
17 -----------------------
19 The following builds are triggered for each patch set uploaded to Gerrit.
24 The main build compiles |Gromacs| with different configurations and runs the
25 tests. The configurations used for Jenkins verification are specified in
26 :file:`admin/builds/pre-submit-matrix.txt`.
28 The exact build sequence can be found in :file:`admin/builds/gromacs.py`,
29 including the logic that translates the build options in the matrix file to
35 This build builds various types of documentation:
37 * PDF reference manual using LaTeX
38 * Doxygen documentation extracted from the source code
39 * Set of HTML pages containing an installation guide, a user guide, and a
40 developer guide, as well as links to the above. This set of HTML pages can
41 be browsed from Jenkins.
45 The last three require building the :file:`gmx` binary and running it, so
46 compilation failures will also show in this build.
47 All log files that contain warnings are archived as artifacts in the build, and
48 presence of any warnings marks the build unstable. Brief description of which
49 part failed is reported back to Gerrit.
51 Additionally, the build runs some source code checks that rely on the Doxygen
52 documentation. See the description of the ``check-source`` target in
55 :doc:`doxygen` provides general guidelines for Doxygen usage, which can be
56 helpful in understanding and solving Doxygen warnings and some of the
57 ``check-source`` issues.
58 :doc:`includestyle` provides guidelines for #include order and style, which is
59 another part of ``check-source`` checks.
61 The exact build sequence is in :file:`admin/builds/documentation.py`.
62 See that file for details of what it exactly builds and how. Most changes in the
63 documentation build system will require changes in this script, but Jenkins
64 configuration should be more static.
69 The file :file:`admin/builds/clang-analyzer.py` specifies the exact build
70 sequence and the CMake cache variables used for clang static analysis. This
71 file also specifies the clang version used for the analysis, as well as the C++
72 compiler used (``clang-static-analyzer-<version>``).
74 To run the analysis outside Jenkins, you should run both ``cmake`` and ``make``
75 under ``scan-build`` command using the same CMake cache variables as in the
76 build script. When you do the initial CMake configuration with ``scan-build``,
77 it sets the C++ compiler to the analyzer. Note that using ``scan-build`` like
78 this will also analyze C code, but Jenkins ignores C code for analysis. This
79 can result in extra warnings, which can be suppressed by manually setting
80 CMAKE_C_COMPILER to a value other than Clang static analyzer.
85 This build checks for source code formatting issues with uncrustify, and enforces
86 the copyright style. See :doc:`formatting` for the guidelines that are enforced.
88 The exact build sequence is in :file:`admin/builds/uncrustify.py`, which
89 essentially just runs ::
91 admin/uncrustify.sh check --rev=HEAD^
93 If the any changes are required, the build is marked unstable.
94 If the script completely fails (should be rare), the build fails.
95 A file with issues found by the script is archived as an artifact in the build,
96 and a summary is reported back to Gerrit (or the actual issues if there are
98 See :doc:`code-formatting` for more details on code-formatting tools
99 and on scripts to run them.
104 This build checks and enforces code formatting, e.g., indentation.
105 Also, a second part of the build enforces the source code formatting.
106 As above, see :doc:`formatting` for the style guidelines.
108 The build runs according to :file:`admin/builds/clang-format.py`, resulting
111 admin/clang-format.sh check --rev=HEAD^
113 The build is marked unstable if the code formatting resulted in
114 any changes to the source code.
119 These builds can be triggered on request for certain changes in Gerrit, or
120 manually from Jenkins. See :ref:`releng-triggering-builds` for details on
121 how to trigger these.
126 This build compiles one configuration of |Gromacs| with instrumentation for
127 coverage, runs the tests, and produces a coverage report using gcovr.
128 The report can be browsed on Jenkins.
130 The exact build sequence is in :file:`admin/builds/coverage.py`, including
131 specification of the configuration tested.
136 This build creates the source tarball for distribution. Some of the content
137 that is put into the tarball is generated by executing the :command:`gmx`
138 binary, so this build also compiles the source code (with a minimal set of
141 The build compiles the code and those targets that generate content necessary
142 for the tarball, followed by building the ``package_source`` target.
143 After that, it just generates a file that is used by other builds.
145 The exact build sequence is in :file:`admin/builds/source-package.py`.
150 This build creates source and regressiontest tarballs, builds, installs, and
151 tests a few configuration using those, and builds documentation to be placed on
152 the documentation web site for a new release. The set of configurations tested
153 is specified in :file:`admin/builds/release-matrix.txt`.
155 The exact build sequence is desribed in :ref:`releng-workflow-release`.
156 The build uses the source tarball build as a subbuild, and parts of the build
157 are executed using :file:`admin/builds/gromacs.py` and
158 :file:`admin/builds/documentation.py`.
160 :file:`admin/builds/get-version-info.py` is used for getting the version
161 information from the source tree as part of this workflow.
163 :file:`admin/builds/update-regtest-hash.py` has logic to update the
164 regressiontests tarball MD5 sum for the released tarball automatically.
166 Updating regressiontests data
167 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
169 Sometimes we add new tests to the regressiontests repository. Also, as
170 the source code or data files change, it is sometimes necessary to
171 update regressiontests. This requires a particular CMake build type
172 and both a single and double-precision build of |Gromacs| to generate
173 all the data. Jenkins can automate much of the tedium here.
175 * Upload a regressiontests change that lacks the relevant reference
176 data (either because you deleted the outdated data, or because the
177 test is new). Jenkins will do the normal thing, which we ignore.
178 There is now a Gerrit patch number for that change, symbolized here
181 * Go to change ``MMMM`` on gerrit, select the patch set you want to
182 update with new reference data (usually the latest one), and comment
186 to update against the HEAD of the matching source-code branch, or
188 ``[JENKINS] Cross-verify NNNN update``
190 to update from builds of |Gromacs| from the latest version of
191 Gerrit source-code patch ``NNNN``. You will need to do this when
192 functionality changes in ``NNNN`` affect either the layout of
193 the files in the reference data, or the results of the simulation,
194 or the results of the subsequent analysis.
196 * Eventually, Jenkins will upload a new version of the regressiontests
197 patch to Gerrit, which will contain the updated regressiontest data.
198 That upload will again trigger Jenkins to do the normal pre-submit
199 verify, which will now pass (but perhaps will only pass under
200 cross-verify with patch ``NNNN``, as above).
202 * Later, if you later need to verify an updated version of source-code
203 patch ``NNNN`` against the newly generated reference data, go to the
204 source-code patch ``NNNN`` and comment
206 ``[JENKINS] Cross-verify MMMM``