[commit: ghc] master, wip/closure-size: Hadrian: build (and retrieve) binary distributions in CI (cb17c2d)

git at git.haskell.org git at git.haskell.org
Wed Mar 13 23:44:25 UTC 2019


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

On branches: master,wip/closure-size
Link       : http://ghc.haskell.org/trac/ghc/changeset/cb17c2da1774a2565946f43261140f2a8b328840/ghc

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

commit cb17c2da1774a2565946f43261140f2a8b328840
Author: Alp Mestanogullari <alpmestan at gmail.com>
Date:   Tue Mar 5 19:01:54 2019 +0100

    Hadrian: build (and retrieve) binary distributions in CI
    
    With all the recent fixes to the binary-dist rule in Hadrian, we can now run
    that rule in CI and keep the bindists around in gitlab as artifacts, just like
    we do for the make CI jobs.
    
    To get 'autoreconf' to work in the Windows CI, we have to run it through the
    shell interpreter, so this commit does that along the way.


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

cb17c2da1774a2565946f43261140f2a8b328840
 .gitlab-ci.yml         | 20 +++++++++++++-------
 hadrian/src/Builder.hs |  2 +-
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ae41dd0..483fd89 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -63,12 +63,16 @@ ghc-linters:
     - if [[ -d ./cabal-cache ]]; then cp -R ./.cabal-cache ~/.cabal-cache; fi
     - ./boot
     - ./configure $CONFIGURE_ARGS
-    - hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh`
-    - hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --docs=no-sphinx docs
+    - hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --docs=no-sphinx binary-dist
+    - mv _build/bindist/ghc*.tar.xz ghc.tar.xz
   cache:
     key: hadrian
     paths:
       - cabal-cache
+  artifacts:
+    when: always
+    paths:
+      - ghc.tar.xz
 
 validate-x86_64-linux-deb8-hadrian:
   extends: .validate-hadrian
@@ -427,16 +431,18 @@ validate-x86_64-windows-hadrian:
       set MSYSTEM=MINGW64
       python boot
       bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex'
-    - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick"
-    - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick --docs=no-sphinx docs
-    # FIXME: Bindist disabled due to #16073
-    #- bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh binary-dist"
+    - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick --docs=no-sphinx binary-dist"
+    - mv _build/bindist/ghc*.tar.xz ghc.tar.xz
     # FIXME: Testsuite disabled due to #16156.
-    #- bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml'
+    # - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml'
   cache:
     key: x86_64-windows
   tags:
     - x86_64-windows
+  artifacts:
+    when: always
+    paths:
+      - ghc.tar.xz
 
 validate-x86_64-windows:
   extends: .validate-windows
diff --git a/hadrian/src/Builder.hs b/hadrian/src/Builder.hs
index d855aa5..1cf2325 100644
--- a/hadrian/src/Builder.hs
+++ b/hadrian/src/Builder.hs
@@ -238,7 +238,7 @@ instance H.Builder Builder where
 
                 Ar Unpack _ -> cmd echo [Cwd output] [path] buildArgs
 
-                Autoreconf dir -> cmd echo [Cwd dir] [path] buildArgs
+                Autoreconf dir -> cmd echo [Cwd dir] ["sh", path] buildArgs
                 Configure  dir -> do
                     -- Inject /bin/bash into `libtool`, instead of /bin/sh,
                     -- otherwise Windows breaks. TODO: Figure out why.



More information about the ghc-commits mailing list