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

binaries and publish builds need to work together in release #1303

Open
leighmcculloch opened this issue Apr 30, 2024 · 1 comment
Open

binaries and publish builds need to work together in release #1303

leighmcculloch opened this issue Apr 30, 2024 · 1 comment

Comments

@leighmcculloch
Copy link
Member

I naively separated the binaries and publish builds, but it turns out that they had a dependency on each other for releases.

The binaries workflow works just fine on PRs, but for release builds get use the cargo tooling to prepare the package first before building to ensure that what gets built for the binary is based exactly the same as what is packed and published on crates.io (cargo makes modifications during packaging).

Unfortunately though cargo package tries to collect locally housed dependencies during the package process, because packaging doesn't really yet fully support workspaces containing multiple crates.

This was never a problem in the past because in the past the binary workflow was part of the publish workflow and the publish happened first.

Now that the binary workflow is its own workflow, that dependence has been separated and the binaries workflow fails unless the publish workflow runs to completion first.

@leighmcculloch
Copy link
Member Author

leighmcculloch commented Apr 30, 2024

There's a couple ways we could solve this issue:

1. Change the binaries workflow so it isn't directly triggered by releases, and instead have the publish workflow call the binaries workflow after publishing is complete. This should be a small change assuming no permissions issues to navigate.

2. Put the binaries workflow back inside the publish workflow, and have the publish workflow triggered by PRs but just have it not do the publish part of the workflow when triggered by PRs.

I favour 2 because it results in the same workflows being triggered in both PRs and releases, and less workflows with simpler relationships, but both solutions would work. Other solutions may exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant