Skip to content

Suoport GHC-8.6.5...9.10.1 #42

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

Merged
merged 1 commit into from
Jun 15, 2024
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
117 changes: 34 additions & 83 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.20240608
#
# REGENDATA ("0.17.20231010",["github","cabal.project"])
# REGENDATA ("0.19.20240608",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -23,24 +23,29 @@ jobs:
timeout-minutes:
60
container:
image: buildpack-deps:bionic
image: buildpack-deps:jammy
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
include:
- compiler: ghc-9.8.1
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.8.1
compilerVersion: 9.10.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.3
- compiler: ghc-9.8.2
compilerKind: ghc
compilerVersion: 9.6.3
compilerVersion: 9.8.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.7
- compiler: ghc-9.6.5
compilerKind: ghc
compilerVersion: 9.4.7
compilerVersion: 9.6.5
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
Expand All @@ -61,69 +66,24 @@ 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
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" 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" 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 }}
Expand All @@ -135,22 +95,13 @@ 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.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"
Expand Down Expand Up @@ -207,7 +158,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 @@ -231,19 +182,19 @@ jobs:
touch cabal.project
touch cabal.project.local
echo "packages: ${PKGDIR_lzma}" >> cabal.project
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package lzma" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
echo "package lzma" >> 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 /^(lzma)$/; }' >> cabal.project.local
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(lzma)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
- name: dump install plan
run: |
$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 Down Expand Up @@ -273,7 +224,7 @@ jobs:
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks 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
6 changes: 3 additions & 3 deletions .github/workflows/simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, windows-latest]
ghc: ['8.10','9.0','9.2','9.4.4','9.6.1']
ghc: ['9.2','9.4','9.6','9.8','9.10']
fail-fast: false
timeout-minutes:
60
Expand All @@ -33,10 +33,10 @@ jobs:

- name: Set up Haskell
id: setup-haskell
uses: haskell/actions/setup@v2
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.8.1.0'
cabal-version: '3.10.3.0'

- name: Cache
uses: actions/cache@v3
Expand Down
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.1.1

* Support GHC-8.6.5...9.10.1

## 0.0.1.0

* Add `pkgconfig` package flag.
Expand Down
142 changes: 77 additions & 65 deletions lzma.cabal
Original file line number Diff line number Diff line change
@@ -1,91 +1,103 @@
cabal-version: >=1.10
name: lzma
version: 0.0.1.0
x-revision: 1
cabal-version: 2.2
name: lzma
version: 0.0.1.1
synopsis: LZMA/XZ compression and decompression
homepage: https://github.com/hvr/lzma
bug-reports: https://github.com/hvr/lzma/issues
license: BSD-3-Clause
license-file: LICENSE
author: Herbert Valerio Riedel
maintainer: hvr@gnu.org
copyright: (c) 2015, Herbert Valerio Riedel
stability: experimental
category: Codec, Compression
build-type: Simple
tested-with:
GHC ==8.6.5
|| ==8.8.4
|| ==8.10.7
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.5
|| ==9.8.2
|| ==9.10.1

synopsis: LZMA/XZ compression and decompression
homepage: https://github.com/hvr/lzma
bug-reports: https://github.com/hvr/lzma/issues
license: BSD3
license-file: LICENSE
author: Herbert Valerio Riedel
maintainer: hvr@gnu.org
copyright: (c) 2015, Herbert Valerio Riedel
stability: experimental
category: Codec, Compression
build-type: Simple
tested-with: GHC ==7.4.2, GHC ==7.6.3, GHC ==7.8.4, GHC ==7.10.3, GHC ==8.0.2, 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.8, GHC==9.4.7, GHC==9.6.3, GHC==9.8.1
description:
This package provides a pure interface for compressing and
decompressing
<https://en.wikipedia.org/wiki/LZMA LZMA (Lempel–Ziv–Markov chain algorithm)>
streams of data represented as lazy @ByteString@s. A
monadic incremental interface is provided as well. This package
relies on the <http://tukaani.org/xz/ liblzma C library>.
.
The following packages are based on this package and provide
API support for popular streaming frameworks:
.
* </package/lzma-streams lzma-streams> (for </package/io-streams io-streams>)
.
* </package/pipes-lzma pipes-lzma> (for </package/pipes pipes>)
.
* </package/lzma-conduit lzma-conduit> (for </package/conduit conduit>)
.
This package provides a pure interface for compressing and
decompressing
<https://en.wikipedia.org/wiki/LZMA LZMA (Lempel–Ziv–Markov chain algorithm)>
streams of data represented as lazy @ByteString@s. A
monadic incremental interface is provided as well. This package
relies on the <http://tukaani.org/xz/ liblzma C library>.
.
The following packages are based on this package and provide
API support for popular streaming frameworks:
.
* </package/lzma-streams lzma-streams> (for </package/io-streams io-streams>)
.
* </package/pipes-lzma pipes-lzma> (for </package/pipes pipes>)
.
* </package/lzma-conduit lzma-conduit> (for </package/conduit conduit>)
.

extra-source-files:
Changelog.md
extra-source-files: Changelog.md

flag pkgconfig
description: Use @pkgconfig@ on unix system to find @liblzma@
manual: True
default: True
manual: True
default: True

source-repository head
type: git
location: https://github.com/hvr/lzma.git

library
default-language: Haskell2010
other-extensions: BangPatterns, RecordWildCards, DeriveDataTypeable
hs-source-dirs: src
default-language: Haskell2010
other-extensions:
BangPatterns
DeriveDataTypeable
RecordWildCards

exposed-modules: Codec.Compression.Lzma
other-modules: LibLzma

build-depends: base >=4.5 && <4.20
, bytestring >=0.9.2 && <0.13
hs-source-dirs: src
exposed-modules: Codec.Compression.Lzma
other-modules: LibLzma
build-depends:
, base >=4.12.0.0 && <4.21
, bytestring >=0.10.8.2 && <0.13

if os(windows)
build-depends: lzma-clib
build-depends: lzma-clib

else
if flag(pkgconfig)
pkgconfig-depends: liblzma >=5.2.2
else
includes: lzma.h
extra-libraries: lzma

c-sources: cbits/lzma_wrapper.c

ghc-options: -Wall
else
includes: lzma.h
extra-libraries: lzma

c-sources: cbits/lzma_wrapper.c
ghc-options: -Wall

test-suite lzma-tests
default-language: Haskell2010
other-extensions: OverloadedStrings
hs-source-dirs: src-tests
type: exitcode-stdio-1.0
main-is: lzma-tests.hs
default-language: Haskell2010
other-extensions: OverloadedStrings
hs-source-dirs: src-tests
type: exitcode-stdio-1.0
main-is: lzma-tests.hs

-- dependencies with version bounds inherited from the library stanza
build-depends: lzma
, base
, bytestring
build-depends:
, base
, bytestring
, lzma

-- additional dependencies that require version bounds
build-depends: HUnit >= 1.2 && <1.7
, QuickCheck >= 2.8 && <2.15
, tasty >= 0.10 && <1.6
, tasty-hunit >= 0.9 && <0.11
, tasty-quickcheck >= 0.8.3.2 && <0.11
build-depends:
, QuickCheck ^>=2.14.1 || ^>=2.15.0.1
, tasty ^>=1.5
, tasty-hunit ^>=0.10.1
, tasty-quickcheck ^>=0.10.3

ghc-options: -Wall -threaded
ghc-options: -Wall -threaded
Loading