[Git][ghc/ghc][master] 6 commits: gitlab-ci: Linters, don't allow to fail
Ben Gamari
gitlab at gitlab.haskell.org
Sat Jun 8 17:37:14 UTC 2019
Ben Gamari pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
07dc79c3 by Matthew Pickering at 2019-06-08T17:34:18Z
gitlab-ci: Linters, don't allow to fail
Ben disabled them in cd85f8a71bb56cff332560e1d571b3406789fb71 but didn't
say how or why they were broken.
- - - - -
fd840b64 by Matthew Pickering at 2019-06-08T17:34:18Z
gitlab-ci: Don't run two submodule checking jobs on Marge jobs
- - - - -
310d0c4c by Matthew Pickering at 2019-06-08T17:34:18Z
Fix two lint failures in rts/linker/MachO.c
- - - - -
fe965316 by Ben Gamari at 2019-06-08T17:34:18Z
gitlab-ci: Use --unshallow when fetching for linters
GitLab creates a shallow clone. However, this means that we may not have
the base commit of an MR when linting, causing `git merge-base` to fail.
Fix this by passing `--unshallow` to `git fetch`, ensuring that we have
the entire history.
- - - - -
f58234ea by Ben Gamari at 2019-06-08T17:34:18Z
gitlab-ci: Fix submodule linter
The job script didn't even try to compute the base commit to lint with
respect to.
- - - - -
c392f987 by Ben Gamari at 2019-06-08T17:34:18Z
gitlab-ci: A few clarifying comments
- - - - -
2 changed files:
- .gitlab-ci.yml
- rts/linker/MachO.c
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -49,13 +49,18 @@ stages:
############################################################
ghc-linters:
- allow_failure: true
stage: lint
image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
script:
- - git fetch "$CI_MERGE_REQUEST_PROJECT_URL" $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
+ # Note [Unshallow clone for linting]
+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ # GitLab creates a shallow clone which means that we may not have the base
+ # commit of the MR being tested (e.g. if the MR is quite old), causing `git
+ # merge-base` to fail. Passing `--unshallow` to `git fetch` ensures that
+ # we have the entire history.
+ - git fetch --unshallow "$CI_MERGE_REQUEST_PROJECT_URL" $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
- base="$(git merge-base FETCH_HEAD $CI_COMMIT_SHA)"
- - "echo Merge base $base"
+ - "echo Linting changes between $base..$CI_COMMIT_SHA"
# - validate-commit-msg .git $(git rev-list $base..$CI_COMMIT_SHA)
- validate-whitespace .git $(git rev-list $base..$CI_COMMIT_SHA)
- .gitlab/linters/check-makefiles.py $base $CI_COMMIT_SHA
@@ -75,6 +80,10 @@ ghc-linters:
stage: lint
image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
script:
+ # See Note [Unshallow clone for linting]
+ - git fetch --unshallow "$CI_MERGE_REQUEST_PROJECT_URL" $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
+ - base="$(git merge-base FETCH_HEAD $CI_COMMIT_SHA)"
+ - "echo Linting changes between $base..$CI_COMMIT_SHA"
- submodchecker .git $(git rev-list $base..$CI_COMMIT_SHA)
dependencies: []
tags:
@@ -97,10 +106,15 @@ lint-submods-marge:
lint-submods-mr:
extends: .lint-submods
+ # Allow failure since any necessary submodule patches may not be upstreamed
+ # yet.
allow_failure: true
only:
refs:
- merge_requests
+ except:
+ variables:
+ - $CI_MERGE_REQUEST_LABELS =~ /.*wip/marge_bot_batch_merge_job.*/
.lint-changelogs:
stage: lint
@@ -117,6 +131,7 @@ lint-submods-mr:
lint-changelogs:
extends: .lint-changelogs
+ # Allow failure since this isn't a final release.
allow_failure: true
only:
refs:
=====================================
rts/linker/MachO.c
=====================================
@@ -1220,7 +1220,7 @@ ocGetNames_MachO(ObjectCode* oc)
IF_DEBUG(linker, debugBelch("ocGetNames_MachO: will load %d sections\n",
oc->n_sections));
-#if defined (ios_HOST_OS)
+#if defined(ios_HOST_OS)
for(int i=0; i < oc->n_sections; i++)
{
MachOSection * section = &oc->info->macho_sections[i];
@@ -1645,7 +1645,7 @@ ocResolve_MachO(ObjectCode* oc)
{
IF_DEBUG(linker, debugBelch("ocResolve_MachO: relocating section %d\n", i));
-#if defined aarch64_HOST_ARCH
+#if defined(aarch64_HOST_ARCH)
if (!relocateSectionAarch64(oc, &oc->sections[i]))
return 0;
#else
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/1afb499583f741a95cceb3207c5455c8ec6f5b87...c392f987de174ae04c6c7c47145dfe5db6427615
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/1afb499583f741a95cceb3207c5455c8ec6f5b87...c392f987de174ae04c6c7c47145dfe5db6427615
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190608/6817e4ff/attachment-0001.html>
More information about the ghc-commits
mailing list