Hadrian: generate JUnit testsuite report in Linux CI job
[ghc.git] / .appveyor.sh
1 # Configure the environment
2 MSYSTEM=MINGW64
3 THREADS=9
4 SKIP_PERF_TESTS=YES
5 BUILD_FLAVOUR=
6 source /etc/profile || true # a terrible, terrible workaround for msys2 brokenness
7
8 # Don't set -e until after /etc/profile is sourced
9 set -ex
10 cd $APPVEYOR_BUILD_FOLDER
11
12 case "$1" in
13 "prepare")
14 # Prepare the tree
15 git config remote.origin.url git://github.com/ghc/ghc.git
16 git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/
17 git submodule init
18 git submodule --quiet update --recursive
19 ;;
20 "build")
21 # Build the compiler
22 ./boot
23 cat <<EOF >> mk/build.mk
24 BuildFlavour=$BUILD_FLAVOUR
25 ifneq "\$(BuildFlavour)" ""
26 include mk/flavours/\$(BuildFlavour).mk
27 endif
28 EOF
29 ./configure --enable-tarballs-autodownload
30 make -j$THREADS
31 ;;
32
33 "test")
34 make binary-dist
35 curl https://ghc-artifacts.s3.amazonaws.com/tools/ghc-artifact-collector-x86_64-windows --output ghc-artifact-collector
36 ./ghc-artifact-collector *.tar.xz
37 make test THREADS=$THREADS
38 ;;
39
40 *)
41 echo "$0: unknown mode $1"
42 exit 1
43 ;;
44 esac