Repository navigation
feat: releases ship prebuilt binaries, so CI can download the generator instead of compiling it - #141
Merged
Conversation
…or instead of compiling it When release-please creates a release, a follow-up job cross-compiles linux, darwin and windows on amd64 and arm64 and uploads tarballs plus checksums.txt to it. A cold `go tool` run spends nearly all its time compiling the generator and libopenapi; a download skips that. `--version` reports the release tag, or the module version for `go install` and `go tool` builds, so a pipeline can confirm which generator it ran.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A cold
go tool github.com/parallelworks/openapi-client-generatorin CI spends nearly all its time compiling the generator and libopenapi (26s in core's SDK freshness job before #139). Prebuilt release binaries let a pipeline download it in about a second.Changes
release-please.yml: abinariesjob runs when release-please creates a release. It checks out the tag, cross-compileslinux|darwin|windows×amd64|arm64with-trimpath -s -wandCGO_ENABLED=0, and uploadsopenapi-client-generator_<version>_<os>_<arch>.tar.gzpluschecksums.txtwithgh release upload. Only that job getscontents: write, and the tag reaches the shell throughenv.--versionreports the release tag (set by-ldflags -X), or the module version from build info forgo install/go toolbuilds.Testing
TAG=v0.0.0-test: six tarballs and checksums, and the extracted darwin/arm64 binary printsopenapi-client-generator version v0.0.0-test.--versionprints the build-info module version.