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

build: cross compilation script duplicates some logic #789

Open
ee7 opened this issue Aug 16, 2023 · 0 comments
Open

build: cross compilation script duplicates some logic #789

ee7 opened this issue Aug 16, 2023 · 0 comments
Labels
kind: build Non-.nim changes that affect the release binary

Comments

@ee7
Copy link
Member

ee7 commented Aug 16, 2023

Follow-up from #460 (comment)

@ee7 ee7 added the kind: build Non-.nim changes that affect the release binary label Aug 16, 2023
ee7 added a commit that referenced this issue Aug 16, 2023
Before this commit, the publish-release script handled both:

- creating the draft release

- uploading assets to the release

with the intention that the first build job to finish would create the
release with one asset, and each later job would upload an asset.

The logic was like:

    if ! gh release view "${build_tag}"; then
      gh release create [...]
    else
      gh release upload [...]
    fi

But this had a race. For example, if two build jobs finished at nearly
the same moment, they could each create a draft release. This race was
almost never encountered in practice, and was easily resolved by
deleting a draft release and restarting a build job, but it's worth
resolving.

Add an initial build job to create a draft release that has no assets,
and make the later build jobs only upload to that release.

This fixes the race, and makes it easier to share logic between the
native build jobs and the cross-compiling build jobs.

Fixes: #551
Refs: #789
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: build Non-.nim changes that affect the release binary
Projects
None yet
Development

No branches or pull requests

1 participant