Add ghc 9.6 and 9.8 to CI config

This commit is contained in:
Jan Hrček 2024-01-07 13:13:08 +01:00
parent 89a317a83b
commit 88f501c0e0
2 changed files with 50 additions and 23 deletions

View File

@ -8,9 +8,9 @@
# #
# For more information, see https://github.com/haskell-CI/haskell-ci # For more information, see https://github.com/haskell-CI/haskell-ci
# #
# version: 0.15.20220826 # version: 0.17.20231219
# #
# REGENDATA ("0.15.20220826",["github","brick.cabal"]) # REGENDATA ("0.17.20231219",["github","brick.cabal"])
# #
name: Haskell-CI name: Haskell-CI
on: on:
@ -32,14 +32,24 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- compiler: ghc-9.4.2 - compiler: ghc-9.8.1
compilerKind: ghc compilerKind: ghc
compilerVersion: 9.4.2 compilerVersion: 9.8.1
setup-method: ghcup setup-method: ghcup
allow-failure: false allow-failure: false
- compiler: ghc-9.2.4 - compiler: ghc-9.6.3
compilerKind: ghc compilerKind: ghc
compilerVersion: 9.2.4 compilerVersion: 9.6.3
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
compilerKind: ghc
compilerVersion: 9.4.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.8
compilerKind: ghc
compilerVersion: 9.2.8
setup-method: ghcup setup-method: ghcup
allow-failure: false allow-failure: false
- compiler: ghc-9.0.2 - compiler: ghc-9.0.2
@ -80,18 +90,18 @@ jobs:
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
if [ "${{ matrix.setup-method }}" = ghcup ]; then if [ "${{ matrix.setup-method }}" = ghcup ]; then
mkdir -p "$HOME/.ghcup/bin" mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup" 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" chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
else else
apt-add-repository -y 'ppa:hvr/ghc' apt-add-repository -y 'ppa:hvr/ghc'
apt-get update apt-get update
apt-get install -y "$HCNAME" apt-get install -y "$HCNAME"
mkdir -p "$HOME/.ghcup/bin" mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup" 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" chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi fi
env: env:
HCKIND: ${{ matrix.compilerKind }} HCKIND: ${{ matrix.compilerKind }}
@ -105,17 +115,19 @@ jobs:
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$HCKIND/$HCVER HCDIR=/opt/$HCKIND/$HCVER
if [ "${{ matrix.setup-method }}" = ghcup ]; then if [ "${{ matrix.setup-method }}" = ghcup ]; then
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
echo "HC=$HC" >> "$GITHUB_ENV" echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
else else
HC=$HCDIR/bin/$HCKIND HC=$HCDIR/bin/$HCKIND
echo "HC=$HC" >> "$GITHUB_ENV" echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
fi fi
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
@ -167,14 +179,14 @@ jobs:
- name: install cabal-plan - name: install cabal-plan
run: | run: |
mkdir -p $HOME/.cabal/bin mkdir -p $HOME/.cabal/bin
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3.0/cabal-plan-0.7.3.0-x86_64-linux.xz > cabal-plan.xz
echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c - echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
rm -f cabal-plan.xz rm -f cabal-plan.xz
chmod a+x $HOME/.cabal/bin/cabal-plan chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version cabal-plan --version
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
path: source path: source
- name: initial cabal.project for sdist - name: initial cabal.project for sdist
@ -211,8 +223,8 @@ jobs:
run: | run: |
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan cabal-plan
- name: cache - name: restore cache
uses: actions/cache@v2 uses: actions/cache/restore@v3
with: with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store path: ~/.cabal/store
@ -236,8 +248,14 @@ jobs:
${CABAL} -vnormal check ${CABAL} -vnormal check
- name: haddock - name: haddock
run: | run: |
$CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
- name: unconstrained build - name: unconstrained build
run: | run: |
rm -f cabal.project.local rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: save cache
uses: actions/cache/save@v3
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store

View File

@ -32,13 +32,22 @@ license: BSD3
license-file: LICENSE license-file: LICENSE
author: Jonathan Daugherty <cygnus@foobox.com> author: Jonathan Daugherty <cygnus@foobox.com>
maintainer: Jonathan Daugherty <cygnus@foobox.com> maintainer: Jonathan Daugherty <cygnus@foobox.com>
copyright: (c) Jonathan Daugherty 2015-2023 copyright: (c) Jonathan Daugherty 2015-2024
category: Graphics category: Graphics
build-type: Simple build-type: Simple
cabal-version: 1.18 cabal-version: 1.18
Homepage: https://github.com/jtdaugherty/brick/ Homepage: https://github.com/jtdaugherty/brick/
Bug-reports: https://github.com/jtdaugherty/brick/issues Bug-reports: https://github.com/jtdaugherty/brick/issues
tested-with: GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.4, GHC == 9.4.2 tested-with: GHC == 8.2.2
|| == 8.4.4
|| == 8.6.5
|| == 8.8.4
|| == 8.10.7
|| == 9.0.2
|| == 9.2.8
|| == 9.4.8
|| == 9.6.3
|| == 9.8.1
extra-doc-files: README.md, extra-doc-files: README.md,
docs/guide.rst, docs/guide.rst,