Skip to content

Commit

Permalink
Bump CI to GHC 9.6.4; add 9.8.1 to stack CI
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Jan 25, 2024
1 parent 3985f90 commit aea4eef
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 23 deletions.
8 changes: 4 additions & 4 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.20231112
# version: 0.17.20240110
#
# REGENDATA ("0.17.20231112",["github","hackage-cli.cabal"])
# REGENDATA ("0.17.20240110",["github","hackage-cli.cabal"])
#
name: Haskell-CI
on:
Expand All @@ -37,9 +37,9 @@ jobs:
compilerVersion: 9.8.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.3
- compiler: ghc-9.6.4
compilerKind: ghc
compilerVersion: 9.6.3
compilerVersion: 9.6.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
Expand Down
32 changes: 17 additions & 15 deletions .github/workflows/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc-ver: [9.6.3, 9.4.8, 9.2.8, 9.0.2, 8.10.7]
ghc-ver: [9.8.1, 9.6.4, 9.4.8, 9.2.8, 9.0.2, 8.10.7]
# 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.6.3
ghc-ver: 9.6.4
- os: windows-latest
ghc-ver: 9.6.3
ghc-ver: 9.6.4
env:
ARGS: "--stack-yaml=stack-${{ matrix.ghc-ver }}.yaml --no-terminal --system-ghc"

Expand All @@ -46,7 +46,7 @@ jobs:
# To work around certification problems, we need to update msys2-keyring.
run: |
stack exec ${{ env.ARGS }} -- pacman --noconfirm -Sy msys2-keyring
stack exec ${{ env.ARGS }} -- pacman --noconfirm -S mingw-w64-x86_64-pkg-config
stack exec ${{ env.ARGS }} -- pacman --noconfirm -S mingw-w64-x86_64-pkgconf
stack exec ${{ env.ARGS }} -- pacman --noconfirm -S mingw-w64-x86_64-brotli
stack exec ${{ env.ARGS }} -- pacman --noconfirm -S mingw-w64-x86_64-openssl
Expand All @@ -62,30 +62,32 @@ jobs:
echo "STACK_VER=${STACK_VER}" >> "${GITHUB_ENV}"
- name: Cache dependencies (restore)
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
id: cache
with:
path: ${{ steps.haskell-setup.outputs.stack-root }}
key: ${{ runner.os }}-stack-${{ env.STACK_VER }}-ghc-${{ matrix.ghc-ver }}-${{ hashFiles(format('stack-{0}.yaml', matrix.ghc-ver)) }}
# 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 }}-

- name: Install dependencies
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
# if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: |
stack build ${{ env.ARGS }} --test --only-dependencies
- name: Cache dependencies (save)
uses: actions/cache/save@v3
# 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 }}
key: ${{ steps.cache.outputs.cache-primary-key }}

- name: Build hackage-cli
run: |
stack build ${{ env.ARGS }}
- name: Test hackage-cli
run: |
stack test ${{ env.ARGS }}
- name: Cache dependencies (save)
uses: actions/cache/save@v4
if: always()
# # 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 }}
key: ${{ steps.cache.outputs.cache-primary-key }}
5 changes: 3 additions & 2 deletions hackage-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ build-type: Simple
tested-with:
-- Keep in descending order.
GHC == 9.8.1
GHC == 9.6.3
GHC == 9.6.4
GHC == 9.4.8
GHC == 9.2.8
GHC == 9.0.2
Expand All @@ -37,7 +37,8 @@ extra-source-files:
fixtures/*.diff
fixtures/*.cabal
-- Supported GHC versions when building with stack:
stack-9.6.3.yaml
stack-9.8.1.yaml
stack-9.6.4.yaml
stack-9.4.8.yaml
stack-9.2.8.yaml
stack-9.0.2.yaml
Expand Down
2 changes: 1 addition & 1 deletion stack-9.4.8.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
resolver: lts-21.24
resolver: lts-21.25
compiler: ghc-9.4.8
compiler-check: match-exact
2 changes: 1 addition & 1 deletion stack-9.6.3.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
resolver: nightly-2023-12-14
resolver: lts-22.6
compiler: ghc-9.6.3
compiler-check: match-exact
3 changes: 3 additions & 0 deletions stack-9.6.4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resolver: lts-22.7
compiler: ghc-9.6.4
compiler-check: match-exact
3 changes: 3 additions & 0 deletions stack-9.8.1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resolver: nightly-2024-01-23
compiler: ghc-9.8.1
compiler-check: match-exact

0 comments on commit aea4eef

Please sign in to comment.