Skip to content

Commit

Permalink
Merge pull request #20 from haskellari/noble
Browse files Browse the repository at this point in the history
GHC-8.6.5.GHC-9.10.1
  • Loading branch information
phadej committed May 12, 2024
2 parents 4ec4269 + 6216261 commit f1eb64e
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 141 deletions.
150 changes: 34 additions & 116 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.17.20231010
# version: 0.19.20240512
#
# REGENDATA ("0.17.20231010",["github","cabal.project"])
# REGENDATA ("0.19.20240512",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -27,29 +27,29 @@ jobs:
timeout-minutes:
60
container:
image: buildpack-deps:bionic
image: buildpack-deps:jammy
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
include:
- compiler: ghcjs-8.4
compilerKind: ghcjs
compilerVersion: "8.4"
setup-method: hvr-ppa
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.10.1
setup-method: ghcup
allow-failure: false
- 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.3
- compiler: ghc-9.6.5
compilerKind: ghc
compilerVersion: 9.6.3
compilerVersion: 9.6.5
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.7
- compiler: ghc-9.4.8
compilerKind: ghc
compilerVersion: 9.4.7
compilerVersion: 9.4.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.8
Expand All @@ -70,129 +70,49 @@ 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
allow-failure: false
- compiler: ghc-8.4.4
compilerKind: ghc
compilerVersion: 8.4.4
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-8.2.2
compilerKind: ghc
compilerVersion: 8.2.2
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-8.0.2
compilerKind: ghc
compilerVersion: 8.0.2
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-7.10.3
compilerKind: ghc
compilerVersion: 7.10.3
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-7.8.4
compilerKind: ghc
compilerVersion: 7.8.4
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-7.6.3
compilerKind: ghc
compilerVersion: 7.6.3
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-7.4.2
compilerKind: ghc
compilerVersion: 7.4.2
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-7.2.2
compilerKind: ghc
compilerVersion: 7.2.2
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-7.0.4
compilerKind: ghc
compilerVersion: 7.0.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
fail-fast: false
steps:
- name: Set GHCJS environment variables
run: |
if [ $HCKIND = ghcjs ]; then
echo "GHCJS=true" >> "$GITHUB_ENV"
echo "GHCJSARITH=1" >> "$GITHUB_ENV"
else
echo "GHCJS=false" >> "$GITHUB_ENV"
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
fi
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
HCVER: ${{ matrix.compilerVersion }}
- 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" 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'
if [ $((GHCJSARITH)) -ne 0 ] ; then apt-add-repository -y 'ppa:hvr/ghcjs' ; fi
if [ $((GHCJSARITH)) -ne 0 ] ; then curl -sSL "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" | apt-key add - ; fi
if [ $((GHCJSARITH)) -ne 0 ] ; then apt-add-repository -y 'deb https://deb.nodesource.com/node_10.x bionic main' ; fi
apt-get update
if [ $((GHCJSARITH)) -ne 0 ] ; then apt-get install -y "$HCNAME" ghc-8.4.4 nodejs ; else apt-get install -y "$HCNAME" ; fi
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" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
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" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
HCVER: ${{ matrix.compilerVersion }}
- name: Set PATH and environment variables
run: |
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
if [ $((GHCJSARITH)) -ne 0 ] ; then echo "/opt/ghc/8.4.4/bin" >> $GITHUB_PATH ; fi
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
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.2.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"
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand Down Expand Up @@ -229,8 +149,6 @@ jobs:
$HC --version || true
$HC --print-project-git-commit-id || true
$CABAL --version || true
if [ $((GHCJSARITH)) -ne 0 ] ; then node --version ; fi
if [ $((GHCJSARITH)) -ne 0 ] ; then echo $GHCJS ; fi
- name: update cabal index
run: |
$CABAL v2-update -v
Expand All @@ -244,7 +162,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 All @@ -268,8 +186,8 @@ jobs:
touch cabal.project
touch cabal.project.local
echo "packages: ${PKGDIR_assoc}" >> cabal.project
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 80200)) -ne 0 ] ; then echo "package assoc" >> cabal.project ; fi
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
echo "package assoc" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(assoc)$/; }' >> cabal.project.local
Expand All @@ -280,7 +198,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 All @@ -301,7 +219,7 @@ jobs:
${CABAL} -vnormal check
- name: haddock
run: |
if [ $((! GHCJSARITH)) -ne 0 ] ; then $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all ; fi
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
- name: unconstrained build
run: |
rm -f cabal.project.local
Expand All @@ -316,7 +234,7 @@ jobs:
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='assoc -tagged' --dependencies-only -j2 all
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='assoc -tagged' 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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.1

- Drop support for GHC prior GHC-8.6.5

## 1.1

- Depend on `bifunctor-classes-compat` only.
Expand Down
35 changes: 11 additions & 24 deletions assoc.cabal
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
cabal-version: 1.12
cabal-version: 3.0
name: assoc
version: 1.1
x-revision: 1
license: BSD3
version: 1.1.1
license: BSD-3-Clause
license-file: LICENSE
synopsis: swap and assoc: Symmetric and Semigroupy Bifunctors
category: Data
Expand All @@ -18,31 +17,22 @@ maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>
build-type: Simple
extra-source-files: CHANGELOG.md
tested-with:
GHC ==7.0.4
|| ==7.2.2
|| ==7.4.2
|| ==7.6.3
|| ==7.8.4
|| ==7.10.3
|| ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.5
GHC ==8.6.5
|| ==8.8.4
|| ==8.10.7
|| ==9.0.2
|| ==9.2.8
|| ==9.4.7
|| ==9.6.3
|| ==9.8.1
, GHCJS ==8.4
|| ==9.4.8
|| ==9.6.5
|| ==9.8.2
|| ==9.10.1

source-repository head
type: git
location: https://github.com/phadej/assoc.git

flag tagged
default: True
default: False
manual: True
description:
You can disable the use of the `tagged` package using `-f-tagged`.
Expand All @@ -52,13 +42,10 @@ flag tagged
library
default-language: Haskell2010
hs-source-dirs: src
build-depends: base >=4.3 && <4.20
build-depends: base >=4.12 && <4.21

if flag(tagged)
build-depends: tagged >=0.8.6 && <0.9

if !impl(ghc >=8.0)
build-depends: bifunctor-classes-compat >=0.1 && <0.2
build-depends: tagged >=0.8.8 && <0.9

exposed-modules:
Data.Bifunctor.Assoc
Expand Down
2 changes: 1 addition & 1 deletion cabal.haskell-ci
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
distribution: bionic
distribution: jammy
branches: master
head-hackage: False

Expand Down

0 comments on commit f1eb64e

Please sign in to comment.