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

* Use 9.8.0 for GHC 9.8.1-alpha4

* 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

* Bump version to 0.17.today
  • Loading branch information
andreasabel committed Oct 10, 2023
1 parent 7e62956 commit d143f0c
Show file tree
Hide file tree
Showing 31 changed files with 379 additions and 326 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.7

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

Change(s) in this fork:

- 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`.
As a consequence of the change, GHC 9.8.0 (with `head.hackage`) can be tested even after the release of GHC 9.8.1.
See: https://github.com/haskell-CI/haskell-ci/issues/631

- 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.

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 @@ -40,7 +57,7 @@ GHC-7.0.1 — GHC-9.6.1 are supported.
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 @@ -71,30 +88,30 @@ GHC-7.0.1 — GHC-9.6.1 are supported.
$ 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
6 changes: 3 additions & 3 deletions fixtures/all-versions.bash
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# SUCCESS
# *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.6.1 9.6.2 9.6.3 9.8.1 ghcjs-8.4
# *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.6.1 9.6.2 9.6.3 9.8.0 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 All @@ -21,7 +21,7 @@ fi

CFG_CABAL_STORE_CACHE=""
CFG_CABAL_REPO_CACHE=""
CFG_JOBS="9.8.1 9.6.3 9.6.2 9.6.1 9.4.7 9.4.6 9.4.5 9.4.4 9.4.3 9.4.2 9.4.1 9.2.8 9.2.7 9.2.6 9.2.5 9.2.4 9.2.3 9.2.2 9.2.1 9.0.2 9.0.1 8.10.7 8.10.6 8.10.5 8.10.4 8.10.3 8.10.2 8.10.1 8.8.4 8.8.3 8.8.2 8.8.1 8.6.5 8.6.4 8.6.3 8.6.2 8.6.1 8.4.4 8.4.3 8.4.2 8.4.1 8.2.2 8.2.1 8.0.2 8.0.1 7.10.3 7.10.2 7.10.1 7.8.4 7.8.3 7.8.2 7.8.1 7.6.3 7.6.2 7.6.1 7.4.2 7.4.1 7.2.2 7.2.1 7.0.4 7.0.3 7.0.2 7.0.1"
CFG_JOBS="9.8.1 9.8.0 9.6.3 9.6.2 9.6.1 9.4.7 9.4.6 9.4.5 9.4.4 9.4.3 9.4.2 9.4.1 9.2.8 9.2.7 9.2.6 9.2.5 9.2.4 9.2.3 9.2.2 9.2.1 9.0.2 9.0.1 8.10.7 8.10.6 8.10.5 8.10.4 8.10.3 8.10.2 8.10.1 8.8.4 8.8.3 8.8.2 8.8.1 8.6.5 8.6.4 8.6.3 8.6.2 8.6.1 8.4.4 8.4.3 8.4.2 8.4.1 8.2.2 8.2.1 8.0.2 8.0.1 7.10.3 7.10.2 7.10.1 7.8.4 7.8.3 7.8.2 7.8.1 7.6.3 7.6.2 7.6.1 7.4.2 7.4.1 7.2.2 7.2.1 7.0.4 7.0.3 7.0.2 7.0.1"
CFG_CABAL_UPDATE=false

SCRIPT_NAME=$(basename "$0")
Expand Down
15 changes: 11 additions & 4 deletions fixtures/all-versions.github
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# SUCCESS
# *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.6.1 9.6.2 9.6.3 9.8.1 ghcjs-8.4
# *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.6.1 9.6.2 9.6.3 9.8.0 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 @@ -38,6 +38,11 @@ jobs:
compilerVersion: 9.8.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.8.0.20230929
compilerKind: ghc
compilerVersion: 9.8.0.20230929
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.3
compilerKind: ghc
compilerVersion: 9.6.3
Expand Down Expand Up @@ -371,6 +376,7 @@ jobs:
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
else
Expand All @@ -383,6 +389,7 @@ jobs:
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
env:
Expand Down
11 changes: 7 additions & 4 deletions fixtures/all-versions.travis
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# SUCCESS
# *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.6.1 9.6.2 9.6.3 9.8.1 ghcjs-8.4
# *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.6.1 9.6.2 9.6.3 9.8.0 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 @@ -39,6 +39,9 @@ jobs:
- compiler: ghc-9.8.1
addons: {"apt":{"packages":["ghc-9.8.1","cabal-install-3.10"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}}
os: linux
- compiler: ghc-9.8.0
addons: {"apt":{"packages":["ghc-9.8.0","cabal-install-3.10"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}}
os: linux
- compiler: ghc-9.6.3
addons: {"apt":{"packages":["ghc-9.6.3","cabal-install-3.10"],"sources":[{"key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286","sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main"}]}}
os: linux
Expand Down Expand Up @@ -333,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
8 changes: 5 additions & 3 deletions fixtures/copy-fields-all.github
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#
# 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 ["--copy-fields=all","github","copy-fields-all.project"]
#
Expand All @@ -23,7 +23,7 @@ jobs:
timeout-minutes:
60
container:
image: buildpack-deps:bionic
image: buildpack-deps:focal
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
Expand Down Expand Up @@ -193,6 +193,7 @@ jobs:
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
else
Expand All @@ -202,6 +203,7 @@ jobs:
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
env:
Expand Down Expand Up @@ -287,7 +289,7 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: source
- name: initial cabal.project for sdist
Expand Down

0 comments on commit d143f0c

Please sign in to comment.