Skip to content

Commit

Permalink
Bump stack CI to GHC 9.6 and cabal CI to latest minor versions
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Jun 26, 2023
1 parent e93a1e9 commit b1ecdb7
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 34 deletions.
34 changes: 16 additions & 18 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/haskell-CI/haskell-ci
#
# version: 0.15.20230312
# version: 0.16.4
#
# REGENDATA ("0.15.20230312",["github","cabal.project"])
# REGENDATA ("0.16.4",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -34,19 +34,19 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.6.1
- compiler: ghc-9.6.2
compilerKind: ghc
compilerVersion: 9.6.1
compilerVersion: 9.6.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.4
- compiler: ghc-9.4.5
compilerKind: ghc
compilerVersion: 9.4.4
compilerVersion: 9.4.5
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.7
- compiler: ghc-9.2.8
compilerKind: ghc
compilerVersion: 9.2.7
compilerVersion: 9.2.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.2
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
if [ "${{ matrix.setup-method }}" = ghcup ]; then
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.19.2/x86_64-linux-ghcup-0.1.19.2 > "$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 cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
Expand All @@ -106,7 +106,7 @@ jobs:
apt-get update
apt-get install -y "$HCNAME"
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.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
Expand Down Expand Up @@ -168,6 +168,10 @@ jobs:
repository hackage.haskell.org
url: http://hackage.haskell.org/
EOF
cat >> $CABAL_CONFIG <<EOF
program-default-options
ghc-options: $GHCJOBS +RTS -M3G -RTS
EOF
cat $CABAL_CONFIG
- name: versions
run: |
Expand All @@ -180,8 +184,8 @@ jobs:
- name: install cabal-plan
run: |
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
echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
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 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
rm -f cabal-plan.xz
chmod a+x $HOME/.cabal/bin/cabal-plan
Expand Down Expand Up @@ -244,12 +248,6 @@ jobs:
- name: build
run: |
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
- name: install doctest
run: |
$CABAL v2-install $ARG_COMPILER doctest --overwrite-policy=always
- name: doctests
run: |
$CABAL v2-repl BNFC --with-ghc-pkg=$HCPKG -w doctest --repl-options=-fno-warn-type-defaults
- name: tests
run: |
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
fail-fast: false
matrix:
# Note: check release logic below when changing the matrix!
ghc: [9.4.4, 9.2.7, 9.0.2, 8.10.7, 8.8.4, 8.6.5, 8.4.4, 8.2.2]
ghc: [9.6.2, 9.4.5, 9.2.8, 9.0.2, 8.10.7, 8.8.4, 8.6.5, 8.4.4, 8.2.2]
os: [ubuntu-latest]
include:
- os: macOS-latest
ghc: 9.4.4
ghc: 9.6.2
- os: windows-latest
ghc: 9.4.4
ghc: 9.6.2


# Needed for Windows to make piping (... >> ...) and evaluation ( $(...) ) work.
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Cache dependencies
uses: actions/cache@v3
env:
key: ${{ runner.os }}-stack-${{ env.STACK_VER }}-ghc-${{ env.GHC_VER }}-
key: ${{ runner.os }}-stack-${{ env.STACK_VER }}-ghc-${{ env.GHC_VER }}
## Just stack.yaml is actually not correct, better would be stack.yaml.lock,
## but we do not commit this file. As a workaround, one could include the .cabal file,
## which tracks the dependencies (albeit in our case not precisely).
Expand Down Expand Up @@ -120,15 +120,15 @@ jobs:
# Conditional to ensure this deployment is only run once per action.
if: >-
startsWith(github.ref, 'refs/tags/v')
&& matrix.ghc == '9.4.4'
&& matrix.ghc == '9.6.2'
run: |
DIST_TGZ=$(cabal sdist source | tail -1)
echo "DIST_TGZ=${DIST_TGZ}" >> "${GITHUB_ENV}"
- name: Source tarball release.
if: >-
startsWith(github.ref, 'refs/tags/v')
&& matrix.ghc == '9.4.4'
&& matrix.ghc == '9.6.2'
uses: softprops/action-gh-release@v1
with:
draft: true
Expand All @@ -140,7 +140,7 @@ jobs:
if: >-
startsWith(github.ref, 'refs/tags/v')
&& runner.os == 'Linux'
&& matrix.ghc == '9.4.4'
&& matrix.ghc == '9.6.2'
run: |
BNFC_BIN=bnfc-${BNFC_VERSION}-linux.binary
cp -p "${BNFC_EXE}" "${BNFC_BIN}"
Expand All @@ -151,7 +151,7 @@ jobs:
if: >-
startsWith(github.ref, 'refs/tags/v')
&& runner.os == 'Linux'
&& matrix.ghc == '9.4.4'
&& matrix.ghc == '9.6.2'
uses: softprops/action-gh-release@v1
with:
draft: true
Expand Down
11 changes: 6 additions & 5 deletions source/BNFC.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ Description:

-- Support range when build with cabal
tested-with:
GHC == 9.6.1
GHC == 9.4.4
GHC == 9.2.7
GHC == 9.6.2
GHC == 9.4.5
GHC == 9.2.8
GHC == 9.0.2
GHC == 8.10.7
GHC == 8.8.4
Expand All @@ -54,8 +54,9 @@ extra-source-files:
src/BNFC.cf
src/Makefile
-- Support range when build with stack
stack-9.4.4.yaml
stack-9.2.7.yaml
stack-9.6.2.yaml
stack-9.4.5.yaml
stack-9.2.8.yaml
stack-9.0.2.yaml
stack-8.10.7.yaml
stack-8.8.4.yaml
Expand Down
3 changes: 3 additions & 0 deletions source/stack-9.2.8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resolver: lts-20.26
compiler: ghc-9.2.8
compiler-check: match-exact
3 changes: 3 additions & 0 deletions source/stack-9.4.5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resolver: lts-21.0
compiler: ghc-9.4.5
compiler-check: match-exact
3 changes: 3 additions & 0 deletions source/stack-9.6.2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resolver: nightly-2023-06-26
compiler: ghc-9.6.2
compiler-check: match-exact
7 changes: 7 additions & 0 deletions stack-9.2.8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
resolver: lts-20.26
compiler: ghc-9.2.8
compiler-check: match-exact

packages:
- source
- testing
7 changes: 7 additions & 0 deletions stack-9.4.5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
resolver: lts-21.0
compiler: ghc-9.4.5
compiler-check: match-exact

packages:
- source
- testing
7 changes: 7 additions & 0 deletions stack-9.6.2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
resolver: nightly-2023-06-26
compiler: ghc-9.6.2
compiler-check: match-exact

packages:
- source
- testing
6 changes: 3 additions & 3 deletions testing/bnfc-system-tests.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ build-type: Simple
cabal-version: >=1.10

tested-with:
GHC == 9.6.1
GHC == 9.4.4
GHC == 9.2.7
GHC == 9.6.2
GHC == 9.4.5
GHC == 9.2.8
GHC == 9.0.2
GHC == 8.10.7
GHC == 8.8.4
Expand Down

0 comments on commit b1ecdb7

Please sign in to comment.