IntersectMBO / IntersectMBO/cardano-ledger
Speed up CI by allowing tests to start as soon as the build for the same ghc version has finished
- Dominant language
- Haskell
- Stars
- 295
- Forks
- 179
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 29
Description
Currently, the `test` job has to wait until all the matrix jobs in `build` have finished, because there's no built-in way to depend on part of a matrix.
However, someone has found a [workaround](https://github.com/orgs/community/discussions/42335#discussioncomment-7997348) for this, using the "reusable workflows" feature of GHA. It works because a reusable workflow can have an extra level of job nesting inside of it, and the matrix can be in the main workflow surrounding where it calls the reusable workflow. The `test` job within the reusable workflow can depend on the `build` within within the reusable workflow, without depending on the `build` from the other parts of the matrix.
Contributor guide
Research direction
Start by locating the GitHub Actions workflow definitions and reviewing how the build and test jobs are matrixed by GHC version. Read the linked reusable-workflow workaround, then restructure the jobs so each test can start after its matching build finishes. Done means the workflow preserves the existing build and test coverage while allowing per-GHC parallelism.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, haskell
- Domain
- build-system, ci-cd
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100