summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-01-15 08:46:11 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-01-20 15:34:43 -0500
commit2bfabd2282e9ced19a273aa94b5d8dd1a27d6bfa (patch)
tree76d8fbce851b9f952cbbcf1e0ee4cf30b1c7e076
parent0c04a86af8bc04ee6f966a17381b88a297a54836 (diff)
downloadhaskell-2bfabd2282e9ced19a273aa94b5d8dd1a27d6bfa.tar.gz
gitlab-ci: Allow submodule cleaning to fail on Windows
Currently CI is inexplicably failing with ``` $ git submodule foreach git clean -xdf fatal: not a git repository: libffi-tarballs/../.git/modules/libffi-tarballs ``` I have no idea how this working tree got into such a state but we do need to fail more gracefully when it happens. Consequently, we allow the cleaning step to fail.
-rw-r--r--.gitlab-ci.yml10
1 files changed, 7 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d364d49ee8..b28045f9f7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -769,7 +769,6 @@ validate-x86_64-linux-fedora27:
<<: *only-default
before_script:
- git clean -xdf
- - git submodule foreach git clean -xdf
# Use a local temporary directory to ensure that concurrent builds don't
# interfere with one another
@@ -779,8 +778,13 @@ validate-x86_64-linux-fedora27:
set TEMP=%cd%\tmp
- set PATH=C:\msys64\usr\bin;%PATH%
- - git submodule sync --recursive
- - git submodule update --init --recursive
+ # On Windows submodules can inexplicably get into funky states where git
+ # believes that the submodule is initialized yet its associated repository
+ # is not valid. Avoid failing in this case with the following insanity.
+ - |
+ bash -c 'git submodule sync --recursive || git submodule deinit --force --all'
+ bash -c 'git submodule update --init --recursive'
+ git submodule foreach git clean -xdf
- git checkout .gitmodules
- "git fetch https://gitlab.haskell.org/ghc/ghc-performance-notes.git refs/notes/perf:refs/notes/perf || true"
- bash .gitlab/win32-init.sh