Commit 71648c35 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

gitlab-ci: Implement support for i386/Windows bindists

parent acf2129d
......@@ -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
############################################################
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment