[commit: ghc] master: gitlab-ci: Fix Darwin build (4ae6aa3)

git at git.haskell.org git at git.haskell.org
Sat Dec 22 04:25:14 UTC 2018


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

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

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

commit 4ae6aa398d05f764563e95d77a5e3e9961fb73ac
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Fri Dec 21 23:23:56 2018 -0500

    gitlab-ci: Fix Darwin build
    
    Previously the toolchain directory was wiped away by git clean.


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

4ae6aa398d05f764563e95d77a5e3e9961fb73ac
 .gitlab-ci.yml         | 5 ++++-
 .gitlab/darwin-init.sh | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 527966a..5eff228 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -83,8 +83,9 @@ validate-x86_64-linux-deb8-hadrian:
 .validate:
   variables:
     TEST_TYPE: test
-  script:
+  before_script:
     - git clean -xdf && git submodule foreach git clean -xdf
+  script:
     - ./boot
     - ./configure $CONFIGURE_ARGS
     - |
@@ -117,6 +118,7 @@ validate-x86_64-darwin:
     ac_cv_func_clock_gettime: "no"
     LANG: "en_US.UTF-8"
   before_script:
+    - git clean -xdf && git submodule foreach git clean -xdf
     - python .gitlab/fix-submodules.py
     - git submodule sync --recursive
     - git submodule update --init --recursive
@@ -143,6 +145,7 @@ validate-x86_64-darwin:
   tags:
     - x86_64-linux
   before_script:
+    - git clean -xdf && git submodule foreach git clean -xdf
     - python3 .gitlab/fix-submodules.py
     - git submodule sync --recursive
     - git submodule update --init --recursive
diff --git a/.gitlab/darwin-init.sh b/.gitlab/darwin-init.sh
index e17c7c7..ba5de9d 100644
--- a/.gitlab/darwin-init.sh
+++ b/.gitlab/darwin-init.sh
@@ -12,7 +12,9 @@ fi
 if [ ! -e $toolchain/bin/ghc ]; then
     mkdir -p tmp
     cd tmp
-    curl https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-x86_64-apple-darwin.tar.xz | tar -xJ
+    ghc_tarball="https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-x86_64-apple-darwin.tar.xz"
+    echo "Fetching GHC from $ghc_tarball"
+    curl $ghc_tarball | tar -xJ
     cd ghc-$GHC_VERSION
     ./configure --prefix=$toolchain
     make install
@@ -22,6 +24,7 @@ fi
 
 if [ ! -e $toolchain/bin/cabal ]; then
     cabal_tarball="https://downloads.haskell.org/~cabal/cabal-install-latest/cabal-install-2.4.1.0-x86_64-apple-darwin-sierra.tar.xz"
+    echo "Fetching cabal-install from $cabal_tarball"
     curl $cabal_tarball | tar -xz
     mv cabal $toolchain/bin
 fi



More information about the ghc-commits mailing list