[commit: ghc] master: Revert "gitlab: Drop submodules hack" (a3c6f5e)
git at git.haskell.org
git at git.haskell.org
Fri Dec 21 21:56:34 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/a3c6f5e4f16301cb4b9bb1629108ce8525026eb9/ghc
>---------------------------------------------------------------
commit a3c6f5e4f16301cb4b9bb1629108ce8525026eb9
Author: Ben Gamari <ben at smart-cactus.org>
Date: Wed Dec 19 10:57:11 2018 -0500
Revert "gitlab: Drop submodules hack"
It turns out that the submodules hack is useful to ensure that
CI works in forks.
This reverts commit 90ceafa8b9ad60e3c7b72cdd2dacdbeb96bdcddc.
>---------------------------------------------------------------
a3c6f5e4f16301cb4b9bb1629108ce8525026eb9
.gitlab-ci.yml | 22 ++++++++++++++++++++--
.gitlab/fix-submodules.py | 8 ++++++++
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0fb8192..9c97baa 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,11 @@
variables:
GIT_SSL_NO_VERIFY: "1"
- GIT_SUBMODULE_STRATEGY: "recursive"
- LANG: "en_US.UTF-8"
+
+before_script:
+ - python3 .gitlab/fix-submodules.py
+ - git submodule sync --recursive
+ - git submodule update --init --recursive
+ - git checkout .gitmodules
stages:
- lint
@@ -50,6 +54,10 @@ validate-x86_64-linux-deb8-hadrian:
before_script:
# workaround for docker permissions
- sudo chown ghc:ghc -R .
+ - python3 .gitlab/fix-submodules.py
+ - git submodule sync --recursive
+ - git submodule update --init --recursive
+ - git checkout .gitmodules
tags:
- x86_64-linux
@@ -94,6 +102,11 @@ validate-x86_64-darwin:
ac_cv_func_clock_gettime: "no"
LANG: "en_US.UTF-8"
before_script:
+ - python .gitlab/fix-submodules.py
+ - git submodule sync --recursive
+ - git submodule update --init --recursive
+ - git checkout .gitmodules
+
- bash .gitlab/darwin-init.sh
- PATH="`pwd`/toolchain/bin:$PATH"
# Disable sphinx PDF output as MacTeX apparently doesn't provide xelatex
@@ -115,6 +128,11 @@ validate-x86_64-darwin:
tags:
- x86_64-linux
before_script:
+ - python3 .gitlab/fix-submodules.py
+ - git submodule sync --recursive
+ - git submodule update --init --recursive
+ - git checkout .gitmodules
+
- bash .circleci/prepare-system.sh
# workaround for docker permissions
- sudo chown ghc:ghc -R .
diff --git a/.gitlab/fix-submodules.py b/.gitlab/fix-submodules.py
new file mode 100644
index 0000000..2ff8e41
--- /dev/null
+++ b/.gitlab/fix-submodules.py
@@ -0,0 +1,8 @@
+#!/usr/bin/python
+
+import re
+
+x = open('.gitmodules').read()
+x = re.sub(r"url *= *\.\.", "url = https://gitlab.haskell.org/ghc", x)
+open('.gitmodules', 'w').write(x)
+
More information about the ghc-commits
mailing list