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