Skip to content

chore: add binary caching#408

Merged
agarvin-nr merged 25 commits intomainfrom
agarvin/binaryCache
Oct 9, 2025
Merged

chore: add binary caching#408
agarvin-nr merged 25 commits intomainfrom
agarvin/binaryCache

Conversation

@agarvin-nr
Copy link
Contributor

@agarvin-nr agarvin-nr commented Oct 2, 2025

Summary

  • Caches GoReleaser binaries

Validation

  • Adds a step which validates whether dist files exist (whether cached or fresh):
    • Verifies that metadata files exist (artifacts.json and metadata.json)
    • Verifies that binary files exist
    • Verifies that archive and package files exist, and validates their checksums
  • Run workflows in GitHub twice (with and without caching)

Copy link
Contributor Author

@agarvin-nr agarvin-nr Oct 6, 2025

Choose a reason for hiding this comment

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

Trying a hard stop if metadata isn't found in the cached build, following this discussion on the original draft.

Copy link
Contributor Author

@agarvin-nr agarvin-nr Oct 6, 2025

Choose a reason for hiding this comment

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

Given that CI only uses a single arch, is checking for all binaries like this overkill?

If so, we may only need to check for metadata.json here - We do a separate check for the specific arch's binary in a later step.

@agarvin-nr agarvin-nr marked this pull request as ready for review October 6, 2025 16:53
@agarvin-nr agarvin-nr requested a review from a team as a code owner October 6, 2025 16:53
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That sounds much nicer, I'll look into that, thank you!

Copy link
Contributor

Choose a reason for hiding this comment

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

What are your thoughts on moving this to its own bash script? Since it's just a sanity check if might make sense to not clutter the workflow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Putting it in its own bash script sounds much better to me! We might be able to re-use it for other workflows in the future that way.

I can do the same for the Verify source files exist step too, since it's a similar sanity check.

Copy link
Contributor

@mailo-nr mailo-nr left a comment

Choose a reason for hiding this comment

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

Looks good

@agarvin-nr agarvin-nr merged commit 892bc8a into main Oct 9, 2025
24 checks passed
@agarvin-nr agarvin-nr deleted the agarvin/binaryCache branch October 9, 2025 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments