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 the upper bound of base for all the build targets #135

Merged
merged 3 commits into from
Oct 26, 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
85 changes: 49 additions & 36 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ jobs:
# ------------------------------------------------------------------------
PACKCHECK_LOCAL_PATH: "./packcheck.sh"
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
PACKCHECK_GITHUB_COMMIT: "v0.6.0"
PACKCHECK_GITHUB_COMMIT: "e575ff318c93add2a6d3f9107a52c5e37c666a98"

# ------------------------------------------------------------------------
# Build options
# ------------------------------------------------------------------------
GHCUP_VERSION: 0.1.20.0
BUILD: cabal-v2 ${{ matrix.pack_options }}
GHCVER: ${{ matrix.ghc_version }}
CABALVER: ${{ matrix.cabal_version }}

runs-on: ${{ matrix.runner }}
# [NOTE] The following is a hack to fix the lack of “allow-failure” feature.
Expand All @@ -58,61 +60,63 @@ jobs:
- 9.6.5
- 9.8.2
- 9.10.1+ucd2haskell
- latest-nightly
- 9.12.1-alpha
- hlint
include:

- name: 8.0.2
use_haskell_actions: true
ghc_version: 8.0.2
runner: ubuntu-latest
cabal_version: latest
cabal_version: 3.2.0.0
pack_options: DISABLE_TEST=y
ignore_error: false

- name: 8.2.2
use_haskell_actions: true
ghc_version: 8.2.2
runner: ubuntu-latest
cabal_version: 3.2
cabal_version: 3.2.0.0
pack_options: DISABLE_TEST=y
ignore_error: false

- name: 8.4.4
ghc_version: 8.4.4
runner: ubuntu-latest
cabal_version: 3.2
cabal_version: 3.2.0.0
pack_options: DISABLE_TEST=y
ignore_error: false

- name: 8.6.5
ghc_version: 8.6.5
runner: ubuntu-latest
cabal_version: 3.2
cabal_version: 3.2.0.0
ignore_error: false

- name: 8.8.4
ghc_version: 8.8.4
runner: ubuntu-latest
cabal_version: 3.2
cabal_version: 3.2.0.0
ignore_error: false

- name: 8.10.7
ghc_version: 8.10.7
runner: ubuntu-latest
cabal_version: 3.2
cabal_version: 3.2.0.0
ignore_error: false

- name: 9.0.2
ghc_version: 9.0.2
runner: ubuntu-latest
cabal_version: 3.2
cabal_version: 3.2.0.0
ignore_error: false

- name: 9.2.8+ucd2haskell
ghc_version: 9.2.8
# [NOTE] Oldest version supported by ucd2haskell
pack_options: CABAL_BUILD_OPTIONS="-f ucd2haskell"
runner: ubuntu-latest
cabal_version: 3.6
cabal_version: 3.6.2.0
ignore_error: false

- name: 9.4.8
Expand All @@ -124,7 +128,7 @@ jobs:
- name: 9.4.8+macOS
ghc_version: 9.4.8
runner: macos-latest
cabal_version: latest
cabal_version: 3.10.1.0
ignore_error: false

- name: 9.6.5
Expand All @@ -135,15 +139,22 @@ jobs:

- name: 9.8.2
ghc_version: 9.8.2
cabal_version: 3.12.1.0
runner: ubuntu-latest
cabal_version: latest
ignore_error: false

- name: 9.10.1+ucd2haskell
ghc_version: 9.10.1
cabal_version: 3.12.1.0
pack_options: CABAL_BUILD_OPTIONS="-f ucd2haskell"
runner: ubuntu-latest
cabal_version: latest
ignore_error: false

- name: 9.12.1-alpha
ghc_version: head
cabal_version: 3.12.1.0
pack_options: GHCUP_GHC_OPTIONS="-u https://downloads.haskell.org/ghc/9.12.1-alpha1/ghc-9.12.20241014-x86_64-deb12-linux.tar.xz" DISABLE_TEST=y
runner: ubuntu-latest
ignore_error: false

# Template for release candidates
Expand All @@ -154,25 +165,23 @@ jobs:
# cabal_version: latest
# ignore_error: false

# [TODO] Use latest cabal (pre-)release
- name: latest-nightly
ghc_version: latest-nightly
ghcup_release_channel: "https://ghc.gitlab.haskell.org/ghcup-metadata/ghcup-nightlies-0.0.7.yaml"
runner: ubuntu-latest
# cabal_version: 3.11.0.0
cabal_version: latest
ignore_error: true

- name: hlint
pack_options: HLINT_OPTIONS="lint" HLINT_TARGETS="lib exe"
runner: ubuntu-latest
cabal_version: 3.2
cabal_version: 3.2.0.0
ignore_error: false

steps:
- uses: actions/checkout@v4

# This is only required for 8.0.2 and 8.2.2
# Fails with the following error when we use ghcup:
# /usr/local/.ghcup/tmp/ghcup-05bf9c49ec7cd38c/usr/local/.ghcup/ghc/8.0.2/lib/ghc-8.0.2/bin/ghc-pkg: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
# This might be because the older ghc installers look for libtinfo.so.5 and not libtinfo.so
# If that is the case "sudo ln libtinfo.so libtinfo.so.5" should fix the problem
# But we can't sudo on the CI so this is the roundabout way to get the CIs working with minimal effort
- uses: haskell-actions/setup@v2
if: ${{ matrix.use_haskell_actions }}
with:
ghc-version: ${{ matrix.ghc_version }}
ghcup-release-channel: ${{ matrix.ghcup_release_channel }}
Expand All @@ -182,22 +191,26 @@ jobs:
name: Cache ~/.cabal
with:
path: ~/.cabal
key: ${{ runner.os }}-${{ matrix.ghc_version }}-cabal
key: ${{ runner.os }}-${{ matrix.ghc_version }}-1

- name: Download packcheck
run: |
# If a custom stack-yaml is specified, replace the default with that
if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
unset STACK_YAML

# Get packcheck if needed
CURL=$(which curl)
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
chmod +x $PACKCHECK_LOCAL_PATH
if test ! -e "$PACKCHECK_LOCAL_PATH"
then
if test -z "$PACKCHECK_GITHUB_COMMIT"
then
die "PACKCHECK_GITHUB_COMMIT is not specified."
fi
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
curl --fail -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL || exit 1
chmod +x $PACKCHECK_LOCAL_PATH
elif test ! -x "$PACKCHECK_LOCAL_PATH"
then
chmod +x $PACKCHECK_LOCAL_PATH
fi

- name: Run packcheck
run: |
# Unset GHC version if it is not numeric, e.g. “latest-nightly”
! [[ $GHCVER =~ ^([[:digit:]]+) ]] && unset GHCVER
bash -c "$PACKCHECK_LOCAL_PATH $BUILD"
# /usr/local/opt/curl/bin for macOS
export PATH=$HOME/.local/bin:$HOME/.ghcup/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/opt/curl/bin
bash -x -c "$PACKCHECK_LOCAL_PATH $BUILD"
2 changes: 1 addition & 1 deletion experimental/icu/icu.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ library
ICU.Scripts
hs-source-dirs: lib
build-depends:
base >= 4.7 && < 4.21
base >= 4.7 && < 4.22
, text >= 2.0 && < 2.2
include-dirs: cbits
c-sources: cbits/icu.c
Expand Down
6 changes: 3 additions & 3 deletions experimental/unicode-data-text/unicode-data-text.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ library

hs-source-dirs: lib
build-depends:
base >= 4.7 && < 4.21,
base >= 4.7 && < 4.22,
text >= 1.2.4 && < 2.2,
unicode-data >= 0.6 && < 0.7

Expand All @@ -79,7 +79,7 @@ test-suite test
other-modules:
Unicode.Text.CaseSpec
build-depends:
base >= 4.7 && < 4.21,
base >= 4.7 && < 4.22,
hspec >= 2.0 && < 2.12,
text >= 1.2.4 && < 2.2,
unicode-data >= 0.6 && < 0.7,
Expand All @@ -93,7 +93,7 @@ benchmark bench
hs-source-dirs: bench
main-is: Main.hs
build-depends:
base >= 4.7 && < 4.21,
base >= 4.7 && < 4.22,
deepseq >= 1.1 && < 1.6,
tasty-bench >= 0.2.5 && < 0.5,
tasty >= 1.4.1 && < 1.6,
Expand Down
4 changes: 2 additions & 2 deletions ucd2haskell/ucd2haskell.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ executable ucd2haskell
if flag(ucd2haskell)
buildable: True
build-depends:
base >= 4.7 && < 4.21
base >= 4.7 && < 4.22
, bytestring >= 0.11 && < 0.13
, containers >= 0.5 && < 0.7
, directory >= 1.3.6 && < 1.4
Expand All @@ -119,7 +119,7 @@ executable test
if flag(ucd2haskell)
buildable: True
build-depends:
base >= 4.7 && < 4.21
base >= 4.7 && < 4.22
, directory >= 1.3.6 && < 1.4
, filepath >= 1.4.100 && < 1.5
, hspec >= 2.0 && < 2.12
Expand Down
6 changes: 3 additions & 3 deletions unicode-data-names/unicode-data-names.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ library

hs-source-dirs: lib
build-depends:
base >= 4.7 && < 4.21,
base >= 4.7 && < 4.22,
unicode-data >= 0.6 && < 0.7
-- Support for raw string literals unpacking is included in base ≥ 4.15
if impl(ghc < 9.0.0)
Expand All @@ -130,7 +130,7 @@ test-suite test
other-modules:
Unicode.Char.General.NamesSpec
build-depends:
base >= 4.7 && < 4.21
base >= 4.7 && < 4.22
, hspec >= 2.0 && < 2.12
, unicode-data >= 0.6 && < 0.7
, unicode-data-names
Expand Down Expand Up @@ -173,7 +173,7 @@ benchmark bench
hs-source-dirs: bench
main-is: Main.hs
build-depends:
base >= 4.7 && < 4.21,
base >= 4.7 && < 4.22,
deepseq >= 1.1 && < 1.6,
tasty-bench >= 0.2.5 && < 0.5,
tasty >= 1.4.1 && < 1.6,
Expand Down
6 changes: 3 additions & 3 deletions unicode-data-scripts/unicode-data-scripts.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ library

hs-source-dirs: lib
build-depends:
base >= 4.7 && < 4.21
base >= 4.7 && < 4.22
-- Support for raw string literals unpacking is included in base ≥ 4.15
if impl(ghc < 9.0.0)
build-depends:
Expand All @@ -102,7 +102,7 @@ test-suite test
other-modules:
Unicode.Char.General.ScriptsSpec
build-depends:
base >= 4.7 && < 4.21
base >= 4.7 && < 4.22
, hspec >= 2.0 && < 2.12
, unicode-data-scripts
if flag(dev-has-icu)
Expand All @@ -118,7 +118,7 @@ benchmark bench
hs-source-dirs: bench
main-is: Main.hs
build-depends:
base >= 4.7 && < 4.21,
base >= 4.7 && < 4.22,
deepseq >= 1.1 && < 1.6,
tasty-bench >= 0.2.5 && < 0.5,
tasty >= 1.4.1 && < 1.6,
Expand Down
6 changes: 3 additions & 3 deletions unicode-data-security/unicode-data-security.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ library
Unicode.Internal.Bits.Security
hs-source-dirs: lib
build-depends:
base >= 4.7 && < 4.21
base >= 4.7 && < 4.22
, unicode-data >= 0.6 && < 0.7
-- Support for raw string literals unpacking is included in base ≥ 4.15
if impl(ghc < 9.0.0)
Expand All @@ -99,7 +99,7 @@ test-suite test
other-modules:
Unicode.Char.Identifiers.SecuritySpec
build-depends:
base >= 4.7 && < 4.21
base >= 4.7 && < 4.22
, hspec >= 2.0 && < 2.12
, unicode-data-security

Expand All @@ -109,7 +109,7 @@ benchmark bench
hs-source-dirs: bench
main-is: Main.hs
build-depends:
base >= 4.7 && < 4.21,
base >= 4.7 && < 4.22,
deepseq >= 1.1 && < 1.6,
tasty-bench >= 0.2.5 && < 0.5,
tasty >= 1.4.1,
Expand Down
6 changes: 3 additions & 3 deletions unicode-data/unicode-data.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ library
hs-source-dirs: lib
ghc-options: -O2
build-depends:
base >=4.7 && < 4.21
base >=4.7 && < 4.22
if impl(ghc < 9.0)
-- Required for unpackCString#
build-depends: ghc-prim
Expand All @@ -132,7 +132,7 @@ test-suite test
other-modules:
Unicode.CharSpec
build-depends:
base >= 4.7 && < 4.21
base >= 4.7 && < 4.22
, hspec >= 2.0 && < 2.12
, unicode-data
if flag(dev-has-icu)
Expand All @@ -159,7 +159,7 @@ benchmark bench
Unicode.Char.NumericBench
Unicode.Char.Numeric.CompatBench
build-depends:
base >= 4.7 && < 4.21,
base >= 4.7 && < 4.22,
deepseq >= 1.1 && < 1.6,
tasty-bench >= 0.2.5 && < 0.5,
tasty >= 1.4.1 && < 1.6,
Expand Down
Loading