Add support for CI with multiple GHC versions #660
Merged
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 fixes #581: test BSC not only with the GHC version used for releases (9.4.8) but also on newer GHC (such as 9.8.1). There are multiple ways to support this, but I did it by pulling out the Build and Test jobs into a separate YAML file that can be called like a function, passing in the OS version and GHC version. GitHub calls this "reusable workflows". There are separate versions for macOS and Ubuntu -- maybe we can use conditionals to write them in one file that's mostly the same except for a few places that need to differ -- but at least for now it is easy to diff the two files and confirm that they're the same where they need to be.
The top-level YAML is renamed
ci.yml
and it runs all OS versions with GHC 9.4.8 and then it has a job for testing the latest GHC (9.8.1) on one macOS and one Ubuntu. We could consider expanding that to more OSes or more GHC versions, if we think that adds value for the amount of time spent. (We could also start doing different checks for merges vs PRs: just a sampling of OSes for PRs, then a full matrix of OSes and GHCs once it's merged -- as a compromise.)This PR also resolves the testsuite failures for BSC compiled with GHC 9.8.1 (issue #659). The failing tests check the GHC version and expect a failure -- understanding why the failure is still TBD. To implement this, Bluetcl was updated to record the GHC version that was used to compile and to report it via a new subcommand
::Bluetcl::version ghc
, which is made available in the testsuite infrastructure. While I was there, I fixed how the infrastructure was getting the BSC version (which wasn't being used except to report it in a log file, but now it's reported readably, without extra junk lines that were accidentally captured in a regexp).Comments on the design choices here are welcome!