2e8b52168cee10416da3f57fb6e81151475c3668
[alexxy/gromacs.git] / admin / gitlab-ci / documentation.gitlab-ci.yml
1 # Build documentation and web page.
2
3 .configure-docs:
4   extends:
5     - .configure-extends-template
6     - .configure-docs-template
7     - .documentation-before-script-template
8
9 .configure-docs-release:
10   extends:
11     - .configure-extends-template
12     - .configure-docs-release-template
13     - .documentation-before-script-template
14
15 .build-docs-binary:
16   extends:
17     - .build-extends-template
18     - .build-cache-template
19     - .build-docs-binary-template
20     - .documentation-before-script-template
21
22 .build-docs-webpage:
23   extends:
24     - .binary-build-template
25     - .variables-template
26     - .no-cache-template
27     - .build-docs-webpage-template
28     - .documentation-before-script-template
29
30 configure-docs:
31   extends:
32     - .configure-docs
33   needs:
34     - job: simple-build
35       artifacts: false
36   variables:
37     BUILD_DIR: build-docs
38     CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
39   except:
40     variables:
41       - $GROMACS_RELEASE
42
43 configure-docs-gmxapi:
44   extends:
45     - .configure-docs
46     - .configure-gmxapi-template
47   needs:
48     - job: simple-build
49       artifacts: false
50   variables:
51     BUILD_DIR: build-docs-gmxapi
52     CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
53   except:
54     variables:
55       - $GROMACS_RELEASE
56
57 build-docs:
58   extends:
59     - .build-docs-binary
60   stage: documentation
61   needs:
62     - job: simple-build
63       artifacts: false
64     - job: configure-docs
65       artifacts: true
66   variables:
67     BUILD_DIR: build-docs
68   except:
69     variables:
70       - $GROMACS_RELEASE
71
72 build-docs-gmxapi:
73   extends:
74     - .build-docs-binary
75     - .gmxapi-extra-installs
76   stage: documentation
77   needs:
78     - job: simple-build
79       artifacts: false
80     - job: configure-docs-gmxapi
81       artifacts: true
82   variables:
83     BUILD_DIR: build-docs-gmxapi
84   except:
85     variables:
86       - $GROMACS_RELEASE
87
88
89 # The manual build is built separately so that errors in converting
90 # Sphinx to LaTeX and compiling can always be found in the
91 # all-output.txt file, while avoiding many thousands of lines of spam
92 # from pdflatex for normal builds. This does reduce the available
93 # parallel utilization, and so increases the build time.
94 #
95 # TODO why are the doxygen and sphinx log files disappearing
96 # TODO use a feature from gitlab runner instead of using pipefail to get timings for the job
97 webpage:
98   extends:
99     - .build-docs-webpage
100   stage: post-test
101   needs:
102     - job: build-docs
103       artifacts: true
104     - job: run-check-source
105       artifacts: false
106   variables:
107     BUILD_DIR: build-docs
108   except:
109     variables:
110       - $GROMACS_RELEASE
111
112 webpage-gmxapi:
113   extends:
114     - .build-docs-webpage
115     - .gmxapi-extra-installs
116   stage: post-test
117   needs:
118     - job: build-docs-gmxapi
119       artifacts: true
120     - job: run-check-source
121       artifacts: false
122   variables:
123     BUILD_DIR: build-docs-gmxapi
124   except:
125     variables:
126       - $GROMACS_RELEASE
127
128 webpage-nightly:
129   extends:
130     - .build-docs-webpage
131     - .configure-gmxapi-template
132   stage: nightly-deploy
133   only:
134     - triggers
135     - schedules
136   except:
137     variables:
138       - $GROMACS_RELEASE
139   needs:
140     - job: simple-build
141       artifacts: false
142     - job: linkchecker
143       artifacts: false
144     - job: webpage-gmxapi
145       artifacts: true
146   variables:
147     BUILD_DIR: build-docs-gmxapi
148   script:
149     - tar czf webpage.tar.gz $BUILD_DIR/docs/html/
150   artifacts:
151     when: always
152     paths:
153       - webpage.tar.gz
154
155 webpage-configure-release:
156   extends:
157     - .configure-docs-release
158     - .configure-gmxapi-template
159     - .no-cache-template
160   only:
161     refs:
162       - web
163       - schedules
164       - triggers
165     variables:
166       - $GROMACS_RELEASE
167   dependencies:
168     - package-archive-release
169     - package-regressiontests-release
170     - prepare-release-version
171   variables:
172     CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
173
174
175 webpage-binary-release:
176   extends:
177     - .build-docs-binary
178     - .gmxapi-extra-installs
179   stage: release-build
180   needs:
181     - job: webpage-configure-release
182       artifacts: true
183   variables:
184     BUILD_DIR: release-doc-builds
185   only:
186     refs:
187       - triggers
188       - web
189       - schedules
190     variables:
191       - $GROMACS_RELEASE
192
193 webpage-build-release:
194   extends:
195     - .build-docs-webpage
196     - .configure-gmxapi-template
197   dependencies:
198     - webpage-binary-release
199     - webpage-configure-release
200   stage: release-prepare-deploy
201   only:
202     refs:
203       - web
204       - schedules
205       - triggers
206     variables:
207       - $GROMACS_RELEASE
208   variables:
209     BUILD_DIR: release-doc-builds
210
211 webpage-archive-release:
212   extends:
213     - .build-docs-webpage
214     - .configure-gmxapi-template
215   stage: release-deploy
216   only:
217     refs:
218       - web
219       - triggers
220       - schedules
221     variables:
222       - $GROMACS_RELEASE
223   dependencies:
224     - webpage-build-release
225     - package-archive-release
226     - package-regressiontests-release
227   variables:
228     BUILD_DIR: release-doc-builds
229   script:
230     - tar czf webpage.tar.gz $BUILD_DIR/docs/html/
231   artifacts:
232     when: always
233     paths:
234       - webpage.tar.gz
235       - gromacs-*tar.gz
236       - regressiontests-*tar.gz
237