[commit: ghc] master: Fix CI scripts (#454) (a679764)

git at git.haskell.org git at git.haskell.org
Tue Oct 23 20:11:43 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a6797641acc63323a108bfb280ba9dbf502669e9/ghc

>---------------------------------------------------------------

commit a6797641acc63323a108bfb280ba9dbf502669e9
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sat Nov 11 02:57:38 2017 +0000

    Fix CI scripts (#454)
    
    See #453


>---------------------------------------------------------------

a6797641acc63323a108bfb280ba9dbf502669e9
 .travis.yml  |  4 +++-
 appveyor.yml | 24 +++++++++++++-----------
 circle.yml   |  3 ++-
 3 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index e2455b2..1943528 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -76,10 +76,12 @@ install:
     - cabal update
     - cabal install alex happy
 
+    # GHC comes with an older version of Hadrian, so we delete it
+    - rm -r ghc/hadrian/*
+
     # Travis has already cloned Hadrian into ./ and we need to move it
     # to ./ghc/hadrian -- one way to do it is to move the .git directory
     # and perform a hard reset in order to regenerate Hadrian files
-    - mkdir ghc/hadrian
     - mv .git ghc/hadrian
     - cd ghc/hadrian
     - git reset --hard HEAD
diff --git a/appveyor.yml b/appveyor.yml
index fbedf8f..6da6a33 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,4 +1,4 @@
-clone_folder: "c:\\ghc\\hadrian"
+clone_folder: "c:\\new-hadrian"
 environment:
   global:
     STACK_ROOT: "c:\\sr"
@@ -11,24 +11,26 @@ install:
     - curl -ostack.zip -LsS --insecure https://www.stackage.org/stack/windows-x86_64
     - 7z x stack.zip stack.exe
 
+    # Note: AppVeyor has already cloned Hadrian into c:\new-hadrian
     # Fetch GHC sources into c:\ghc
-    # Note: AppVeyor has already cloned Hadrian into c:\ghc\hadrian, so it's tricky
     - cd ..
-    - git init
-    - git remote add origin git://git.haskell.org/ghc.git
-    - git pull --recurse-submodules origin master
-    - git submodule update --init --recursive --quiet
+    - git clone --recursive git://git.haskell.org/ghc.git
+    # GHC comes with an older version of Hadrian, so we delete it
+    - rm -rf ghc\hadrian
+    # Move new Hadrian into ./ghc/hadrian
+    - mv new-hadrian ghc\hadrian
+
+    # Install Alex and Happy
+    - set PATH=C:\Users\appveyor\AppData\Roaming\local\bin;%PATH%
+    - ghc\hadrian\stack install --install-ghc alex happy > nul
 
     # Install all Hadrian and GHC build dependencies
-    - cd hadrian
+    - cd ghc\hadrian
     - stack setup > nul
     - appveyor-retry stack exec -- pacman -S autoconf automake-wrapper make patch python tar --noconfirm
 
 build_script:
-    # Build Hadrian
-    - stack build alex happy # Otherwise 'build' fails on AppVeyor
-
-    # Run internal Hadrian tests
+    # Build Hadrian and run internal Hadrian tests
     - build selftest
 
     # Build GHC
diff --git a/circle.yml b/circle.yml
index a386d72..763475f 100644
--- a/circle.yml
+++ b/circle.yml
@@ -21,7 +21,8 @@ compile:
     - git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/
     - git clone --depth 1 --recursive git://github.com/ghc/ghc
 
-    - mkdir ghc/hadrian
+    # GHC comes with an older version of Hadrian, so we delete it
+    - rm -r ghc/hadrian/*
     # move hadrian's .git into ./ghc/hadrian and perform a hard reset in order to regenerate Hadrian files
     - mv .git ghc/hadrian
     # NOTE: we must write them in the same line because each line



More information about the ghc-commits mailing list