Skip to content

Commit 4bc1238

Browse files
andreasabelMikolaj
authored andcommitted
Regenerate CI script, include GHC 9.10 and 9.12
The current script no longer works because ubuntu-20.04 no longer exists in GHA.
1 parent 29a9a0c commit 4bc1238

File tree

3 files changed

+47
-24
lines changed

3 files changed

+47
-24
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,22 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.19.20240708
11+
# version: 0.19.20250506
1212
#
13-
# REGENDATA ("0.19.20240708",["github","enummapset.cabal"])
13+
# REGENDATA ("0.19.20250506",["github","enummapset.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
17-
- push
18-
- pull_request
17+
push:
18+
branches:
19+
- master
20+
pull_request:
21+
branches:
22+
- master
1923
jobs:
2024
linux:
2125
name: Haskell-CI - Linux - ${{ matrix.compiler }}
22-
runs-on: ubuntu-20.04
26+
runs-on: ubuntu-24.04
2327
timeout-minutes:
2428
60
2529
container:
@@ -28,14 +32,24 @@ jobs:
2832
strategy:
2933
matrix:
3034
include:
31-
- compiler: ghc-9.8.2
35+
- compiler: ghc-9.12.2
3236
compilerKind: ghc
33-
compilerVersion: 9.8.2
37+
compilerVersion: 9.12.2
3438
setup-method: ghcup
3539
allow-failure: false
36-
- compiler: ghc-9.6.6
40+
- compiler: ghc-9.10.2
3741
compilerKind: ghc
38-
compilerVersion: 9.6.6
42+
compilerVersion: 9.10.2
43+
setup-method: ghcup
44+
allow-failure: false
45+
- compiler: ghc-9.8.4
46+
compilerKind: ghc
47+
compilerVersion: 9.8.4
48+
setup-method: ghcup
49+
allow-failure: false
50+
- compiler: ghc-9.6.7
51+
compilerKind: ghc
52+
compilerVersion: 9.6.7
3953
setup-method: ghcup
4054
allow-failure: false
4155
- compiler: ghc-9.4.8
@@ -75,15 +89,29 @@ jobs:
7589
allow-failure: false
7690
fail-fast: false
7791
steps:
78-
- name: apt
92+
- name: apt-get install
7993
run: |
8094
apt-get update
8195
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
96+
- name: Install GHCup
97+
run: |
8298
mkdir -p "$HOME/.ghcup/bin"
83-
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
99+
curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
84100
chmod a+x "$HOME/.ghcup/bin/ghcup"
101+
- name: Install cabal-install
102+
run: |
103+
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
104+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
105+
- name: Install GHC (GHCup)
106+
if: matrix.setup-method == 'ghcup'
107+
run: |
85108
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
86-
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
109+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
110+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
111+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
112+
echo "HC=$HC" >> "$GITHUB_ENV"
113+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
114+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
87115
env:
88116
HCKIND: ${{ matrix.compilerKind }}
89117
HCNAME: ${{ matrix.compiler }}
@@ -94,21 +122,12 @@ jobs:
94122
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
95123
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
96124
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
97-
HCDIR=/opt/$HCKIND/$HCVER
98-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
99-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
100-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
101-
echo "HC=$HC" >> "$GITHUB_ENV"
102-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
103-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
104-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
105125
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
106126
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
107127
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
108128
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
109129
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
110130
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
111-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
112131
env:
113132
HCKIND: ${{ matrix.compilerKind }}
114133
HCNAME: ${{ matrix.compiler }}
@@ -224,8 +243,8 @@ jobs:
224243
rm -f cabal.project.local
225244
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
226245
- name: save cache
227-
uses: actions/cache/save@v4
228246
if: always()
247+
uses: actions/cache/save@v4
229248
with:
230249
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
231250
path: ~/.cabal/store

cabal.haskell-ci

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
branches: master

enummapset.cabal

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ tested-with:
1616
, GHC==9.0.2
1717
, GHC==9.2.8
1818
, GHC==9.4.8
19-
, GHC==9.6.6
20-
, GHC==9.8.2
19+
, GHC==9.6.7
20+
, GHC==9.8.4
21+
, GHC==9.10.2
22+
, GHC==9.12.2
23+
2124
author: Michal Terepeta and others
2225
maintainer: Mikolaj Konarski <[email protected]>
2326
category: Data Structures

0 commit comments

Comments
 (0)