From 695898f9b36ba0a78ce168cefe8d9713225cb438 Mon Sep 17 00:00:00 2001 From: Adithya Kumar Date: Sat, 26 Oct 2024 19:59:19 +0530 Subject: [PATCH 1/3] Bump the upper bound of base for all the build targets --- experimental/icu/icu.cabal | 2 +- experimental/unicode-data-text/unicode-data-text.cabal | 6 +++--- ucd2haskell/ucd2haskell.cabal | 4 ++-- unicode-data-names/unicode-data-names.cabal | 6 +++--- unicode-data-scripts/unicode-data-scripts.cabal | 6 +++--- unicode-data-security/unicode-data-security.cabal | 6 +++--- unicode-data/unicode-data.cabal | 6 +++--- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/experimental/icu/icu.cabal b/experimental/icu/icu.cabal index c4e4ded..c243fec 100644 --- a/experimental/icu/icu.cabal +++ b/experimental/icu/icu.cabal @@ -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 diff --git a/experimental/unicode-data-text/unicode-data-text.cabal b/experimental/unicode-data-text/unicode-data-text.cabal index b75317f..e476db7 100644 --- a/experimental/unicode-data-text/unicode-data-text.cabal +++ b/experimental/unicode-data-text/unicode-data-text.cabal @@ -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 @@ -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, @@ -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, diff --git a/ucd2haskell/ucd2haskell.cabal b/ucd2haskell/ucd2haskell.cabal index 78d35ba..f84b891 100644 --- a/ucd2haskell/ucd2haskell.cabal +++ b/ucd2haskell/ucd2haskell.cabal @@ -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 @@ -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 diff --git a/unicode-data-names/unicode-data-names.cabal b/unicode-data-names/unicode-data-names.cabal index 1b2c4f4..0629d9d 100644 --- a/unicode-data-names/unicode-data-names.cabal +++ b/unicode-data-names/unicode-data-names.cabal @@ -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) @@ -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 @@ -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, diff --git a/unicode-data-scripts/unicode-data-scripts.cabal b/unicode-data-scripts/unicode-data-scripts.cabal index 8a95946..c4a42c5 100644 --- a/unicode-data-scripts/unicode-data-scripts.cabal +++ b/unicode-data-scripts/unicode-data-scripts.cabal @@ -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: @@ -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) @@ -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, diff --git a/unicode-data-security/unicode-data-security.cabal b/unicode-data-security/unicode-data-security.cabal index f2706d2..9e56104 100644 --- a/unicode-data-security/unicode-data-security.cabal +++ b/unicode-data-security/unicode-data-security.cabal @@ -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) @@ -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 @@ -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, diff --git a/unicode-data/unicode-data.cabal b/unicode-data/unicode-data.cabal index 89beffa..2d54940 100644 --- a/unicode-data/unicode-data.cabal +++ b/unicode-data/unicode-data.cabal @@ -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 @@ -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) @@ -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, From a12370d990d24b56655bab8c4b428193e08a747f Mon Sep 17 00:00:00 2001 From: Adithya Kumar Date: Sat, 26 Oct 2024 20:29:04 +0530 Subject: [PATCH 2/3] Update packcheck and add ghc-9.12.1-alpha to the CI --- .github/workflows/haskell.yml | 82 +++++++++++++++++------------------ 1 file changed, 40 insertions(+), 42 deletions(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index c513c52..24764c7 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -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. @@ -58,53 +60,53 @@ jobs: - 9.6.5 - 9.8.2 - 9.10.1+ucd2haskell - - latest-nightly + - 9.12.1-alpha - hlint include: - name: 8.0.2 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 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 @@ -112,7 +114,7 @@ jobs: # [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 @@ -124,7 +126,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 @@ -135,15 +137,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 @@ -154,50 +163,39 @@ 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 - - uses: haskell-actions/setup@v2 - with: - ghc-version: ${{ matrix.ghc_version }} - ghcup-release-channel: ${{ matrix.ghcup_release_channel }} - cabal-version: ${{ matrix.cabal_version }} - - uses: actions/cache@v4 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" From 2f60034dc6b307a3a80d4f4b22053388b75bfc16 Mon Sep 17 00:00:00 2001 From: Adithya Kumar Date: Sat, 26 Oct 2024 23:46:40 +0530 Subject: [PATCH 3/3] Use haskell setup action for ghc 8.0.2 and 8.2.2 --- .github/workflows/haskell.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 24764c7..f60b36f 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -65,6 +65,7 @@ jobs: include: - name: 8.0.2 + use_haskell_actions: true ghc_version: 8.0.2 runner: ubuntu-latest cabal_version: 3.2.0.0 @@ -72,6 +73,7 @@ jobs: ignore_error: false - name: 8.2.2 + use_haskell_actions: true ghc_version: 8.2.2 runner: ubuntu-latest cabal_version: 3.2.0.0 @@ -172,6 +174,19 @@ jobs: 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 }} + cabal-version: ${{ matrix.cabal_version }} + - uses: actions/cache@v4 name: Cache ~/.cabal with: