You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GitHub Action Ubuntu job doesn't check if generated files are up to date #380
Previously, Travis CI was mandatory on Python PRs. Travis CI was made optional, and instead GHA Ubuntu was made required.
The problem is that only Travis CI checked if generated files are up to date:
- eval "$(pyenv init -)"
- pyenv global 3.8
- PYTHON_FOR_REGEN=python3.8 make -j4 regen-all
- changes=`git status --porcelain`
- |
# Check for changes in regenerated files
if ! test -z "$changes"
then
echo "Generated files not up to date"
echo "$changes"
exit 1
fi
- make -j4
- make pythoninfo
These commands should be copied and adapted in .github/workflows/build.yml.
I actually have plans to eventually make this a separate GitHub Action from the build workflows, but who the heck knows when I will have time to make that actually happen. 😄
I actually have plans to eventually make this a separate GitHub Action from the build workflows, but who the heck knows when I will have time to make that actually happen. smile
I agree that it would be more reliable to not run "make regen-all" for the regular build. It's a good idea to have a separated job. It would also helper contributors to understand a job failure. Previous, the Travis CI error was not obvious.
Activity
FFY00 commentedon Oct 27, 2020
I can look at this tomorrow 😊
brettcannon commentedon Oct 27, 2020
I actually have plans to eventually make this a separate GitHub Action from the build workflows, but who the heck knows when I will have time to make that actually happen. 😄
vstinner commentedon Oct 27, 2020
I agree that it would be more reliable to not run "make regen-all" for the regular build. It's a good idea to have a separated job. It would also helper contributors to understand a job failure. Previous, the Travis CI error was not obvious.
vstinner commentedon Oct 30, 2020
Oh, by the way, Travis CI also checks for "make smelly": ensure that all symbols exported by libpython start with "Py" or "_Py".
FFY00 commentedon Oct 30, 2020
@vstinner should this be part of build actions for every OS, or is it fine to just run it one time on one OS (in a separate action)?
vstinner commentedon Oct 30, 2020
It's enough to test it on a single OS. I suggest to use Linux, since the checks were run on Linux previously.
A separated action would be better.
vstinner commentedon Oct 30, 2020
@FFY00 created https://bugs.python.org/issue42212
bpo-42212: check if generated files are up-to-date in github actions
bpo-42212: Check if generated files are up-to-date in GitHub Actions (G…
bpo-42212: Check if generated files are up-to-date in GitHub Actions (p…
bpo-42212: Check if generated files are up-to-date in GitHub Actions (p…
bpo-42212: Check if generated files are up-to-date in GitHub Actions (G…
bpo-42212: Check if generated files are up-to-date in GitHub Actions (G…
bpo-42212: Check if generated files are up-to-date in GitHub Actions (p…
nightlark commentedon Aug 21, 2021
Is there anything left to do for this issue? It looks like https://bugs.python.org/issue42212 on the python bug tracker is already marked as closed.
@brettcannon what did you have in mind for turning this into a separate GitHub Action? Is that still something you want done?
brettcannon commentedon Aug 23, 2021
@nightlark I created https://github.com/brettcannon/check-for-changed-files, but there's already something being done using
make patchcheckso it doesn't seem necessary.