Skip to content

Commit 5e974de

Browse files
committed
Regenerate GHA haskell-ci.yml
1 parent c28b91a commit 5e974de

File tree

2 files changed

+29
-27
lines changed

2 files changed

+29
-27
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.11.20210220
11+
# version: 0.12
1212
#
13-
# REGENDATA ("0.11.20210220",["github","cabal.project"])
13+
# REGENDATA ("0.12",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -22,39 +22,39 @@ on:
2222
- master
2323
jobs:
2424
linux:
25-
name: Haskell-CI - Linux - GHC ${{ matrix.ghc }}
25+
name: Haskell-CI - Linux - ${{ matrix.compiler }}
2626
runs-on: ubuntu-18.04
2727
container:
2828
image: buildpack-deps:bionic
2929
continue-on-error: ${{ matrix.allow-failure }}
3030
strategy:
3131
matrix:
3232
include:
33-
- ghc: 9.0.1
33+
- compiler: ghc-9.0.1
3434
allow-failure: false
35-
- ghc: 8.10.4
35+
- compiler: ghc-8.10.4
3636
allow-failure: false
37-
- ghc: 8.8.4
37+
- compiler: ghc-8.8.4
3838
allow-failure: false
39-
- ghc: 8.6.5
39+
- compiler: ghc-8.6.5
4040
allow-failure: false
41-
- ghc: 8.4.4
41+
- compiler: ghc-8.4.4
4242
allow-failure: false
43-
- ghc: 8.2.2
43+
- compiler: ghc-8.2.2
4444
allow-failure: false
45-
- ghc: 8.0.2
45+
- compiler: ghc-8.0.2
4646
allow-failure: false
47-
- ghc: 7.10.3
47+
- compiler: ghc-7.10.3
4848
allow-failure: false
49-
- ghc: 7.8.4
49+
- compiler: ghc-7.8.4
5050
allow-failure: false
51-
- ghc: 7.6.3
51+
- compiler: ghc-7.6.3
5252
allow-failure: false
53-
- ghc: 7.4.2
53+
- compiler: ghc-7.4.2
5454
allow-failure: false
55-
- ghc: 7.2.2
55+
- compiler: ghc-7.2.2
5656
allow-failure: false
57-
- ghc: 7.0.4
57+
- compiler: ghc-7.0.4
5858
allow-failure: false
5959
fail-fast: false
6060
steps:
@@ -64,29 +64,31 @@ jobs:
6464
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
6565
apt-add-repository -y 'ppa:hvr/ghc'
6666
apt-get update
67-
apt-get install -y ghc-$GHC_VERSION cabal-install-3.2
67+
apt-get install -y $CC cabal-install-3.4
6868
env:
69-
GHC_VERSION: ${{ matrix.ghc }}
69+
CC: ${{ matrix.compiler }}
7070
- name: Set PATH and environment variables
7171
run: |
7272
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
7373
echo "LANG=C.UTF-8" >> $GITHUB_ENV
7474
echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV
7575
echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV
76-
HC=/opt/ghc/$GHC_VERSION/bin/ghc
76+
HCDIR=$(echo "/opt/$CC" | sed 's/-/\//')
77+
HCNAME=ghc
78+
HC=$HCDIR/bin/$HCNAME
7779
echo "HC=$HC" >> $GITHUB_ENV
78-
echo "HCPKG=/opt/ghc/$GHC_VERSION/bin/ghc-pkg" >> $GITHUB_ENV
79-
echo "HADDOCK=/opt/ghc/$GHC_VERSION/bin/haddock" >> $GITHUB_ENV
80-
echo "CABAL=/opt/cabal/3.2/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
80+
echo "HCPKG=$HCDIR/bin/$HCNAME-pkg" >> $GITHUB_ENV
81+
echo "HADDOCK=$HCDIR/bin/haddock" >> $GITHUB_ENV
82+
echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
8183
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
8284
echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
8385
echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV
8486
echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV
8587
echo "HEADHACKAGE=false" >> $GITHUB_ENV
86-
echo "ARG_COMPILER=--ghc --with-compiler=/opt/ghc/$GHC_VERSION/bin/ghc" >> $GITHUB_ENV
88+
echo "ARG_COMPILER=--$HCNAME --with-compiler=$HC" >> $GITHUB_ENV
8789
echo "GHCJSARITH=0" >> $GITHUB_ENV
8890
env:
89-
GHC_VERSION: ${{ matrix.ghc }}
91+
CC: ${{ matrix.compiler }}
9092
- name: env
9193
run: |
9294
env
@@ -165,9 +167,9 @@ jobs:
165167
- name: cache
166168
uses: actions/cache@v2
167169
with:
168-
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
170+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
169171
path: ~/.cabal/store
170-
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
172+
restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-
171173
- name: install dependencies
172174
run: |
173175
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Patches welcome!
44
- If it's really **only bounds**, please simply open an issue (so you'll have a URL to refer to). I have a semi-automated process to make revisions, pull requests only disturb it.
55
- If patch includes **source code change** (i.e. I'll need to make a release), and it's a patch to support **newer base/GHC version**:
66
- Amend `tested-with` to include that GHC
7-
- Regenerate `.travis.yml` with `haskell-ci regenerate` (get the latest from [GitHub haskell-ci/haskell-ci](https://github.com/haskell-ci/haskell-ci))
7+
- Regenerate `.github/workflows/haskell-ci.yml` with `haskell-ci regenerate` (get the latest from [GitHub haskell-ci/haskell-ci](https://github.com/haskell-ci/haskell-ci))
88

99
- Don't edit `CHANGELOG.md`, rather include a copyable entry in your pull request description. I often process pull requests in bulk, and everyone editing the `CHANGELOG.md` causes unnecessary conflicts.
1010
- For the same reason, do not edit `version` or `x-revision`

0 commit comments

Comments
 (0)