rustls-platform-verifier
rustls-platform-verifier copied to clipboard
WIP: Automated android branch builds
This PR is a followup to #32, in order to reduce friction around Cargo Git dependencies.
To create this, these changes introduce a new GitHub Action workflow that runs on every successful merge to main. The action follows these high-level steps:
- Reset the
main-with-mavenbranch state to matchmain. - Run the packaging script and generate the local maven repository
- Run
git add --forceto include the generated files and artifacts. - Commit the artifacts in a dedicated commit that is clear in purpose.
- Force push and overwrite the
main-with-mavenbranch with the new artifacts.
As the end result, there is a branch with identical contents to crates.io releases. As noted in the parent PR, this allows us to keep some of the nice properties of Cargo's Git dependency management and avoid friction between true releases.
One open question is if this should wipe out main-with-maven's Git history each time or if it should perform a git merge instead. The upsides of the former are that its simple, clean over time, and easy to follow. The downside is that a merge to main may render that commit revision useless for those. It should be available for quite some time though unless GitHub intervenes and manually purges the repository cache. I lean towards wiping it every time given the above.
This will need some cleanup to checkout the correct branch ~and push only the new commit~, but that is blocked on the parent PR merging so main has the new packaging script and template available.
With that said, this confirms the general idea works. You can see a commit with the pre-built maven repository here: https://github.com/rustls/rustls-platform-verifier/commit/a54d920c8f7bcb19a6cd93327129734b094c06f9