summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-05-05 16:53:21 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-05-16 08:31:55 -0400
commit93153aab656f173ac36e0c3c2b4835caaa55669b (patch)
treea94941d7e720d20d06574d76c833b0b933d80dd8 /.gitlab-ci.yml
parent3d74cfca991f4c870b1568954d5e09d390977a44 (diff)
downloadhaskell-93153aab656f173ac36e0c3c2b4835caaa55669b.tar.gz
packaging: Introduce CI job for generating hackage documentation
This adds a CI job (hackage-doc-tarball) which generates the necessary tarballs for uploading libraries and documentation to hackage. The release script knows to download this folder and the upload script will also upload the release to hackage as part of the release. The `ghc_upload_libs` script is moved from ghc-utils into .gitlab/ghc_upload_libs There are two modes, preparation and upload. * The `prepare` mode takes a link to a bindist and creates a folder containing the source and doc tarballs ready to upload to hackage. * The `upload` mode takes the folder created by prepare and performs the upload to hackage. Fixes #21493 Related to #21512
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml34
1 files changed, 34 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8b33043e8d..0462c0acdf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -503,6 +503,40 @@ doc-tarball:
- ls -lh
- mv docs/*.tar.xz docs/index.html .
+hackage-doc-tarball:
+ stage: packaging
+ needs:
+ - job: x86_64-linux-fedora33-perf
+ optional: true
+ - job: nightly-x86_64-linux-fedora33-perf
+ optional: true
+ - job: release-x86_64-linux-fedora33-perf
+ optional: true
+ - job: source-tarball
+ tags:
+ - x86_64-linux
+ image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10:$DOCKER_REV"
+ dependencies: null
+ variables:
+ # Don't clone the git repo..
+ GIT_STRATEGY: none
+ artifacts:
+ paths:
+ - hackage_docs
+ before_script:
+ - tar -xf ghc-*[0-9]-src.tar.xz
+ - tar -xf ghc-x86_64-linux-fedora33-perf.tar.xz -C ghc*/
+ script:
+ - cd ghc*/
+ - mv .gitlab/upload_ghc_libs.py .
+ - .gitlab/ci.sh setup
+ - .gitlab/ci.sh configure
+ - ./upload_ghc_libs.py prepare --bindist ghc*linux/
+ - mv .upload-libs/docs ../hackage_docs
+ rules:
+ - if: $NIGHTLY
+ - if: '$RELEASE_JOB == "yes"'
+
source-tarball:
stage: full-build
tags: