[Git][ghc/ghc][wip/memory-barriers] 2 commits: gitlab-ci: Fix submodule linter

Ben Gamari gitlab at gitlab.haskell.org
Fri Jun 7 15:15:01 UTC 2019



Ben Gamari pushed to branch wip/memory-barriers at Glasgow Haskell Compiler / GHC


Commits:
4acac14e by Ben Gamari at 2019-06-07T15:14:07Z
gitlab-ci: Fix submodule linter

The job script didn't even try to compute the base commit to lint with
respect to.

- - - - -
9caa7ab8 by Ben Gamari at 2019-06-07T15:14:42Z
gitlab-ci: A few clarifying comments

- - - - -


1 changed file:

- .gitlab-ci.yml


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -52,6 +52,8 @@ ghc-linters:
   stage: lint
   image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
   script:
+    # 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
@@ -78,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:
@@ -100,6 +106,8 @@ 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:
@@ -123,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:



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/89c0b258bfb031c81332d5bc62c4296824b9e7cb...9caa7ab8f878a1a5e4c4fcf2fad15d94fb0fe56c

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/89c0b258bfb031c81332d5bc62c4296824b9e7cb...9caa7ab8f878a1a5e4c4fcf2fad15d94fb0fe56c
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/20190607/0baf4a39/attachment-0001.html>


More information about the ghc-commits mailing list