[commit: ghc] master: gitlab-ci: Implement support for i386/Windows bindists (71648c3)

git at git.haskell.org git at git.haskell.org
Wed Mar 20 05:10:38 UTC 2019


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/71648c35ad243396433d017da9ce18bea603d1ce/ghc

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

commit 71648c35ad243396433d017da9ce18bea603d1ce
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Tue Mar 5 16:41:55 2019 -0500

    gitlab-ci: Implement support for i386/Windows bindists


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

71648c35ad243396433d017da9ce18bea603d1ce
 .gitlab-ci.yml        | 63 ++++++++++++++++++++++++++++++++++++++++-----------
 .gitlab/win32-init.sh | 14 +++++++++++-
 2 files changed, 63 insertions(+), 14 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c135c45..5f741e1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -394,7 +394,7 @@ validate-x86_64-linux-fedora27:
 # Validation via Pipelines (Windows)
 ############################################################
 
-.validate-windows:
+.build-windows:
   before_script:
     - git clean -xdf
     - git submodule foreach git clean -xdf
@@ -420,29 +420,26 @@ validate-x86_64-linux-fedora27:
   dependencies: []
   variables:
     FORCE_SYMLINKS: 1
+    LANG: "en_US.UTF-8"
   cache:
     paths:
       - cabal-cache
       - ghc-8.6.2
       - ghc-tarballs
 
-validate-x86_64-windows-hadrian:
-  extends: .validate-windows
+.build-windows-hadrian:
+  extends: .build-windows
   stage: full-build
   variables:
     GHC_VERSION: "8.6.2"
-    LANG: "en_US.UTF-8"
   script:
     - |
-      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 --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'
-  cache:
-    key: x86_64-windows
   tags:
     - x86_64-windows
   artifacts:
@@ -450,36 +447,76 @@ validate-x86_64-windows-hadrian:
     paths:
       - ghc.tar.xz
 
-validate-x86_64-windows:
-  extends: .validate-windows
+validate-x86_64-windows-hadrian:
+  extends: .build-windows-hadrian
+  variables:
+    MSYSTEM: MINGW64
+  cache:
+    key: x86_64-windows-hadrian
+
+nightly-i386-windows-hadrian:
+  extends: .build-windows-hadrian
+  variables:
+    MSYSTEM: MINGW32
+  only:
+    variables:
+      - $NIGHTLY
+  cache:
+    key: i386-windows-hadrian
+
+.build-windows-make:
+  extends: .build-windows
   stage: full-build
   # due to #16084
   allow_failure: true
   variables:
     GHC_VERSION: "8.6.2"
-    LANG: "en_US.UTF-8"
     BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-mingw32.tar.xz"
   script:
     - |
-      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 "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 TAR_COMP_OPTS=-1"
     - 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
+    expire_in: 2 week
     reports:
       junit: junit.xml
     paths:
       - ghc-*.tar.xz
       - junit.xml
 
+validate-x86_64-windows:
+  extends: .build-windows-make
+  variables:
+    MSYSTEM: MINGW64
+  cache:
+    key: x86_64-windows
+
+release-i386-windows:
+  extends: .build-windows-make
+  only:
+    - tags
+  variables:
+    MSYSTEM: MINGW32
+  cache:
+    key: i386-windows
+
+nightly-i386-windows:
+  extends: .build-windows-make
+  only:
+    variables:
+      - $NIGHTLY
+  variables:
+    MSYSTEM: MINGW32
+  cache:
+    key: i386-windows
+
 ############################################################
 # Cleanup
 ############################################################
diff --git a/.gitlab/win32-init.sh b/.gitlab/win32-init.sh
index dce9be8..aacb6d7 100644
--- a/.gitlab/win32-init.sh
+++ b/.gitlab/win32-init.sh
@@ -10,7 +10,19 @@ if [ -d "`pwd`/cabal-cache" ]; then
 fi
 
 if [ ! -e $toolchain/bin/ghc ]; then
-    curl https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-x86_64-unknown-mingw32.tar.xz | tar -xJ
+    case $MSYSTEM in
+      MINGW32)
+        triple="i386-unknown-mingw32"
+        ;;
+      MINGW64)
+        triple="x86_64-unknown-mingw32"
+        ;;
+      *)
+        echo "win32-init: Unknown MSYSTEM $MSYSTEM"
+        exit 1
+        ;;
+    esac
+    curl https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-$triple.tar.xz | tar -xJ
     mv ghc-$GHC_VERSION toolchain
 fi
 



More information about the ghc-commits mailing list