Commit 2bfabd22 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

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.
parent 0c04a86a
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment