Skip to content

Commit 1391d3c

Browse files
authored
Bump CI to GHC 9.2.4 (#50)
Also, fixing stack CI on Windows, which used broken ${ARGS} syntax with PowerShell. The fix is double: - use ${{ env.ARGS }} instead of ${ARGS} (fixes pwsh problem, make actions output more readable) - default to bash (also fixes pwsh problem)
1 parent 69715eb commit 1391d3c

7 files changed

Lines changed: 34 additions & 56 deletions

File tree

.github/workflows/haskell-ci.yml

Lines changed: 10 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.15.20220609
11+
# version: 0.15.20220808
1212
#
13-
# REGENDATA ("0.15.20220609",["github","hackage-cli.cabal"])
13+
# REGENDATA ("0.15.20220808",["github","hackage-cli.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -32,14 +32,14 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.4.0.20220523
35+
- compiler: ghc-9.4.1
3636
compilerKind: ghc
37-
compilerVersion: 9.4.0.20220523
37+
compilerVersion: 9.4.1
3838
setup-method: ghcup
39-
allow-failure: true
40-
- compiler: ghc-9.2.3
39+
allow-failure: false
40+
- compiler: ghc-9.2.4
4141
compilerKind: ghc
42-
compilerVersion: 9.2.3
42+
compilerVersion: 9.2.4
4343
setup-method: ghcup
4444
allow-failure: false
4545
- compiler: ghc-9.0.2
@@ -80,9 +80,8 @@ jobs:
8080
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
8181
if [ "${{ matrix.setup-method }}" = ghcup ]; then
8282
mkdir -p "$HOME/.ghcup/bin"
83-
curl -sL https://downloads.haskell.org/ghcup/0.1.17.8/x86_64-linux-ghcup-0.1.17.8 > "$HOME/.ghcup/bin/ghcup"
83+
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
8484
chmod a+x "$HOME/.ghcup/bin/ghcup"
85-
if $HEADHACKAGE; then "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml; fi
8685
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
8786
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
8887
apt-get update
@@ -92,7 +91,7 @@ jobs:
9291
apt-get update
9392
apt-get install -y "$HCNAME" libbrotli-dev
9493
mkdir -p "$HOME/.ghcup/bin"
95-
curl -sL https://downloads.haskell.org/ghcup/0.1.17.8/x86_64-linux-ghcup-0.1.17.8 > "$HOME/.ghcup/bin/ghcup"
94+
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
9695
chmod a+x "$HOME/.ghcup/bin/ghcup"
9796
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
9897
fi
@@ -125,7 +124,7 @@ jobs:
125124
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
126125
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
127126
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
128-
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
127+
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
129128
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
130129
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
131130
env:
@@ -154,18 +153,6 @@ jobs:
154153
repository hackage.haskell.org
155154
url: http://hackage.haskell.org/
156155
EOF
157-
if $HEADHACKAGE; then
158-
cat >> $CABAL_CONFIG <<EOF
159-
repository head.hackage.ghc.haskell.org
160-
url: https://ghc.gitlab.haskell.org/head.hackage/
161-
secure: True
162-
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
163-
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
164-
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
165-
key-threshold: 3
166-
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
167-
EOF
168-
fi
169156
cat >> $CABAL_CONFIG <<EOF
170157
program-default-options
171158
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -217,9 +204,6 @@ jobs:
217204
echo " ghc-options: -Werror=missing-methods" >> cabal.project
218205
cat >> cabal.project <<EOF
219206
EOF
220-
if $HEADHACKAGE; then
221-
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
222-
fi
223207
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(Cabal|binary|hackage-cli)$/; }' >> cabal.project.local
224208
cat cabal.project
225209
cat cabal.project.local

.github/workflows/stack.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,21 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
os: [ubuntu-latest]
17-
ghc-ver: [9.2.2, 9.0.2, 8.10.7, 8.8.4, 8.6.5, 8.4.4, 8.2.2]
17+
ghc-ver: [9.2.4, 9.0.2, 8.10.7, 8.8.4, 8.6.5, 8.4.4, 8.2.2]
1818
include:
1919
- os: macos-latest
20-
ghc-ver: 8.10.7
20+
ghc-ver: 9.2.4
2121
- os: windows-latest
22-
ghc-ver: 8.10.7
23-
- os: windows-latest
24-
ghc-ver: 8.6.5
22+
ghc-ver: 9.2.4
2523
env:
26-
ARGS: "--stack-yaml stack-${{ matrix.ghc-ver }}.yaml --no-terminal --system-ghc"
24+
ARGS: "--stack-yaml=stack-${{ matrix.ghc-ver }}.yaml --no-terminal --system-ghc"
2725

26+
# Needed for Windows to make piping (... >> ...) and evaluation ( $(...) ) work.
27+
defaults:
28+
run:
29+
shell: bash
2830
steps:
29-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v3
3032

3133
- uses: haskell/actions/setup@v1
3234
id: haskell-setup
@@ -40,10 +42,10 @@ jobs:
4042
# Stack is packing an old version of MSYS2.
4143
# To work around certification problems, we need to update msys2-keyring.
4244
run: |
43-
stack exec ${ARGS} -- pacman --noconfirm -Sy msys2-keyring
44-
stack exec ${ARGS} -- pacman --noconfirm -S mingw-w64-x86_64-pkg-config
45-
stack exec ${ARGS} -- pacman --noconfirm -S mingw-w64-x86_64-brotli
46-
stack exec ${ARGS} -- pacman --noconfirm -S mingw-w64-x86_64-openssl
45+
stack exec ${{ env.ARGS }} -- pacman --noconfirm -Sy msys2-keyring
46+
stack exec ${{ env.ARGS }} -- pacman --noconfirm -S mingw-w64-x86_64-pkg-config
47+
stack exec ${{ env.ARGS }} -- pacman --noconfirm -S mingw-w64-x86_64-brotli
48+
stack exec ${{ env.ARGS }} -- pacman --noconfirm -S mingw-w64-x86_64-openssl
4749
4850
- name: Install the brotli library (Ubuntu)
4951
if: ${{ runner.os == 'Linux' }}
@@ -57,12 +59,11 @@ jobs:
5759
sudo apt-get install libnuma-dev -qq
5860
5961
- name: Set environment variables based on Haskell setup
60-
shell: bash
6162
run: |
6263
export STACK_VER=$(stack --numeric-version)
6364
echo "STACK_VER=${STACK_VER}" >> ${GITHUB_ENV}
6465
65-
- uses: actions/cache@v2
66+
- uses: actions/cache@v3
6667
name: Cache dependencies
6768
id: cache
6869
with:
@@ -72,8 +73,8 @@ jobs:
7273

7374
- name: Build hackage-cli
7475
run: |
75-
stack build ${ARGS}
76+
stack build ${{ env.ARGS }}
7677
7778
- name: Test hackage-cli
7879
run: |
79-
stack test ${ARGS}
80+
stack test ${{ env.ARGS }}

hackage-cli.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ build-type: Simple
1818
tested-with:
1919
-- Keep in descending order.
2020
GHC == 9.4.1
21-
GHC == 9.2.3
21+
GHC == 9.2.4
2222
GHC == 9.0.2
2323
GHC == 8.10.7
2424
GHC == 8.8.4

stack-9.0.2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
resolver: lts-19.8
1+
resolver: lts-19.19
22
compiler: ghc-9.0.2
33
compiler-check: match-exact
44

stack-9.2.2.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

stack-9.2.4.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
resolver: nightly-2022-08-17
2+
compiler: ghc-9.2.4
3+
compiler-check: match-exact
4+
5+
packages:
6+
- .

stack.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)