Reorganize release templates.
[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 configure-docs:
16   extends:
17     - .configure-docs
18   needs:
19     - job: simple-build
20       artifacts: false
21   variables:
22     BUILD_DIR: build-docs
23     CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
24   except:
25     variables:
26       - $GROMACS_RELEASE
27
28 configure-docs-gmxapi:
29   extends:
30     - .configure-docs
31     - .configure-gmxapi-template
32   needs:
33     - job: simple-build
34       artifacts: false
35   variables:
36     BUILD_DIR: build-docs-gmxapi
37     CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
38   except:
39     variables:
40       - $GROMACS_RELEASE
41
42 .build-docs-binary:
43   extends:
44     - .build-extends-template
45     - .build-cache-template
46     - .build-docs-binary-template
47     - .documentation-before-script-template
48
49 .build-docs-webpage:
50   extends:
51     - .binary-build-template
52     - .variables:default
53     - .no-cache-template
54     - .build-docs-webpage-template
55     - .documentation-before-script-template
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