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 node12 actions when possible

  `actions/{checkout,cache}@v4` do 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 Jan 27, 2024
1 parent b80197c commit 25bba4a
Show file tree
Hide file tree
Showing 33 changed files with 571 additions and 531 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,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 ["github","cabal.project"]
#
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
run: |
$CABAL v2-update -v
- name: cache (tools)
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-e27a5680
path: ~/.haskell-ci-tools
Expand Down Expand Up @@ -193,7 +193,7 @@ jobs:
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-e27a5680
path: ~/.haskell-ci-tools
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: source
- name: initial cabal.project for sdist
Expand Down Expand Up @@ -245,7 +245,7 @@ jobs:
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan
- name: restore cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
Expand Down Expand Up @@ -298,7 +298,7 @@ jobs:
if [ $((HCNUMVER < 80400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='deepseq ==1.4.*' --constraint='binary installed' all ; fi
if [ $((HCNUMVER < 80400)) -ne 0 ] ; then $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK --disable-tests --disable-benchmarks --constraint='deepseq ==1.4.*' --constraint='binary installed' all ; fi
- name: save cache
uses: actions/cache/save@v3
uses: actions/cache/save@v4
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
Expand Down
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
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
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`.
This allows the `node20` versions (`v4`) of the GitHub actions `cache` and `checkout`.
(On `bionic` we fall back to the `node16` versions (`v3`).)
Thus, by default, 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 +61,7 @@ and `cabal-install`.
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:
Expand All @@ -62,7 +85,7 @@ and `cabal-install`.
* 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 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.6.4 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.6.4 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 @@ -146,7 +146,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 @@ -166,82 +166,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 @@ -251,7 +251,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 @@ -261,7 +261,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 @@ -376,7 +376,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.6.4 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 @@ -339,5 +339,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 25bba4a

Please sign in to comment.