FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-109408: Run `patchcheck` in GitHub Actions by sobolevn · Pull Request #109459 · python/cpython · GitHub

/ cpython Public
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ jobs:
make regen-deepfreeze
make -j4 regen-all
make regen-stdlib-module-names
- name: Run patchcheck
if: github.event_name == 'pull_request'
run: |
git fetch origin

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Do we need to fetch origin? It takes 1m 49s for this step.

We don't do it on Azure Pipelines and patchcheck takes 2s.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Let's try :)

I think that we might need it because of the heavy git machinery inside patchcheck.
I think we might need it during backports for older branches.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nope, it does not work:

Run # git fetch origin
Checked 107 modules (31 built-in, 75 shared, 1 n/a on linux-x86_64, 0 disabled, 0 missing, 0 failed on import)
LD_LIBRARY_PATH=/home/runner/work/cpython/cpython ./python ./Tools/patchcheck/patchcheck.py --ci true
Getting base branch for PR ... origin/main
fatal: ambiguous argument 'origin/main': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
error running git diff --name-status origin/main
make: *** [Makefile:2914: patchcheck] Error 1
Getting the list of files that have been added/changed ... 

make ARGS="--ci true" patchcheck
- name: Check for changes
run: |
git add -u
Expand Down
2 changes: 1 addition & 1 deletion Makefile.pre.in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2764,7 +2764,7 @@ funny:
# Perform some verification checks on any modified files.
.PHONY: patchcheck
patchcheck: all
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/patchcheck/patchcheck.py
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/patchcheck/patchcheck.py $(ARGS)

.PHONY: check-limited-abi
check-limited-abi: all
Expand Down

Back | FazBrowse Home | New Git URL