Switch to the fixed Cabal branch in CI and add a fix for Natural (#640)
[hadrian.git] / appveyor.yml
1 clone_folder: "c:\\new-hadrian"
2 environment:
3   global:
4     STACK_ROOT: "c:\\sr"
5
6 cache:
7     - "c:\\sr -> appveyor.yml"
8
9 install:
10     # Get Stack
11     - curl -ostack.zip -LsS --insecure https://www.stackage.org/stack/windows-x86_64
12     - 7z x stack.zip stack.exe
13
14     # Note: AppVeyor has already cloned Hadrian into c:\new-hadrian
15     # Fetch GHC sources into c:\ghc
16     - cd ..
17     - git clone --recursive git://git.haskell.org/ghc.git
18     # GHC comes with an older version of Hadrian, so we delete it
19     - rm -rf ghc\hadrian
20     # Copy new Hadrian into ./ghc/hadrian
21     - cp -r new-hadrian ghc\hadrian
22
23     # We checkout a patched Cabal.
24     # See: https://github.com/snowleopard/hadrian/issues/634
25     - cd ghc/libraries/Cabal/
26     - git remote add quasicomputational https://github.com/quasicomputational/cabal.git
27     - git fetch quasicomputational && git checkout cwd-independent-check
28     - cd ../../../
29
30     # Install Alex and Happy
31     - set PATH=C:\Users\appveyor\AppData\Roaming\local\bin;%PATH%
32     - ghc\hadrian\stack install --install-ghc alex happy > nul
33
34     # Install all Hadrian and GHC build dependencies
35     - cd ghc\hadrian
36     - stack setup > nul
37     - appveyor-retry stack exec -- pacman -S autoconf automake-wrapper make patch python3 tar --noconfirm
38
39 build_script:
40     # Build GHC
41     - cd ..
42     - hadrian\build -c -j --flavour=quickest --integer-simple --no-progress --progress-colour=never --profile=-
43
44     # Test GHC binary
45     - _build\stage1\bin\ghc -e 1+2