Skip to content

Commit

Permalink
Bump CI to GHC 9.8.2 and 9.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed May 13, 2024
1 parent bbf8f0f commit 0c99eab
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 32 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/andreasabel/haskell-ci
#
# version: 0.17.20240110
# version: 0.19.20240429
#
# REGENDATA ("0.17.20240110",["github","hackage-cli.cabal"])
# REGENDATA ("0.19.20240429",["github","hackage-cli.cabal"])
#
name: Haskell-CI
on:
Expand All @@ -27,19 +27,19 @@ jobs:
timeout-minutes:
60
container:
image: buildpack-deps:focal
image: buildpack-deps:jammy
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
include:
- compiler: ghc-9.8.1
- compiler: ghc-9.8.2
compilerKind: ghc
compilerVersion: 9.8.1
compilerVersion: 9.8.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.4
- compiler: ghc-9.6.5
compilerKind: ghc
compilerVersion: 9.6.4
compilerVersion: 9.6.5
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
Expand Down Expand Up @@ -91,8 +91,9 @@ jobs:
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"
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.8.yaml;
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.3.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
apt-get update
apt-get install -y libbrotli-dev
env:
Expand All @@ -112,7 +113,7 @@ jobs:
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.3.0 -vnormal+nowrap" >> "$GITHUB_ENV"
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -205,7 +206,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 @@ -235,7 +236,7 @@ jobs:
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- 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
24 changes: 10 additions & 14 deletions .github/workflows/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,16 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc-ver: [9.8.1, 9.6.4]
ghc-ver: [9.8, 9.6]
# Snapshots for 9.4.8, 9.2.8, 9.0.2, 8.10.7 do not have a recent enough base-compat; 0.13 is needed.
# On ubuntu-22.04 the old versions 8.8.4, 8.6.5, 8.4.4, 8.2.2 fail due to HsOpenSSL linking errors.
# They used to work under ubuntu-20.04, but it is not worth the trouble maintaining them.
# Apparently, HsOpenSSL-0.11.6 and older are too old for ubuntu-22.04.
include:
- os: macos-latest
ghc-ver: 9.8.1
ghc-ver: 9.8
- os: windows-latest
ghc-ver: 9.8.1
env:
ARGS: "--stack-yaml=stack-${{ matrix.ghc-ver }}.yaml --no-terminal --system-ghc"
ghc-ver: 9.8

# Needed for Windows to make piping (... >> ...) and evaluation ( $(...) ) work.
defaults:
Expand All @@ -35,7 +33,7 @@ jobs:
- uses: actions/checkout@v4

- uses: haskell-actions/setup@v2
id: haskell-setup
id: setup
with:
ghc-version: ${{ matrix.ghc-ver }}
enable-stack: true
Expand All @@ -59,17 +57,16 @@ jobs:
- name: Set environment variables based on Haskell setup
run: |
STACK_VER=$(stack --numeric-version)
echo "STACK_VER=${STACK_VER}" >> "${GITHUB_ENV}"
echo "ARGS=--stack-yaml=stack-${{ steps.setup.outputs.ghc-version }}.yaml --no-terminal --system-ghc" >> "${GITHUB_ENV}"
- name: Cache dependencies (restore)
uses: actions/cache/restore@v4
id: cache
with:
path: ${{ steps.haskell-setup.outputs.stack-root }}
path: ${{ steps.setup.outputs.stack-root }}
# Use a unique primary key (always save new cache); works if caches aren't to big or too many...
key: ${{ runner.os }}-stack-${{ env.STACK_VER }}-ghc-${{ matrix.ghc-ver }}-commit-${{ github.sha }}
restore-keys: ${{ runner.os }}-stack-${{ env.STACK_VER }}-ghc-${{ matrix.ghc-ver }}-
key: ${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ steps.setup.outputs.ghc-version }}-commit-${{ github.sha }}
restore-keys: ${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ steps.setup.outputs.ghc-version }}-

- name: Install dependencies
# if: ${{ steps.cache.outputs.cache-hit != 'true' }}
Expand All @@ -86,9 +83,8 @@ jobs:
- name: Cache dependencies (save)
uses: actions/cache/save@v4
if: always()
if: always() && steps.cache.outputs.cache-hit != 'true'
# # Will fail if we already have a cache with this key (in this case, cache-hit is true).
# if: ${{ steps.cache.outputs.cache-hit != 'true' }}
with:
path: ${{ steps.haskell-setup.outputs.stack-root }}
path: ${{ steps.setup.outputs.stack-root }}
key: ${{ steps.cache.outputs.cache-primary-key }}
14 changes: 7 additions & 7 deletions hackage-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ build-type: Simple
-- Supported GHC versions when building with cabal:
tested-with:
-- Keep in descending order.
GHC == 9.8.1
GHC == 9.6.4
GHC == 9.8.2
GHC == 9.6.5
GHC == 9.4.8
GHC == 9.2.8
GHC == 9.0.2
Expand Down Expand Up @@ -55,9 +55,9 @@ library cabal-revisions
ghc-options: -Wall -Wcompat

build-depends:
, base >= 4.10.0.0 && < 4.20
, base >= 4.10.0.0 && < 5
, bytestring >= 0.10.4.0 && < 0.13
, Cabal >= 3.4 && < 3.11
, Cabal >= 3.4 && < 3.13
, containers >= 0.5.0.0 && < 0.8
, mtl >= 2.2.2 && < 2.3 || >= 2.3.1 && < 2.4
, pretty ^>= 1.1.2
Expand All @@ -79,7 +79,7 @@ test-suite cabal-revisions-tests
, tasty >= 1.0 && < 1.6
-- tasty-1.0 for stack-8.2.2.yaml
, tasty-golden ^>= 2.3.2
, filepath ^>= 1.4.0.0
, filepath >= 1.4.0.0 && < 1.6

executable hackage-cli
default-language: Haskell2010
Expand Down Expand Up @@ -134,8 +134,8 @@ executable hackage-cli
, tagsoup ^>= 0.14
, tar >= 0.5 && < 1
, text >= 1.2 && < 2.2
, time >= 1.5.0.1 && < 1.13
, time >= 1.5.0.1 && < 1.15
, unordered-containers ^>= 0.2.7
, zlib ^>= 0.6.1
, zlib >= 0.6.1 && < 0.8

ghc-options: -Wall -Wcompat -threaded
4 changes: 4 additions & 0 deletions stack-9.4.8.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
resolver: lts-21.25
compiler: ghc-9.4.8
compiler-check: match-exact

# Cannot easily update base-compat in this snapshot
# extra-deps:
# - base-compat-0.13.1
1 change: 1 addition & 0 deletions stack-9.6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-22.21
1 change: 1 addition & 0 deletions stack-9.8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: nightly-2024-05-11

0 comments on commit 0c99eab

Please sign in to comment.