ci: Ensure index.html is preserved in documentation tarball
[ghc.git] / .gitlab-ci.yml
1 variables:
2   GIT_SSL_NO_VERIFY: "1"
3
4   # Commit of ghc/ci-images repository from which to pull Docker images
5   DOCKER_REV: cefaee3c742af193e0f7783f87edb0d35374515c
6
7 before_script:
8   - python3 .gitlab/fix-submodules.py
9   - git submodule sync --recursive
10   - git submodule update --init --recursive
11   - git checkout .gitmodules
12   - "git fetch https://gitlab.haskell.org/ghc/ghc-performance-notes.git refs/notes/perf:refs/notes/perf || true"
13
14 stages:
15   - lint       # Source linting
16   - build      # A quick smoke-test to weed out broken commits
17   - full-build # Build all the things
18   - cleanup    # See Note [Cleanup on Windows]
19   - packaging  # Source distribution, etc.
20   - hackage    # head.hackage testing
21   - deploy     # push documentation
22
23 .only-default: &only-default
24   only:
25     - master
26     - /ghc-[0-9]+\.[0-9]+/
27     - merge_requests
28     - tags
29
30 ############################################################
31 # Runner Tags
32 ############################################################
33 #
34 # * x86_64-linux: Any Docker-capable x86_64 Linux machine
35 # * aarch64-linux: Any Docker-capable AArch64 Linux machine
36 # * x86_64-windows: A x86_64 Windows machine
37 # * lint: Any Docker-capable x86_64 Linux machine; distinct from
38 #         x86_64-linux to ensure low-latency availability.
39 #
40
41
42 ############################################################
43 # Linting
44 ############################################################
45
46 ghc-linters:
47   allow_failure: true
48   stage: lint
49   image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
50   script:
51     - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
52     - base="$(git merge-base FETCH_HEAD $CI_COMMIT_SHA)"
53     - "echo Merge base $base"
54     #    - validate-commit-msg .git $(git rev-list $base..$CI_COMMIT_SHA)
55     - validate-whitespace .git $(git rev-list $base..$CI_COMMIT_SHA)
56     - .gitlab/linters/check-makefiles.py $base $CI_COMMIT_SHA
57     - .gitlab/linters/check-cpp.py $base $CI_COMMIT_SHA
58   dependencies: []
59   tags:
60     - lint
61   only:
62     refs:
63       - merge_requests
64
65 # We allow the submodule checker to fail when run on merge requests (to
66 # accomodate, e.g., haddock changes not yet upstream) but not on `master` or
67 # Marge jobs.
68 .lint-submods:
69   stage: lint
70   image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
71   script:
72     - submodchecker .git $(git rev-list $base..$CI_COMMIT_SHA)
73   dependencies: []
74   tags:
75     - lint
76
77 lint-submods:
78   extends: .lint-submods
79   only:
80     refs:
81       - master
82       - /ghc-[0-9]+\.[0-9]+/
83       - wip/marge_bot_batch_merge_job
84
85 lint-submods-mr:
86   extends: .lint-submods
87   allow_failure: true
88   only:
89     refs:
90       - merge_requests
91
92 .lint-changelogs:
93   stage: lint
94   image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
95   dependencies: []
96   tags:
97     - lint
98   script:
99     - |
100       grep TBA libraries/*/changelog.md && (
101           echo "Error: Found \"TBA\"s in changelogs."
102           exit 1
103       )
104
105 lint-changelogs:
106   extends: .lint-changelogs
107   allow_failure: true
108   only:
109     refs:
110       - /ghc-[0-9]+\.[0-9]+/
111
112 lint-release-changelogs:
113   extends: .lint-changelogs
114   only:
115     - tags
116
117
118 ############################################################
119 # Validation via Pipelines (hadrian)
120 ############################################################
121
122 .validate-hadrian:
123   <<: *only-default
124   allow_failure: true
125   script:
126     - cabal update
127     - git clean -xdf && git submodule foreach git clean -xdf
128     - bash .circleci/prepare-system.sh
129     - if [[ -d ./cabal-cache ]]; then cp -R ./.cabal-cache ~/.cabal-cache; fi
130     - ./boot
131     - ./configure $CONFIGURE_ARGS
132     - hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --docs=no-sphinx binary-dist
133     - mv _build/bindist/ghc*.tar.xz ghc.tar.xz
134   cache:
135     key: hadrian
136     paths:
137       - cabal-cache
138   artifacts:
139     when: always
140     paths:
141       - ghc.tar.xz
142
143 validate-x86_64-linux-deb8-hadrian:
144   extends: .validate-hadrian
145   stage: build
146   image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb8:$DOCKER_REV"
147   before_script:
148     # workaround for docker permissions
149     - sudo chown ghc:ghc -R .
150     - python3 .gitlab/fix-submodules.py
151     - git submodule sync --recursive
152     - git submodule update --init --recursive
153     - git checkout .gitmodules
154     - "git fetch https://gitlab.haskell.org/ghc/ghc-performance-notes.git refs/notes/perf:refs/notes/perf || true"
155   tags:
156     - x86_64-linux
157
158 hadrian-ghc-in-ghci:
159   <<: *only-default
160   stage: build
161   image: ghcci/x86_64-linux-deb8:0.1
162   before_script:
163     # workaround for docker permissions
164     - sudo chown ghc:ghc -R .
165     - python3 .gitlab/fix-submodules.py
166     - git submodule sync --recursive
167     - git submodule update --init --recursive
168     - git checkout .gitmodules
169   tags:
170     - x86_64-linux
171   script:
172     - cabal update
173     - git clean -xdf && git submodule foreach git clean -xdf
174     - bash .circleci/prepare-system.sh
175     - if [[ -d ./cabal-cache ]]; then cp -R ./.cabal-cache ~/.cabal-cache; fi
176     - ./boot
177     - ./configure $CONFIGURE_ARGS
178     # Load ghc-in-ghci then immediately exit and check the modules loaded
179     - echo ":q" | hadrian/ghci.sh | tail -n2 | grep "Ok,"
180   cache:
181     key: hadrian-ghci
182     paths:
183       - cabal-cache
184
185 ############################################################
186 # Validation via Pipelines (make)
187 ############################################################
188
189 .validate:
190   <<: *only-default
191   variables:
192     TEST_TYPE: test
193   before_script:
194     - git clean -xdf && git submodule foreach git clean -xdf
195   script:
196     - ./boot
197     - ./configure $CONFIGURE_ARGS
198     - |
199       THREADS=`mk/detect-cpu-count.sh`
200       make V=0 -j$THREADS WERROR=-Werror
201     - |
202       make binary-dist TAR_COMP_OPTS="-1"
203     - |
204       # Prepare to push git notes.
205       METRICS_FILE=$(mktemp)
206       git config user.email "ben+ghc-ci@smart-cactus.org"
207       git config user.name "GHC GitLab CI"
208     - |
209       THREADS=`mk/detect-cpu-count.sh`
210       make $TEST_TYPE THREADS=$THREADS JUNIT_FILE=../../junit.xml METRICS_FILE=$METRICS_FILE
211     - |
212       # Push git notes.
213       METRICS_FILE=$METRICS_FILE .gitlab/push-test-metrics.sh
214   dependencies: []
215   artifacts:
216     reports:
217       junit: junit.xml
218     expire_in: 2 week
219     paths:
220       - ghc-*.tar.xz
221       - junit.xml
222
223 #################################
224 # x86_64-darwin
225 #################################
226
227 validate-x86_64-darwin:
228   extends: .validate
229   stage: full-build
230   tags:
231     - x86_64-darwin
232   variables:
233     GHC_VERSION: 8.6.3
234     BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-apple-darwin.tar.xz"
235     MACOSX_DEPLOYMENT_TARGET: "10.7"
236     # Only Sierra and onwards supports clock_gettime. See #12858
237     ac_cv_func_clock_gettime: "no"
238     LANG: "en_US.UTF-8"
239     CONFIGURE_ARGS: --with-intree-gmp
240     TEST_ENV: "x86_64-darwin"
241   before_script:
242     - git clean -xdf && git submodule foreach git clean -xdf
243     - python3 .gitlab/fix-submodules.py
244     - git submodule sync --recursive
245     - git submodule update --init --recursive
246     - git checkout .gitmodules
247     - "git fetch https://gitlab.haskell.org/ghc/ghc-performance-notes.git refs/notes/perf:refs/notes/perf || true"
248
249     - bash .gitlab/darwin-init.sh
250     - PATH="`pwd`/toolchain/bin:$PATH"
251   after_script:
252     - cp -Rf $HOME/.cabal cabal-cache
253   artifacts:
254     when: always
255     expire_in: 2 week
256   cache:
257     key: darwin
258     paths:
259       - cabal-cache
260       - toolchain
261
262 .validate-linux:
263   extends: .validate
264   tags:
265     - x86_64-linux
266   before_script:
267     - git clean -xdf && git submodule foreach git clean -xdf
268     - python3 .gitlab/fix-submodules.py
269     - git submodule sync --recursive
270     - git submodule update --init --recursive
271     - git checkout .gitmodules
272     - "git fetch https://gitlab.haskell.org/ghc/ghc-performance-notes.git refs/notes/perf:refs/notes/perf || true"
273
274     - bash .circleci/prepare-system.sh
275     # workaround for docker permissions
276     - sudo chown ghc:ghc -R .
277   after_script:
278     - cp -Rf $HOME/.cabal cabal-cache
279   cache:
280     key: linux
281     paths:
282       - cabal-cache
283       - toolchain
284
285 #################################
286 # aarch64-linux-deb9
287 #################################
288
289 .build-aarch64-linux-deb9:
290   extends: .validate-linux
291   stage: full-build
292   image: "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-deb9:$DOCKER_REV"
293   allow_failure: true
294   variables:
295     TEST_ENV: "aarch64-linux-deb9"
296     BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-aarch64-linux-deb9.tar.xz"
297   cache:
298     key: linux-aarch64-deb9
299   tags:
300     - aarch64-linux
301
302 validate-aarch64-linux-deb9:
303   extends: .build-aarch64-linux-deb9
304   artifacts:
305     when: always
306     expire_in: 2 week
307
308 nightly-aarch64-linux-deb9:
309   extends: .build-aarch64-linux-deb9
310   artifacts:
311     expire_in: 2 year
312   variables:
313     TEST_TYPE: slowtest
314   only:
315     variables:
316       - $NIGHTLY
317
318 #################################
319 # i386-linux-deb9
320 #################################
321
322 .build-i386-linux-deb9:
323   extends: .validate-linux
324   stage: full-build
325   image: "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb9:$DOCKER_REV"
326   variables:
327     TEST_ENV: "i386-linux-deb9"
328     BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-i386-deb9-linux.tar.xz"
329   cache:
330     key: linux-i386-deb9
331
332 validate-i386-linux-deb9:
333   extends: .build-i386-linux-deb9
334   artifacts:
335     when: always
336     expire_in: 2 week
337
338 nightly-i386-linux-deb9:
339   extends: .build-i386-linux-deb9
340   variables:
341     TEST_TYPE: slowtest
342   artifacts:
343     when: always
344     expire_in: 2 week
345   only:
346     variables:
347       - $NIGHTLY
348
349 #################################
350 # x86_64-linux-deb9
351 #################################
352
353 .build-x86_64-linux-deb9:
354   extends: .validate-linux
355   stage: full-build
356   image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
357   variables:
358     TEST_ENV: "x86_64-linux-deb9"
359     BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-deb9-linux.tar.xz"
360   cache:
361     key: linux-x86_64-deb9
362
363 validate-x86_64-linux-deb9:
364   extends: .build-x86_64-linux-deb9
365   artifacts:
366     when: always
367     expire_in: 2 week
368
369 nightly-x86_64-linux-deb9:
370   extends: .build-x86_64-linux-deb9
371   artifacts:
372     expire_in: 2 year
373   variables:
374     TEST_TYPE: slowtest
375   only:
376     variables:
377       - $NIGHTLY
378
379 # N.B. Has DEBUG assertions enabled in stage2
380 validate-x86_64-linux-deb9-debug:
381   extends: .build-x86_64-linux-deb9
382   stage: build
383   variables:
384     BUILD_FLAVOUR: validate
385     TEST_ENV: "x86_64-linux-deb9-debug"
386
387 validate-x86_64-linux-deb9-llvm:
388   extends: .build-x86_64-linux-deb9
389   stage: full-build
390   variables:
391     BUILD_FLAVOUR: perf-llvm
392     TEST_ENV: "x86_64-linux-deb9-llvm"
393
394 validate-x86_64-linux-deb9-integer-simple:
395   extends: .build-x86_64-linux-deb9
396   stage: full-build
397   variables:
398     INTEGER_LIBRARY: integer-simple
399     TEST_ENV: "x86_64-linux-deb9-integer-simple"
400     BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-deb9-linux-integer-simple.tar.xz"
401
402 nightly-x86_64-linux-deb9-integer-simple:
403   extends: .build-x86_64-linux-deb9
404   stage: full-build
405   variables:
406     INTEGER_LIBRARY: integer-simple
407     TEST_ENV: "x86_64-linux-deb9-integer-simple"
408     TEST_TYPE: slowtest
409   artifacts:
410     expire_in: 2 year
411   only:
412     variables:
413       - $NIGHTLY
414
415 validate-x86_64-linux-deb9-unreg:
416   extends: .build-x86_64-linux-deb9
417   stage: full-build
418   variables:
419     CONFIGURE_ARGS: --enable-unregisterised
420     TEST_ENV: "x86_64-linux-deb9-unreg"
421
422
423 #################################
424 # x86_64-linux-deb8
425 #################################
426
427 release-x86_64-linux-deb8:
428   extends: .validate-linux
429   stage: full-build
430   image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb8:$DOCKER_REV"
431   variables:
432     TEST_ENV: "x86_64-linux-deb8"
433     BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-deb8-linux.tar.xz"
434   only:
435     - tags
436   cache:
437     key: linux-x86_64-deb8
438   artifacts:
439     when: always
440     expire_in: 2 week
441
442
443 #################################
444 # x86_64-linux-fedora27
445 #################################
446
447 validate-x86_64-linux-fedora27:
448   extends: .validate-linux
449   stage: full-build
450   image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora27:$DOCKER_REV"
451   variables:
452     TEST_ENV: "x86_64-linux-fedora27"
453     BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-fedora27-linux.tar.xz"
454   cache:
455     key: linux-x86_64-fedora27
456   artifacts:
457     when: always
458     expire_in: 2 week
459
460 ############################################################
461 # Validation via Pipelines (Windows)
462 ############################################################
463
464 .build-windows:
465   <<: *only-default
466   before_script:
467     - git clean -xdf
468     - git submodule foreach git clean -xdf
469
470     # Use a local temporary directory to ensure that concurrent builds don't
471     # interfere with one another
472     - |
473       mkdir tmp
474       set TMP=%cd%\tmp
475       set TEMP=%cd%\tmp
476
477     - set PATH=C:\msys64\usr\bin;%PATH%
478     - python .gitlab/fix-submodules.py
479     - git submodule sync --recursive
480     - git submodule update --init --recursive
481     - git checkout .gitmodules
482     - "git fetch https://gitlab.haskell.org/ghc/ghc-performance-notes.git refs/notes/perf:refs/notes/perf || true"
483     - bash .gitlab/win32-init.sh
484   after_script:
485     - rd /s /q tmp
486     - robocopy /np /nfl /ndl /e "%APPDATA%\cabal" cabal-cache
487     - bash -c 'make clean || true'
488   dependencies: []
489   variables:
490     FORCE_SYMLINKS: 1
491     LANG: "en_US.UTF-8"
492   cache:
493     paths:
494       - cabal-cache
495       - ghc-8.6.2
496       - ghc-tarballs
497
498 .build-windows-hadrian:
499   extends: .build-windows
500   stage: full-build
501   variables:
502     GHC_VERSION: "8.6.2"
503   script:
504     - |
505       python boot
506       bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex'
507     - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick --docs=no-sphinx binary-dist"
508     - mv _build/bindist/ghc*.tar.xz ghc.tar.xz
509     # FIXME: Testsuite disabled due to #16156.
510     # - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml'
511   tags:
512     - x86_64-windows
513   artifacts:
514     when: always
515     paths:
516       - ghc.tar.xz
517
518 validate-x86_64-windows-hadrian:
519   extends: .build-windows-hadrian
520   variables:
521     MSYSTEM: MINGW64
522   cache:
523     key: x86_64-windows-hadrian
524
525 nightly-i386-windows-hadrian:
526   extends: .build-windows-hadrian
527   variables:
528     MSYSTEM: MINGW32
529   only:
530     variables:
531       - $NIGHTLY
532   cache:
533     key: i386-windows-hadrian
534
535 .build-windows-make:
536   extends: .build-windows
537   stage: full-build
538   # due to #16084
539   allow_failure: true
540   variables:
541     BUILD_FLAVOUR: "quick"
542     GHC_VERSION: "8.6.2"
543     BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-mingw32.tar.xz"
544   script:
545     - |
546       python boot
547       bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex $CONFIGURE_ARGS'
548     - bash -c "echo include mk/flavours/${BUILD_FLAVOUR}.mk > mk/build.mk"
549     - bash -c "PATH=`pwd`/toolchain/bin:$PATH make -j`mk/detect-cpu-count.sh`"
550     - bash -c "PATH=`pwd`/toolchain/bin:$PATH make binary-dist TAR_COMP_OPTS=-1"
551     - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml'
552   tags:
553     - x86_64-windows
554   artifacts:
555     when: always
556     expire_in: 2 week
557     reports:
558       junit: junit.xml
559     paths:
560       - ghc-*.tar.xz
561       - junit.xml
562
563 validate-x86_64-windows:
564   extends: .build-windows-make
565   variables:
566     MSYSTEM: MINGW64
567     CONFIGURE_ARGS: "--target=x86_64-unknown-mingw32"
568   cache:
569     key: x86_64-windows
570
571 # Normal Windows validate builds are profiled; that won't do for releases.
572 release-x86_64-windows:
573   extends: validate-x86_64-windows
574   variables:
575     MSYSTEM: MINGW64
576     BUILD_FLAVOUR: "perf"
577     CONFIGURE_ARGS: "--target=x86_64-unknown-mingw32"
578   only:
579     - tags
580
581 release-i386-windows:
582   extends: .build-windows-make
583   only:
584     - tags
585   variables:
586     MSYSTEM: MINGW32
587     BUILD_FLAVOUR: "perf"
588     CONFIGURE_ARGS: "--target=i386-unknown-mingw32"
589   cache:
590     key: i386-windows
591
592 nightly-i386-windows:
593   extends: .build-windows-make
594   only:
595     variables:
596       - $NIGHTLY
597   variables:
598     MSYSTEM: MINGW32
599     CONFIGURE_ARGS: "--target=i386-unknown-mingw32"
600   cache:
601     key: i386-windows
602
603 ############################################################
604 # Cleanup
605 ############################################################
606
607 # Note [Cleaning up after shell executor]
608 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
609 #
610 # As noted in [1], gitlab-runner's shell executor doesn't clean up its working
611 # directory after builds. Unfortunately, we are forced to use the shell executor
612 # on Windows. To avoid running out of disk space we add a stage at the end of
613 # the build to remove the \GitLabRunner\builds directory. Since we only run a
614 # single build at a time on Windows this should be safe.
615 #
616 # [1] https://gitlab.com/gitlab-org/gitlab-runner/issues/3856
617
618 # See Note [Cleanup after shell executor]
619 cleanup-windows:
620   <<: *only-default
621   stage: cleanup
622   tags:
623     - x86_64-windows
624   when: always
625   dependencies: []
626   before_script:
627     - echo "Time to clean up"
628   script:
629     - echo "Let's go"
630   after_script:
631     - set "BUILD_DIR=%CI_PROJECT_DIR%"
632     - set "BUILD_DIR=%BUILD_DIR:/=\%"
633     - echo "Cleaning %BUILD_DIR%"
634     - cd \GitLabRunner
635     # This is way more complicated than it should be:
636     # See https://stackoverflow.com/questions/1965787
637     - del %BUILD_DIR%\* /F /Q
638     - for /d %%p in (%BUILD_DIR%\*) do rd /Q /S "%%p"
639     - exit /b 0
640
641 # See Note [Cleanup after shell executor]
642 cleanup-darwin:
643   <<: *only-default
644   stage: cleanup
645   tags:
646     - x86_64-darwin
647   when: always
648   dependencies: []
649   before_script:
650     - echo "Time to clean up"
651   script:
652     - echo "Let's go"
653   after_script:
654     - BUILD_DIR=$CI_PROJECT_DIR
655     - echo "Cleaning $BUILD_DIR"
656     - cd $HOME
657     - rm -Rf $BUILD_DIR/*
658     - exit 0
659
660 ############################################################
661 # Packaging
662 ############################################################
663
664 doc-tarball:
665   <<: *only-default
666   stage: packaging
667   tags:
668     - x86_64-linux
669   image: ghcci/x86_64-linux-deb9:0.2
670   dependencies:
671     - validate-x86_64-linux-deb9
672     - validate-x86_64-windows
673   artifacts:
674     paths:
675       - haddock.html.tar.xz
676       - libraries.html.tar.xz
677       - users_guide.html.tar.xz
678       - index.html
679       - "*.pdf"
680   script:
681     - rm -Rf docs
682     - bash -ex distrib/mkDocs/mkDocs ghc-x86_64-deb9-linux.tar.xz ghc-x86_64-mingw32.tar.xz
683     - ls -lh
684     - mv docs/*.tar.xz docs/index.html .
685
686 source-tarball:
687   stage: packaging
688   tags:
689     - x86_64-linux
690   image: ghcci/x86_64-linux-deb9:0.2
691   only:
692     - tags
693   artifacts:
694     paths:
695       - ghc-*.tar.xz
696       - version
697   script:
698     - mk/get-win32-tarballs.sh download all
699     - ./boot
700     - ./configure
701     - make sdist
702     - mv sdistprep/*.xz  .
703     - make show VALUE=version > version
704
705
706 ############################################################
707 # Testing via head.hackage
708 ############################################################
709
710 # Triggering jobs in the ghc/head.hackage project requires that we have a job
711 # token for that repository. Furthermore the head.hackage CI job must have
712 # access to an unprivileged access token with the ability to query the ghc/ghc
713 # project such that it can find the job ID of the fedora27 job for the current
714 # pipeline.
715
716 .hackage:
717   <<: *only-default
718   stage: hackage
719   image: ghcci/x86_64-linux-deb9:0.2
720   tags:
721     - x86_64-linux
722   dependencies: []
723   variables:
724     HEAD_HACKAGE_PROJECT_ID: "78"
725   script:
726     - bash .gitlab/start-head.hackage.sh
727
728 hackage:
729   extends: .hackage
730   when: manual
731
732 hackage-label:
733   extends: .hackage
734   only:
735     variables:
736       - $CI_MERGE_REQUEST_LABELS =~ /.*user-facing.*/
737
738 nightly-hackage:
739   extends: .hackage
740   only:
741     variables:
742       - $NIGHTLY
743
744 pages:
745   stage: deploy
746   dependencies:
747     - doc-tarball
748   image: ghcci/x86_64-linux-deb9:0.2
749   tags:
750     - x86_64-linux
751   script:
752     - mkdir -p public/doc
753     - tar -xf haddock.html.tar.xz -C public/doc
754     - tar -xf libraries.html.tar.xz -C public/doc
755     - tar -xf users_guide.html.tar.xz -C public/doc
756     - cp -f index.html public/doc
757   only:
758     - master
759   artifacts:
760     paths:
761       - public
762