rustls-platform-verifier icon indicating copy to clipboard operation
rustls-platform-verifier copied to clipboard

WIP: Automated android branch builds

Open complexspaces opened this issue 2 years ago • 1 comments
trafficstars

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:

  1. Reset the main-with-maven branch state to match main.
  2. Run the packaging script and generate the local maven repository
  3. Run git add --force to include the generated files and artifacts.
  4. Commit the artifacts in a dedicated commit that is clear in purpose.
  5. Force push and overwrite the main-with-maven branch 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.

complexspaces avatar Sep 09 '23 04:09 complexspaces

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

complexspaces avatar Sep 09 '23 05:09 complexspaces