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