Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Haskell CI to 9.8.1 etc.; use 9.6/4 instead of 9.6/4.z in Stack CI #57

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 28 additions & 63 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.20230827
# version: 0.17.20231012
#
# REGENDATA ("0.17.20230827",["github","fix-whitespace.cabal"])
# REGENDATA ("0.17.20231012",["github","fix-whitespace.cabal"])
#
name: Haskell-CI
on:
Expand All @@ -32,14 +32,14 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.8.0.20230822
- compiler: ghc-9.8.1
compilerKind: ghc
compilerVersion: 9.8.0.20230822
compilerVersion: 9.8.1
setup-method: ghcup
allow-failure: true
- compiler: ghc-9.6.2
allow-failure: false
- compiler: ghc-9.6.3
compilerKind: ghc
compilerVersion: 9.6.2
compilerVersion: 9.6.3
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.7
Expand All @@ -65,51 +65,40 @@ jobs:
- compiler: ghc-8.8.4
compilerKind: ghc
compilerVersion: 8.8.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.5
compilerKind: ghc
compilerVersion: 8.6.5
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.4.4
compilerKind: ghc
compilerVersion: 8.4.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.2.2
compilerKind: ghc
compilerVersion: 8.2.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.0.2
compilerKind: ghc
compilerVersion: 8.0.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
fail-fast: false
steps:
- name: apt
run: |
apt-get update
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.19.5/x86_64-linux-ghcup-0.1.19.5 > "$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.7.yaml;
"$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)
else
apt-add-repository -y 'ppa:hvr/ghc'
apt-get update
apt-get install -y "$HCNAME"
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$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.7.yaml;
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$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.7.yaml;
"$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)
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -121,27 +110,18 @@ jobs:
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$HCKIND/$HCVER
if [ "${{ matrix.setup-method }}" = ghcup ]; then
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 "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
else
HC=$HCDIR/bin/$HCKIND
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
fi

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 "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.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"
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
if [ $((HCNUMVER >= 90800)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
env:
Expand Down Expand Up @@ -170,18 +150,6 @@ jobs:
repository hackage.haskell.org
url: http://hackage.haskell.org/
EOF
if $HEADHACKAGE; then
cat >> $CABAL_CONFIG <<EOF
repository head.hackage.ghc.haskell.org
url: https://ghc.gitlab.haskell.org/head.hackage/
secure: True
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
key-threshold: 3
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
EOF
fi
cat >> $CABAL_CONFIG <<EOF
program-default-options
ghc-options: $GHCJOBS +RTS -M3G -RTS
Expand All @@ -205,7 +173,7 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: source
- name: initial cabal.project for sdist
Expand Down Expand Up @@ -233,9 +201,6 @@ jobs:
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
cat >> cabal.project <<EOF
EOF
if $HEADHACKAGE; then
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
fi
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(fix-whitespace)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04]
ghc-ver: [9.6.2, 9.4.5, 9.2.8, 9.0.2, 8.10.7, 8.8.4, 8.6.5, 8.4.4]
ghc-ver: ['9.6', '9.4', '9.2.8', '9.0.2', '8.10.7', '8.8.4', '8.6.5', '8.4.4']
include:
- os: windows-2022
ghc-ver: 9.6.2
ghc-ver: '9.6'
- os: macos-12
ghc-ver: 9.6.2
ghc-ver: '9.6'
fail-fast: false

env:
Expand All @@ -97,14 +97,14 @@ jobs:
shell: bash

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Workaround runner image issue (ghcup, Linux)
if: ${{ runner.os == 'Linux' }}
# https://github.com/actions/runner-images/issues/7061
run: sudo chown -R "$USER" /usr/local/.ghcup

- uses: haskell/actions/setup@v2
- uses: haskell-actions/setup@v2
id: haskell-setup
with:
ghc-version: ${{ matrix.ghc-ver }}
Expand Down Expand Up @@ -154,15 +154,15 @@ jobs:
# # Conditional to ensure this deployment is only run once per action.
# if: >-
# startsWith(github.ref, 'refs/tags/v')
# && matrix.ghc-ver == '9.6.2'
# && matrix.ghc-ver == '9.6'
# run: |
# DIST_TGZ=$(cabal sdist | tail -1)
# echo "DIST_TGZ=${DIST_TGZ}" >> "${GITHUB_ENV}"

# - name: Source tarball release
# if: >-
# startsWith(github.ref, 'refs/tags/v')
# && matrix.ghc-ver == '9.6.2'
# && matrix.ghc-ver == '9.6'
# # uses: softprops/action-gh-release@v1
# # with:
# # draft: true
Expand All @@ -183,7 +183,7 @@ jobs:
if: >-
startsWith(github.ref, 'refs/tags/v')
&& runner.os == 'Linux'
&& matrix.ghc-ver == '9.6.2'
&& matrix.ghc-ver == '9.6'
run: |
FIXW_BIN=fix-whitespace-${FIXW_VERSION}-linux.binary
cp -p "${FIXW_EXE}" "${FIXW_BIN}"
Expand All @@ -194,7 +194,7 @@ jobs:
# if: >-
# startsWith(github.ref, 'refs/tags/v')
# && runner.os == 'Linux'
# && matrix.ghc-ver == '9.6.2'
# && matrix.ghc-ver == '9.6'
# # uses: softprops/action-gh-release@v1
# # with:
# # draft: true
Expand Down Expand Up @@ -275,7 +275,7 @@ jobs:
# - name: Upload binary
# if: >-
# startsWith(github.ref, 'refs/tags/v')
# && (matrix.ghc-ver == '9.6.2' || runner.os != 'Linux')
# && (matrix.ghc-ver == '9.6' || runner.os != 'Linux')
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ github.token }}
Expand All @@ -288,7 +288,7 @@ jobs:
- name: Upload binary
if: >-
startsWith(github.ref, 'refs/tags/v')
&& (matrix.ghc-ver == '9.6.2' || runner.os != 'Linux')
&& (matrix.ghc-ver == '9.6' || runner.os != 'Linux')
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
Expand Down
11 changes: 0 additions & 11 deletions cabal.haskell-ci
Original file line number Diff line number Diff line change
@@ -1,13 +1,2 @@
branches: master
distribution: focal

-- BROKEN because of aeson not supporting text-2.1 yet
--
-- constraint-set text-2.1
-- ghc: >= 9
-- constraints: text ^>= 2.1
-- tests: True
-- run-tests: True
--
-- raw-project
-- allow-newer: text
8 changes: 4 additions & 4 deletions fix-whitespace.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ bug-reports: https://github.com/agda/fix-whitespace/issues

tested-with:
-- cabal-supported GHCs
GHC == 9.8.0
GHC == 9.6.2
GHC == 9.8.1
GHC == 9.6.3
GHC == 9.4.7
GHC == 9.2.8
GHC == 9.0.2
Expand All @@ -33,8 +33,8 @@ extra-doc-files:
README.md
fix-whitespace.yaml
-- stack-supported GHCs
stack-9.6.2.yaml
stack-9.4.5.yaml
stack-9.6.yaml
stack-9.4.yaml
stack-9.2.8.yaml
stack-9.0.2.yaml
stack-8.10.7.yaml
Expand Down
3 changes: 0 additions & 3 deletions stack-9.4.5.yaml

This file was deleted.

1 change: 1 addition & 0 deletions stack-9.4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-21.15
3 changes: 0 additions & 3 deletions stack-9.6.2.yaml

This file was deleted.

1 change: 1 addition & 0 deletions stack-9.6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: nightly-2023-10-09