[commit: ghc] wip/doc-tarball: gitlab-ci: Generate documentation tarball (9fa90e6)

git at git.haskell.org git at git.haskell.org
Sat Jan 5 22:31:35 UTC 2019


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

On branch  : wip/doc-tarball
Link       : http://ghc.haskell.org/trac/ghc/changeset/9fa90e660d83e21708a0dc97cda14c96565a6f12/ghc

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

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

    gitlab-ci: Generate documentation tarball


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

9fa90e660d83e21708a0dc97cda14c96565a6f12
 .gitlab-ci.yml  | 34 ++++++++++++++++++++++++++++++----
 mk/config.mk.in | 10 +++++-----
 2 files changed, 35 insertions(+), 9 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 87a5333..6b205bb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,6 +11,7 @@ stages:
   - lint
   - build
   - full-build
+  - packaging
 
 ############################################################
 # Runner Tags
@@ -92,8 +93,7 @@ validate-x86_64-linux-deb8-hadrian:
       THREADS=`mk/detect-cpu-count.sh`
       make V=0 -j$THREADS
     - |
-      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
     - |
       THREADS=`mk/detect-cpu-count.sh`
       make $TEST_TYPE THREADS=$THREADS JUNIT_FILE=../../junit.xml
@@ -102,7 +102,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:
@@ -319,6 +319,9 @@ validate-x86_64-linux-deb9-unreg:
     - rd /s /q tmp
     - robocopy /np /nfl /ndl /e "%APPDATA%\cabal" cabal-cache
     - bash -c 'make clean || true'
+  artifacts:
+    paths:
+      - ghc-bindist-*.tar.xz
   cache:
     paths:
       - cabal-cache
@@ -345,7 +348,7 @@ validate-x86_64-windows-hadrian:
     - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh binary-dist"
     - 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
 
@@ -364,6 +367,7 @@ validate-x86_64-windows:
       bash -c './configure --with-ghc=`pwd`/toolchain/bin/ghc --enable-tarballs-autodownload HappyCmd=`pwd`/toolchain/bin/happy AlexCmd=`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 "PATH=`pwd`/toolchain/bin:$PATH make binary-dist 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
@@ -371,6 +375,28 @@ validate-x86_64-windows:
     - x86_64-windows
 
 ############################################################
+# 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:
+    - distrib/mkDocs/mkDocs ghc-bindist-x86_64-unknown-linux.tar.xz ghc-bindist-x86_64-unknown-mingw32.tar.xz
+
+############################################################
 # Validation via CircleCI
 ############################################################
 
diff --git a/mk/config.mk.in b/mk/config.mk.in
index fb823ae..20ff8dd 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