Skip to content

GitHub Action Ubuntu job doesn't check if generated files are up to date #380

Closed

Description

@vstinner

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.

Is there a volunteer to do that?

cc @FFY00 @ammaraskar

Activity

  1. FFY00 commented on Oct 27, 2020

    @FFY00
    Member

    I can look at this tomorrow 😊

  2. brettcannon commented on Oct 27, 2020

    @brettcannon
    Member

    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. 😄

  3. vstinner commented on Oct 27, 2020

    @vstinner
    MemberAuthor

    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.

  4. vstinner commented on Oct 30, 2020

    @vstinner
    MemberAuthor

    Oh, by the way, Travis CI also checks for "make smelly": ensure that all symbols exported by libpython start with "Py" or "_Py".

  5. FFY00 commented on Oct 30, 2020

    @FFY00
    Member

    @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)?

  6. vstinner commented on Oct 30, 2020

    @vstinner
    MemberAuthor

    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.

  7. vstinner commented on Oct 30, 2020

    @vstinner
    MemberAuthor
  8. added a commit that references this issue on Nov 20, 2020
  9. added 4 commits that reference this issue on Nov 24, 2020
  10. nightlark commented on Aug 21, 2021

    @nightlark

    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?

  11. brettcannon commented on Aug 23, 2021

    @brettcannon
    Member

    @nightlark I created https://github.com/brettcannon/check-for-changed-files, but there's already something being done using make patchcheck so it doesn't seem necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions