Fix isDroppableCt (Trac #14763)
[ghc.git] / .appveyor.sh
1 # Configure the environment
2 MSYSTEM=MINGW64
3 source /etc/profile || true # a terrible, terrible workaround for msys2 brokenness
4
5 # Don't set -e until after /etc/profile is sourced
6 set -ex
7 cd $APPVEYOR_BUILD_FOLDER
8
9 case "$1" in
10 "prepare")
11 # Bring msys up-to-date
12 # However, we current don't do this: generally one must restart all
13 # msys2 processes when updating the msys2 runtime, which this may do. We can't
14 # easily do this and therefore do simply don't update.
15 #pacman --noconfirm -Syuu
16
17 # Install basic build dependencies
18 pacman --noconfirm -S --needed git tar bsdtar binutils autoconf make xz curl libtool automake python python2 p7zip patch mingw-w64-$(uname -m)-python3-sphinx mingw-w64-$(uname -m)-tools-git
19
20 # Prepare the tree
21 git config remote.origin.url git://github.com/ghc/ghc.git
22 git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/
23 git submodule init
24 git submodule --quiet update --recursive
25
26 # Install build dependencies
27 wget -q -O - https://downloads.haskell.org/~ghc/8.2.1/ghc-8.2.1-x86_64-unknown-mingw32.tar.xz | tar -xJ -C /mingw64 --strip-components=1
28 mkdir -p /usr/local/bin
29 wget -q -O - https://www.haskell.org/cabal/release/cabal-install-1.24.0.0/cabal-install-1.24.0.0-x86_64-unknown-mingw32.zip | bsdtar -xzf- -C /usr/local/bin
30 cabal update
31 cabal install -j --prefix=/usr/local alex happy
32 ;;
33
34 "build")
35 # Build the compiler
36 ./boot
37 ./configure --enable-tarballs-autodownload
38 make -j2
39 ;;
40
41 "test")
42 make binary_dist
43 7z a ghc-windows.zip *.tar.xz
44 ;;
45
46 *)
47 echo "$0: unknown mode $1"
48 exit 1
49 ;;
50 esac