-
Notifications
You must be signed in to change notification settings - Fork 579
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
Better build and release #1873
Merged
Merged
Better build and release #1873
Conversation
This file contains 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
nickstenning
force-pushed
the
better-build-and-release
branch
9 times, most recently
from
August 13, 2024 15:20
d937436
to
e660f80
Compare
There's more I want to do here, specifically to replace the |
nickstenning
force-pushed
the
better-build-and-release
branch
2 times, most recently
from
August 13, 2024 18:16
9283484
to
fc7f760
Compare
technillogue
approved these changes
Aug 13, 2024
This changes the Go build to use a wheel with the full version identifier in its filename. In addition to making it clearer which version of Cog is being embedded while building, this also allows us to supply a pre-built wheel in CI.
This slims down our wheel from about 100K to about 56K. In a followup commit, we'll run the tests against the `cog` package installed from the built wheel, so we're testing the code exactly as it will be installed in a consumer environment.
nickstenning
force-pushed
the
better-build-and-release
branch
2 times, most recently
from
August 13, 2024 20:53
9090595
to
07ffaff
Compare
This splits the building of the Python package into its own job, and then runs the tests against the built package. This gives us the greatest chance of testing exactly the code we run in a consumer environment. It will also allow us to build and push the PyPI package in a separate workflow, knowing that the package we build from the same source ref will be identical.
This is required by recent versions of goreleaser so we might as well bump this here.
nickstenning
force-pushed
the
better-build-and-release
branch
2 times, most recently
from
August 13, 2024 21:28
cd887f2
to
92b6f17
Compare
We use goreleaser to build cog for releases, so to minimise differences between dev and release, we should also use it to build cog in development. This commit updates the build steps in the Makefile to call `goreleaser build`.
nickstenning
force-pushed
the
better-build-and-release
branch
from
August 13, 2024 21:30
92b6f17
to
3417f75
Compare
nickstenning
force-pushed
the
better-build-and-release
branch
from
August 13, 2024 21:37
3417f75
to
7572375
Compare
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.
This PR contains several changes which attempt to improve how we build and release Cog.
cog
's Go binary, we embed the wheel with the full path generated bybuild
. This makes it clearer what version of cog's Python package is being injected by any givencog
binary at runtime.cog
package installed from the built wheel, not against an editable installation from the local directory.goreleaser
to buildcog
so we have only one way of building thecog
binary, not two.v1.2.3
, a build on an untagged commit should now be1.2.4-dev+g1234abcd
by default. The Python version will differ slightly as it is a PEP440 version, not a semver version, but the generated versions should now be largely comparable.