Skip to content

attempt to use local actions #10503

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

geekosaur
Copy link
Collaborator

@geekosaur geekosaur commented Nov 1, 2024

This PR redesigns our PR CI:

  • It moves a number of things to GitHub composite actions so they can be reused
  • It runs more things in parallel, reducing CI from nearly 3 hours in some cases to under an hour
  • It centralizes things like validated and bootstrapped GHC versions in a config.yml file rather than scattering them throughout the codebase

It also paves the way for things like

  • validating FreeBSD, static Alpine, and Intel Macs
  • doing prereleases from a dedicated job instead of trying to do them from CI (which won't work if CI doesn't get run as part of merging)

(Note that, as part of the second point above, this rewrite doesn't currently do prereleases at all. I can re-add that until said dedicated job is deployed.)

More details are in .github/README.md, which additionally details various other parts of our CI infrastructure.

Template B: This PR does not modify behaviour or interface

E.g. the PR only touches documentation or tests, does refactorings, etc.

Include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions). (No point in backporting, as even the LTS prerelease part has to live on master.)

@geekosaur geekosaur self-assigned this Nov 1, 2024
@geekosaur geekosaur force-pushed the validate-actions branch 29 times, most recently from 8565a7c to 501bde6 Compare November 2, 2024 13:59
@geekosaur geekosaur force-pushed the validate-actions branch 12 times, most recently from b9cd73b to 1215808 Compare July 12, 2025 17:36
@geekosaur
Copy link
Collaborator Author

okay, took a bit of fighting only to discover that a couple of typoes led to empty strings instead of useful errors, but I've merged the validate and bootstrap lists (see comments in .github/config.yml).

@geekosaur
Copy link
Collaborator Author

Next push will have a preliminary changelog. Would still like feedback on documentation, but I suspect we need to get 3.16 out of the way first.

@geekosaur geekosaur force-pushed the validate-actions branch 6 times, most recently from 8a4bd44 to 99fb64f Compare July 13, 2025 00:01
@geekosaur
Copy link
Collaborator Author

geekosaur commented Jul 18, 2025

I ended up switching the changelog to a README.md because this only affects CI and changelog-d doesn't like changelog fragments that don't list any packages.

Possible change I'm considering: someone has a yq analogous to jq, available for install via an action. I may look up how to install it separately, because it's the Makefile that really needs it so the ugly and fragile sed for make bootstrap-jsons can be replaced with a proper query of config.yml.

Other considerations:

  • location and naming of aforementioned README.md, which isn't really suitable for either end users or most contributors, only for people intending to work on CI
  • location of config.yml, with many of the same considerations

@geekosaur
Copy link
Collaborator Author

Bloody caches…

@geekosaur
Copy link
Collaborator Author

…right, and now it runs. Still, will need to switch to artifacts to avoid stuff randomly failing because GitHub ran their cache cleanup.

@geekosaur
Copy link
Collaborator Author

Welp. I researched how to save just the testing artifacts, got suspicious about test-runtime-deps, and promptly ran into #11048 which means that everything must be cached for the whole thing to work. We get away with it currently because build and test is all the same job, ignoring validate-old-ghcs which has to rebuild everything for the extra-ghc anyway. Which means there's no way to run tests in parallel without running afoul of GitHub periodically purging caches.

@geekosaur geekosaur linked an issue Jul 19, 2025 that may be closed by this pull request
Extremely experimental, and with all the limitations and
restrictions I keep finding in GitHub Actions it'll probably fail
in the messiest way it can.

At present this is incomplete but sufficient to see if this has
any chance of working to begin with. If it somehow does, I'll
look into abstracting out the other sub-jobs, then making an
overnight validate for Tier 2 platforms and probably a prerelease
job (which would fix the recently revealed problem where if there
is no need to rebase on merge, no prerelease is made).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

modernize and speed up PR CI
5 participants