-
Notifications
You must be signed in to change notification settings - Fork 0
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
Publish Haddocks from CI as part of release #144
Conversation
Since implementing Kafka functionality, Hackage has been unable to build our Haddocks due to the system library requirement that introduced. Since then, we've been sporadically uploading docs using the `docs/upload` script, which relied on (nix and) cabal to use its `--haddock-for-hackage` flag. With the release of stack-v2.15, we can now: - Use its new `--haddock --haddock-for-hackage` options - Use the new `stack upload -d` option - Use `HACKAGE_KEY` to authorize `stack` for uploads So we can do all of this on CI, without incurring the need to use cabal instead of Stack there. We also don't really need `stack-upload-action` anymore, so that's been removed. I decided to add an additional build within `release.yml`, rather than: 1. Conditionally release from `ci.yml` after building, or 2. Attempting to upload artifacts from `ci.yml` for use in `release.yml` The reason for this is: - It made this the simplest change to accomplish the goal - It's somewhat valuable to add a requirement the thing builds before releasing, which wasn't the case before - The addition of Haddocks makes the build 23m cached-or-not, which we don't want to do except during release, and is fine to do post-merge, which is not holding anyone up
.github/workflows/release.yml
Outdated
- if: steps.tag.outputs.tag | ||
uses: freckle/stack-upload-action@v2 | ||
- run: | | ||
stack --stack-yaml stack-lts-18.28.yaml upload --pvp-bounds lower . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why such an old resolver here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually meant to comment this and will now, but:
The --pvp-bounds lower
option uses the resolver to decide the lower bounds. Since this is the oldest resolver we test with, the versions of the packages in this resolver are exactly what we want to be our lower bounds.
Haddock in the release workflow only seems fine. I would love to someday have "haddocks build without warning" asserted in CI though. |
- Float `env` out to Job-level - Add a little whitespace - Add `name` to `stack upload` steps - Comment why the old resolver
Me too, but I think that's going to require upstream improvements in how the build vs docs interact before that's possible. Making a cached build in this project go from 2m to 23m is potentially worth it, but it's absolutely untenable in a project like fancy-api, where it would move the cached build time to over an hour. |
Since implementing Kafka functionality, Hackage has been unable to build
our Haddocks due to the system library requirement that introduced.
Since then, we've been sporadically uploading docs using the
docs/upload
script, which relied on (nix and) cabal to use its--haddock-for-hackage
flag.With the release of stack-v2.15, we can now:
--haddock --haddock-for-hackage
optionsstack upload -d
optionHACKAGE_KEY
to authorizestack
for uploadsSo we can do all of this on CI, without incurring the need to use cabal
instead of Stack there. We also don't really need
stack-upload-action
anymore, so that's been removed.
I decided to add an additional build within
release.yml
, rather than:ci.yml
after building, orci.yml
for use inrelease.yml
The reason for this is:
releasing, which wasn't the case before
don't want to do except during release, and is fine to do post-merge,
which is not holding anyone up