Note: this is a fork of https://github.com/haskell-CI/haskell-ci, rebased on the original.
Change(s) in this fork:
-
Default install method is
ghcuprather thanhvr-ppa. See: haskell-CI#685 -
Use
.0for GHC prereleases instead of.1. E.g. here you declaretested-with: GHC == 9.10.0to get CI for a prerelease of GHC 9.10. In the original, you declaretested-with: GHC == 9.10.1. See: haskell-CI#631Note: After a release of GHC, support for prereleases is dropped even from this fork of
haskell-ci.
Full change set at: https://github.com/haskell-CI/haskell-ci/compare/master...andreasabel:haskell-ci:master
haskell-ci - CI generator for multiple GHC versions
At the moment haskell-ci support GitHub Actions workflow generation.
There is also legacy Travis-CI configuration generator, which is unmaintained.
haskell-ci relies on hvr-ppa
or ghcup to install GHC
and cabal-install.
-
Step 1: Clone and install this project in/from any directory
$ git clone https://github.com/haskell-CI/haskell-ci.git $ cd haskell-ci $ cabal install haskell-ci:exe:haskell-cior
cabal install haskell-ci
-
Step 2: Change directories to your project:
$ cd path/to/your-project -
Step 3: Edit your project's
*.cabalfile to add atested-withline, such as this one:$ cat your-project.cabal ... tested-with: GHC ==9.6.3 || ==9.4.8 || ==9.2.8 ...
Add as many or as few GHC versions to test as you want.
-
Step 4: Generate a workflow file for your project:
$ # You run the following command from your project's directory, even $ # though it references the script from the `haskell-ci` project $ haskell-ci github your-project.cabal
Note: If you have multiple local Cabal projects that you wish to build together using a
cabal.projectfile, pass that file to haskell-ci instead:$ haskell-ci github cabal.project
The
haskell-citool looks at theTested-Withline in your*.cabalfiles and generates a configuration that tests each compiler version you listed in parallel. -
Step 5: Create a pull request with your new CI configuration.
... or push directly to your main branch if you feel lucky.
Sometimes you may need to regenerate CI script, for example, when adding new compiler version to
tested-with. You may simply runhaskell-ci regenerate.