[commit: ghc] wip/i386-win32-builds: gitlab-ci: Implement support for i386/Windows bindists (9ecc9bb)

git at git.haskell.org git at git.haskell.org
Tue Mar 5 21:44:44 UTC 2019


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

On branch  : wip/i386-win32-builds
Link       : http://ghc.haskell.org/trac/ghc/changeset/9ecc9bb08822db7930e9c9d3143b0f6b07901929/ghc

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

commit 9ecc9bb08822db7930e9c9d3143b0f6b07901929
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


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

9ecc9bb08822db7930e9c9d3143b0f6b07901929
 .gitlab-ci.yml        | 57 ++++++++++++++++++++++++++++++++++++++++++---------
 .gitlab/win32-init.sh | 14 ++++++++++++-
 2 files changed, 60 insertions(+), 11 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b6fb0c7..6121fa6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -385,21 +385,20 @@ release-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:
+.build-windows-hadrian:
   extends: .validate-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"
@@ -408,22 +407,35 @@ validate-x86_64-windows-hadrian:
     #- bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh binary-dist"
     # 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
 
-validate-x86_64-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:
   extends: .validate-windows
   stage: full-build
   # due to #16084
   allow_failure: true
   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 "echo include mk/flavours/quick.mk > mk/build.mk"
@@ -432,18 +444,43 @@ validate-x86_64-windows:
       bash -c "make binary-dist TAR_COMP_OPTS=-1"
       mv ghc-*.tar.xz ghc.tar.xz
     - 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
+  variables:
+    MSYSTEM: MINGW64
+  cache:
+    key: x86_64-windows
+
+release-i386-windows:
+  extends: .build-windows
+  only:
+    - tags
+  variables:
+    MSYSTEM: MINGW32
+  cache:
+    key: i386-windows
+
+nightly-i386-windows:
+  extends: .build-windows
+  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