[commit: ghc] wip/dwarf-release: gitlab-ci: Generate documentation tarball (0de86f7)

git at git.haskell.org git at git.haskell.org
Wed Feb 20 14:59:47 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/dwarf-release
Link       : http://ghc.haskell.org/trac/ghc/changeset/0de86f700d97b2f7b812681ca10ea974ae8a6889/ghc

>---------------------------------------------------------------

commit 0de86f700d97b2f7b812681ca10ea974ae8a6889
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sat Jan 5 17:25:23 2019 -0500

    gitlab-ci: Generate documentation tarball


>---------------------------------------------------------------

0de86f700d97b2f7b812681ca10ea974ae8a6889
 .gitlab-ci.yml  | 39 ++++++++++++++++++++++++++++++++-------
 mk/config.mk.in | 10 +++++-----
 2 files changed, 37 insertions(+), 12 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b630d9f..52ef0c7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -12,6 +12,7 @@ stages:
   - lint
   - build
   - full-build
+  - packaging
   - cleanup # See Note [Cleanup on Windows]
 
 ############################################################
@@ -97,8 +98,7 @@ validate-x86_64-linux-deb8-hadrian:
       THREADS=`mk/detect-cpu-count.sh`
       make V=0 -j$THREADS WERROR=-Werror 
     - |
-      make binary-dist TAR_COMP_OPTS="-1"
-      mv ghc-*.tar.xz ghc.tar.xz
+      make binary-dist TAR_COMP_OPTS="-1" BIN_DIST_NAME=ghc-bindist
     - |
       # Prepare to push git notes.
       METRICS_FILE=$(mktemp)
@@ -116,7 +116,7 @@ validate-x86_64-linux-deb8-hadrian:
       junit: junit.xml
     expire_in: 2 week
     paths:
-      - ghc.tar.xz
+      - ghc-bindist-*.tar.xz
       - junit.xml
 
 validate-x86_64-darwin:
@@ -359,6 +359,9 @@ validate-x86_64-linux-deb9-unreg:
     - robocopy /np /nfl /ndl /e "%APPDATA%\cabal" cabal-cache
     - bash -c 'make clean || true'
   dependencies: []
+  artifacts:
+    paths:
+      - ghc-bindist-*.tar.xz
   cache:
     paths:
       - cabal-cache
@@ -384,7 +387,7 @@ validate-x86_64-windows-hadrian:
     # FIXME: Testsuite disabled due to #16156.
     #- bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml'
   cache:
-    key: x86_64-windows
+    key: x86_64-windows-hadrian
   tags:
     - x86_64-windows
 
@@ -403,9 +406,7 @@ validate-x86_64-windows:
       bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex'
     - bash -c "echo include mk/flavours/quick.mk > mk/build.mk"
     - bash -c "PATH=`pwd`/toolchain/bin:$PATH make -j`mk/detect-cpu-count.sh`"
-    - |
-      bash -c "make binary-dist TAR_COMP_OPTS=-1"
-      mv ghc-*.tar.xz ghc.tar.xz
+    - bash -c "PATH=`pwd`/toolchain/bin:$PATH make binary-dist TAR_COMP_OPTS=-1 BIN_DIST_NAME=ghc-bindist"
     - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml'
   cache:
     key: x86_64-windows
@@ -419,6 +420,30 @@ validate-x86_64-windows:
       - ghc.tar.xz
       - junit.xml
 
+############################################################
+# Packaging
+############################################################
+
+doc-tarball:
+  stage: packaging
+  tags:
+    - x86_64-linux
+  image: ghcci/x86_64-linux-deb9:0.2
+  dependencies:
+    - validate-x86_64-linux-deb9
+    - validate-x86_64-windows
+  artifacts:
+    paths:
+      - haddock.html.tar.xz
+      - libraries.html.tar.xz
+      - users_guide.html.tar.xz
+      - index.html
+      - "*.pdf"
+  script:
+    - ls -lh
+    - rm -Rf docs
+    - distrib/mkDocs/mkDocs ghc-bindist-x86_64-unknown-linux.tar.xz ghc-bindist-x86_64-unknown-mingw32.tar.xz
+
 # Note [Cleaning up after shell executor]
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 #
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 0119e9a..47580c6 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -414,12 +414,12 @@ GhcRtsWithLibdw=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64), at UseLibdw@,
 #
 ################################################################################
 
-BINDIST               = NO
-BIN_DIST_NAME         = ghc-$(ProjectVersion)
-BIN_DIST_PREP_DIR     = bindistprep/$(BIN_DIST_NAME)
-BIN_DIST_PREP_TAR     = bindistprep/$(BIN_DIST_NAME)-$(TARGETPLATFORM).tar
+BINDIST                = NO
+BIN_DIST_NAME         ?= ghc-$(ProjectVersion)
+BIN_DIST_PREP_DIR      = bindistprep/$(BIN_DIST_NAME)
+BIN_DIST_PREP_TAR      = bindistprep/$(BIN_DIST_NAME)-$(TARGETPLATFORM).tar
 BIN_DIST_PREP_TAR_COMP = $(BIN_DIST_PREP_TAR).$(TAR_COMP_EXT)
-BIN_DIST_TAR_COMP     = $(BIN_DIST_NAME)-$(TARGETPLATFORM).tar.$(TAR_COMP_EXT)
+BIN_DIST_TAR_COMP      = $(BIN_DIST_NAME)-$(TARGETPLATFORM).tar.$(TAR_COMP_EXT)
 
 # -----------------------------------------------------------------------------
 # Utilities programs: flags



More information about the ghc-commits mailing list