Change cabal config path and cache it.
authorAndrey Mokhov <andrey.mokhov@gmail.com>
Wed, 6 Jan 2016 22:07:41 +0000 (22:07 +0000)
committerAndrey Mokhov <andrey.mokhov@gmail.com>
Wed, 6 Jan 2016 22:07:41 +0000 (22:07 +0000)
See #110. [skip ci]

.appveyor.yml

index 8bb6c15..f70a821 100644 (file)
@@ -1,5 +1,8 @@
 clone_folder: "C:\\msys64\\home\\ghc\\shake-build"
 
+cache:
+    - "C:\\msys64\home\cabal"
+
 install:
     - set MSYSTEM=MINGW64
     - set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\local\bin;C:\msys64\usr\bin;%PATH%
@@ -9,10 +12,10 @@ install:
     - bash -lc "mkdir /usr/local/bin"
     - bash -lc "curl -LsS https://www.haskell.org/cabal/release/cabal-install-1.22.0.0/cabal-1.22.0.0-i386-unknown-mingw32.tar.gz | tar -xz -C /usr/local/bin"
     - bash -lc "mv /usr/local/bin/cabal-1.22.0.0-i386-unknown-mingw32.exe /usr/local/bin/cabal.exe"
-    - bash -lc "cabal update"
-    - bash -lc "cabal install -j --prefix=/usr/local alex happy"
+    - bash -lc "cabal --config-file=/home/cabal update"
+    - bash -lc "cabal --config-file=/home/cabal install -j --prefix=/usr/local alex happy"
     - bash -lc "git clone --recursive git://git.haskell.org/ghc.git /home/ghc"
-    - bash -lc "cd /home/ghc/shake-build && cabal install --only-dependencies"
+    - bash -lc "cd /home/ghc/shake-build && cabal --config-file=/home/cabal install --only-dependencies"
 
 build_script:
     - bash -lc "cd /home/ghc && ./boot"