Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-generate CMake file lists in GitHub action #10592

Merged
merged 1 commit into from
Sep 16, 2022

Conversation

acozzette
Copy link
Member

This GitHub action will run after each pull request merge and will auto-update the file lists in in src/file_lists.cmake. The action will run as our bot account.

I realized that if a bug somehow made the file generation non-idempotent, this could trigger an infinite loop of commits, so I put in an extra safeguard against that. If the previous commit was by "Protobuf Team Bot", the GitHub action will revert any local changes to ensure that no new commit will be made.

Copy link
Member

@mkruskal-google mkruskal-google left a comment

Choose a reason for hiding this comment

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

This is awesome! Can we test this before submitting it though? The only way to tell if this is actually working (AFAICT) is to submit this PR, and then submit a dependency change that shuffle the cmake file list

@acozzette acozzette force-pushed the cmake-file-generation branch from e5b8b49 to 1daa296 Compare September 16, 2022 16:57
@acozzette
Copy link
Member Author

I did test it out on my personal fork and confirmed that it worked there, but I guess the only way to know for sure that it works in the main repo is to submit it and see what happens. That's a good idea to shuffle the file list, I think I'll try that afterward as a way to confirm that the action works.

@mkruskal-google
Copy link
Member

Nice, that's more than anything I thought of! As long as the functionality works any breakages will likely just be from config/settings

@acozzette acozzette force-pushed the cmake-file-generation branch from 8a69fef to 24e166e Compare September 16, 2022 20:29
This GitHub action will run after each pull request merge and will auto-update
the file lists in in src/file_lists.cmake. The action will run as our
bot account.

I realized that if a bug somehow made the file generation
non-idempotent, this could trigger an infinite loop of commits, so I put
in an extra safeguard against that. If the previous commit was by
"Protobuf Team Bot", the GitHub action will revert any local changes to
ensure that no new commit will be made.
@acozzette acozzette force-pushed the cmake-file-generation branch from 24e166e to 1f203ec Compare September 16, 2022 21:11
@acozzette acozzette merged commit 805812e into protocolbuffers:main Sep 16, 2022
@acozzette acozzette deleted the cmake-file-generation branch September 16, 2022 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants