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

ghc 9.12 #13

Merged
merged 2 commits into from
Jan 7, 2025
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
53 changes: 31 additions & 22 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
#
# haskell-ci regenerate
#
# For more information, see https://github.com/andreasabel/haskell-ci
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.19.20240517
# version: 0.19.20241223
#
# REGENDATA ("0.19.20240517",["github","brotli.cabal"])
# REGENDATA ("0.19.20241223",["github","brotli.cabal"])
#
name: Haskell-CI
on:
Expand All @@ -32,19 +32,24 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.12.1
compilerKind: ghc
compilerVersion: 9.12.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.10.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.8.2
- compiler: ghc-9.8.4
compilerKind: ghc
compilerVersion: 9.8.2
compilerVersion: 9.8.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.5
- compiler: ghc-9.6.6
compilerKind: ghc
compilerVersion: 9.6.5
compilerVersion: 9.6.6
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
Expand Down Expand Up @@ -94,17 +99,30 @@ jobs:
allow-failure: false
fail-fast: false
steps:
- name: apt
- name: apt-get install
run: |
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
apt-get install -y libbrotli-dev
- name: Install GHCup
run: |
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"
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
- name: Install cabal-install
run: |
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
- name: Install GHC (GHCup)
if: matrix.setup-method == 'ghcup'
run: |
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.3.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
apt-get update
apt-get install -y libbrotli-dev
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"
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -115,21 +133,12 @@ jobs:
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
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.3.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 @@ -245,8 +254,8 @@ jobs:
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: save cache
uses: actions/cache/save@v4
if: always()
uses: actions/cache/save@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
86 changes: 86 additions & 0 deletions .github/workflows/stack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Stack
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
check:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc-ver: ['9.10', '9.8', '9.6', '9.4', '9.2', '9.0', '8.10', '8.8', '8.6', '8.4']
include:
- os: macos-latest
ghc-ver: '9.10'
- os: windows-latest
ghc-ver: '9.10'

env:
ARGS: "--stack-yaml=stack-${{ matrix.ghc-ver }}.yaml --no-terminal --system-ghc"
# --no-install-ghc also prevents the installation of MSYS2 on Windows
# https://github.com/commercialhaskell/stack/issues/6675

# Needed for Windows to make piping (... >> ...) and evaluation ( $(...) ) work.
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4

- uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc-ver }}
enable-stack: true
cabal-update: false

- name: Install the brotli library (Windows)
if: runner.os == 'Windows'
# Andreas Abel, 2022-02-15 / 2025-01-07:
# Stack might be packing an old version of MSYS2.
# To work around certification problems, we update msys2-keyring.
run: |
stack exec ${{ env.ARGS }} -- pacman --noconfirm -Sy msys2-keyring
stack exec ${{ env.ARGS }} -- pacman --noconfirm -S mingw-w64-x86_64-pkgconf
stack exec ${{ env.ARGS }} -- pacman --noconfirm -S mingw-w64-x86_64-brotli

- name: Install the brotli library (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libbrotli-dev -qq

- name: Cache dependencies (restore)
uses: actions/cache/restore@v4
id: cache
with:
path: ${{ steps.setup.outputs.stack-root }}
# Use a unique primary key (always save new cache); works if caches aren't to big or too many...
key: ${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ steps.setup.outputs.ghc-version }}-commit-${{ github.sha }}
restore-keys: ${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ steps.setup.outputs.ghc-version }}-

- name: Install dependencies
run: |
stack build ${{ env.ARGS }} --test --only-dependencies

- name: Build hackage-cli
run: |
stack build ${{ env.ARGS }}

- name: Test hackage-cli
run: |
stack test ${{ env.ARGS }}

- name: Cache dependencies (save)
uses: actions/cache/save@v4
if: always() && steps.cache.outputs.cache-hit != 'true'
# # Will fail if we already have a cache with this key (in this case, cache-hit is true).
with:
path: ${{ steps.setup.outputs.stack-root }}
key: ${{ steps.cache.outputs.cache-primary-key }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/dist-newstyle/
/.ghc.environment.*
*~
/.stack-work/
/stack*.yaml.lock
11 changes: 7 additions & 4 deletions brotli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ description:
.

tested-with:
GHC == 9.12.1
GHC == 9.10.1
GHC == 9.8.2
GHC == 9.6.5
GHC == 9.8.4
GHC == 9.6.6
GHC == 9.4.8
GHC == 9.2.8
GHC == 9.0.2
Expand Down Expand Up @@ -85,8 +86,10 @@ test-suite brotli-tests
, bytestring
-- additional dependencies that require version bounds
build-depends: HUnit == 1.6.*
, QuickCheck >= 2.14 && < 2.16
, tasty >= 1.2 && < 1.6
, QuickCheck >= 2.11.3 && < 2.16
-- LTS 12.26 has QuickCheck-2.11.3
, tasty >= 1.1.0.4 && < 1.6
-- LTS 12.26 has tasty-1.1.0.4
, tasty-hunit == 0.10.*
, tasty-quickcheck >= 0.10 && < 1

Expand Down
1 change: 1 addition & 0 deletions stack-8.10.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-18.28
1 change: 1 addition & 0 deletions stack-8.4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-12.26
1 change: 1 addition & 0 deletions stack-8.6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-14.27
1 change: 1 addition & 0 deletions stack-8.8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-16.31
1 change: 1 addition & 0 deletions stack-9.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-19.33
1 change: 1 addition & 0 deletions stack-9.10.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: nightly-2025-01-05
9 changes: 9 additions & 0 deletions stack-9.2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
resolver: lts-20.26

extra-deps:
- attoparsec-aeson-2.1.0.0
- snap-1.1.3.3
- snap-core-1.0.5.1
- snap-server-1.1.2.1
- heist-1.1.1.2
- readable-0.3.1
5 changes: 5 additions & 0 deletions stack-9.4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resolver: lts-21.25

extra-deps:
- snap-1.1.3.3
- snap-server-1.1.2.1
1 change: 1 addition & 0 deletions stack-9.6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-22.43
1 change: 1 addition & 0 deletions stack-9.8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-23.3
1 change: 1 addition & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: nightly-2024-01-23
Loading