Bobby Bruce has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/72221?usp=email )
Change subject: misc: Update CI tests to only require 1 Change-Id
......................................................................
misc: Update CI tests to only require 1 Change-Id
Since commits will be squashed and merged in GitHub, we only
require one of the commits to contain a Change-ID within a
pull request
Change-Id: I0fbb1c0e79009097456193fbe3c6fa20746e4805
---
M .github/workflows/ci-tests.yaml
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/ci-tests.yaml
b/.github/workflows/ci-tests.yaml
index 85836a2..520767b 100644
--- a/.github/workflows/ci-tests.yaml
+++ b/.github/workflows/ci-tests.yaml
@@ -26,16 +26,20 @@
fetch-depth: 0
- name: Check for Change-Id
run: |
+ # loop through all the commits in the pull request
for commit in $(git rev-list ${{
github.event.pull_request.base.sha }}..${{
github.event.pull_request.head.sha }}); do
git checkout $commit
- if !(git log -1 --pretty=format:"%s" | grep -q "Change-Id: ")
+ if (git log -1 --pretty=format:"%s" | grep -q "Change-Id: ")
then
- echo "One or more of the commits in this pull request is
missing a Change-ID, which we require for any changes made to gem5. "\
- "To automatically insert one, run the following:\n f=`git
rev-parse --git-dir`/hooks/commit-msg ; mkdir -p $(dirname $f) ; "\
- "curl -Lo $f
https://gerrit-review.googlesource.com/tools/hooks/commit-msg ; chmod +x
$f\n Then amend the commit with git commit --amend --no-edit, and update
your pull request."
- exit 1
+ # passes as long as at least one change-id exists in the
pull request
+ exit 0
fi
done
+ # if we reach this part, none of the commits had a change-id
+ echo "None of the commits in this pull request contains a
Change-ID, which we require for any changes made to gem5. "\
+ "To automatically insert one, run the following:\n f=`git
rev-parse --git-dir`/hooks/commit-msg ; mkdir -p $(dirname $f) ; "\
+ "curl -Lo $f
https://gerrit-review.googlesource.com/tools/hooks/commit-msg ; chmod +x
$f\n Then amend the commit with git commit --amend --no-edit, and update
your pull request."
+ exit 1
build-gem5:
runs-on: [self-hosted, linux, x64, build]
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/72221?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I0fbb1c0e79009097456193fbe3c6fa20746e4805
Gerrit-Change-Number: 72221
Gerrit-PatchSet: 2
Gerrit-Owner: Melissa Jost <melissakj...@gmail.com>
Gerrit-Reviewer: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org