Skip to content

Commit

Permalink
Abel fork of Haskell-CI
Browse files Browse the repository at this point in the history
This combines all the changes wrt. the original Haskell-CI into one
commit, so that it can more easily be rebased onto the changes in the original.

* README: clarify the relation of this fork to the original

* Switch default distro to focal; use actions/checkout@v4 when possible

  `actions/checkout@v4` does not work with `bionic` (18.04).
  So we switch to `focal` (20.04), dropping most of GHC 7 support.
  GHC 7.10.3 is still supported, and 7.4.2, 7.2.2 and 7.0.4.

  Addresses haskell-CI#628

* GitHub: change default from `hvr-ppa` to `ghcup` for GHC 8 and up

  This fork makes `haskell-ci github` prefer the `ghcup` installation
  method over the `hvr-ppa` method for all GHC versions that are
  properly supported by `ghcup`.
  (Excludes GHC 7.10.3 which malfunctions if installed with ghcup.)

  Previously, `hvr-ppa` was the default for all versions it supported.

* Bump version to 0.17.today
  • Loading branch information
andreasabel committed Nov 12, 2023
1 parent e0dd023 commit 5ef4344
Show file tree
Hide file tree
Showing 32 changed files with 547 additions and 512 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
HC ?= ghc-9.2.7
HC ?= ghc-9.4.8

build :
cabal v2-build -w $(HC)
Expand Down
35 changes: 28 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
Note: this is a fork of https://github.com/haskell-CI/haskell-ci, rebased on the original.

Change(s) in this fork:

1. Default distribution is `focal` instead of `bionic`.
So, consistently only GHC 7.10.3 and up are supported.
See: https://github.com/haskell-CI/haskell-ci/issues/628.

2. Default install method is `ghcup` rather than `hvr-ppa`.
See: https://github.com/haskell-CI/haskell-ci/pull/685

3. Use `.0` for GHC prereleases instead of `.1`.
E.g. here you declare `tested-with: GHC == 9.8.0` to get CI for a prerelease of GHC 9.8.
In the original, you declare `tested-with: GHC == 9.8.1`.
See: https://github.com/haskell-CI/haskell-ci/issues/631

Note: 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](http://haskell.org/ghc) versions
=============================================================================

Expand Down Expand Up @@ -38,7 +59,7 @@ and `cabal-install`.
Tested-With: GHC ==8.6.5 || ==8.4.4 || ==8.2.2
...
```

Add as many or as few GHC versions to test as you want.

* Step 4: Generate a workflow file for your project:
Expand Down Expand Up @@ -69,30 +90,30 @@ and `cabal-install`.
$ git commit -m "New CI script"
$ git push -u origin new-ci # Push your branch upstream
```

* Step 6: Fix the build

If you're lucky, your repository will build for every compiler version
you listed. If that's the case, then just merge your changes into `master`:

```bash
$ git checkout master
$ git merge new-ci # Update `master` with your new CI script
$ git push
```

You can also merge your branch into `master` from Github's pull request view.

If you're not lucky, then your new CI branch will fail for one or more
versions of GHC, which is okay! Look at the build and fix any build failures
you find and commit the fixes to your branch:

```bash
$ # Fix any build failures you find and commit your changes
$ ...
$ git push # Push your branch updates upstream
```

Sometimes you may need to regenerate CI script, for example, when
adding new compiler version to `tested-with`.
You may simply run `haskell-ci regenerate`.
Expand Down
1 change: 1 addition & 0 deletions fixtures/all-versions.args
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--distribution=bionic
2 changes: 1 addition & 1 deletion fixtures/all-versions.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# *INFO* Generating Bash script for testing for GHC versions: 7.0.1 7.0.2 7.0.3 7.0.4 7.2.1 7.2.2 7.4.1 7.4.2 7.6.1 7.6.2 7.6.3 7.8.1 7.8.2 7.8.3 7.8.4 7.10.1 7.10.2 7.10.3 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2 8.8.3 8.8.4 8.10.1 8.10.2 8.10.3 8.10.4 8.10.5 8.10.6 8.10.7 9.0.1 9.0.2 9.2.1 9.2.2 9.2.3 9.2.4 9.2.5 9.2.6 9.2.7 9.2.8 9.4.1 9.4.2 9.4.3 9.4.4 9.4.5 9.4.6 9.4.7 9.4.8 9.6.1 9.6.2 9.6.3 9.8.1 ghcjs-8.4
#!/bin/bash
# shellcheck disable=SC2086,SC2016,SC2046
# REGENDATA ["bash","all-versions.project"]
# REGENDATA ["--distribution=bionic","bash","all-versions.project"]

set -o pipefail

Expand Down
46 changes: 23 additions & 23 deletions fixtures/all-versions.github
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# *INFO* Generating GitHub config for testing for GHC versions: 7.0.1 7.0.2 7.0.3 7.0.4 7.2.1 7.2.2 7.4.1 7.4.2 7.6.1 7.6.2 7.6.3 7.8.1 7.8.2 7.8.3 7.8.4 7.10.1 7.10.2 7.10.3 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2 8.8.3 8.8.4 8.10.1 8.10.2 8.10.3 8.10.4 8.10.5 8.10.6 8.10.7 9.0.1 9.0.2 9.2.1 9.2.2 9.2.3 9.2.4 9.2.5 9.2.6 9.2.7 9.2.8 9.4.1 9.4.2 9.4.3 9.4.4 9.4.5 9.4.6 9.4.7 9.4.8 9.6.1 9.6.2 9.6.3 9.8.1 ghcjs-8.4
# This GitHub workflow config has been generated by a script via
#
# haskell-ci 'github' 'all-versions.project'
# haskell-ci '--distribution=bionic' 'github' 'all-versions.project'
#
# To regenerate the script (for example after adjusting tested-with) run
#
# haskell-ci regenerate
#
# For more information, see https://github.com/haskell-CI/haskell-ci
# For more information, see https://github.com/andreasabel/haskell-ci
#
# REGENDATA ["github","all-versions.project"]
# REGENDATA ["--distribution=bionic","github","all-versions.project"]
#
name: Haskell-CI
on:
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
- compiler: ghc-9.0.1
compilerKind: ghc
compilerVersion: 9.0.1
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.10.7
compilerKind: ghc
Expand All @@ -161,82 +161,82 @@ jobs:
- compiler: ghc-8.10.4
compilerKind: ghc
compilerVersion: 8.10.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.10.3
compilerKind: ghc
compilerVersion: 8.10.3
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.10.2
compilerKind: ghc
compilerVersion: 8.10.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.10.1
compilerKind: ghc
compilerVersion: 8.10.1
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.8.4
compilerKind: ghc
compilerVersion: 8.8.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.8.3
compilerKind: ghc
compilerVersion: 8.8.3
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.8.2
compilerKind: ghc
compilerVersion: 8.8.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.8.1
compilerKind: ghc
compilerVersion: 8.8.1
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.5
compilerKind: ghc
compilerVersion: 8.6.5
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.4
compilerKind: ghc
compilerVersion: 8.6.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.3
compilerKind: ghc
compilerVersion: 8.6.3
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.2
compilerKind: ghc
compilerVersion: 8.6.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.1
compilerKind: ghc
compilerVersion: 8.6.1
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.4.4
compilerKind: ghc
compilerVersion: 8.4.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.4.3
compilerKind: ghc
compilerVersion: 8.4.3
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.4.2
compilerKind: ghc
compilerVersion: 8.4.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.4.1
compilerKind: ghc
Expand All @@ -246,7 +246,7 @@ jobs:
- compiler: ghc-8.2.2
compilerKind: ghc
compilerVersion: 8.2.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.2.1
compilerKind: ghc
Expand All @@ -256,7 +256,7 @@ jobs:
- compiler: ghc-8.0.2
compilerKind: ghc
compilerVersion: 8.0.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.0.1
compilerKind: ghc
Expand Down Expand Up @@ -371,7 +371,7 @@ jobs:
- name: apt
run: |
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
if [ "${{ matrix.setup-method }}" = ghcup ]; then
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
Expand Down
6 changes: 3 additions & 3 deletions fixtures/all-versions.travis
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# *INFO* Generating Travis-CI config for testing for GHC versions: 7.0.1 7.0.2 7.0.3 7.0.4 7.2.1 7.2.2 7.4.1 7.4.2 7.6.1 7.6.2 7.6.3 7.8.1 7.8.2 7.8.3 7.8.4 7.10.1 7.10.2 7.10.3 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2 8.8.3 8.8.4 8.10.1 8.10.2 8.10.3 8.10.4 8.10.5 8.10.6 8.10.7 9.0.1 9.0.2 9.2.1 9.2.2 9.2.3 9.2.4 9.2.5 9.2.6 9.2.7 9.2.8 9.4.1 9.4.2 9.4.3 9.4.4 9.4.5 9.4.6 9.4.7 9.4.8 9.6.1 9.6.2 9.6.3 9.8.1 ghcjs-8.4
# This Travis job script has been generated by a script via
#
# haskell-ci 'travis' 'all-versions.project'
# haskell-ci '--distribution=bionic' 'travis' 'all-versions.project'
#
# To regenerate the script (for example after adjusting tested-with) run
#
# haskell-ci regenerate
#
# For more information, see https://github.com/haskell-CI/haskell-ci
# For more information, see https://github.com/andreasabel/haskell-ci
#
version: ~> 1.0
language: c
Expand Down Expand Up @@ -336,5 +336,5 @@ script:
- rm -f cabal.project.local
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all

# REGENDATA ["travis","all-versions.project"]
# REGENDATA ["--distribution=bionic","travis","all-versions.project"]
# EOF

0 comments on commit 5ef4344

Please sign in to comment.