From 40cc39b73449a8c47269e97c9ce8552ebc4bb294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Had=C5=BEi=C4=87?= Date: Mon, 13 Jan 2025 15:43:46 +0100 Subject: [PATCH 1/3] Added tested compilers up to GHC-9.10.1 and updated dependencies' constraints; version bumped to 0.1.40.2 --- .github/workflows/haskell-ci.yml | 59 +++++++++++++++++++++----------- hgettext.cabal | 13 ++++--- 2 files changed, 47 insertions(+), 25 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index b168052..d8fd335 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -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.17.20231012 +# version: 0.19.20250104 # -# REGENDATA ("0.17.20231012",["github","hgettext.cabal"]) +# REGENDATA ("0.19.20250104",["github","hgettext.cabal"]) # name: Haskell-CI on: @@ -27,11 +27,26 @@ jobs: timeout-minutes: 60 container: - image: buildpack-deps:focal + image: buildpack-deps:jammy continue-on-error: ${{ matrix.allow-failure }} strategy: matrix: include: + - compiler: ghc-9.10.1 + compilerKind: ghc + compilerVersion: 9.10.1 + setup-method: ghcup + allow-failure: false + - compiler: ghc-9.8.4 + compilerKind: ghc + compilerVersion: 9.8.4 + setup-method: ghcup + allow-failure: false + - compiler: ghc-9.8.2 + compilerKind: ghc + compilerVersion: 9.8.2 + setup-method: ghcup + allow-failure: false - compiler: ghc-9.8.1 compilerKind: ghc compilerVersion: 9.8.1 @@ -89,16 +104,29 @@ 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 + - name: Install GHCup + run: | 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" + 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" - "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml; + - name: Install cabal-install + run: | + "$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.1 || (cat "$HOME"/.ghcup/logs/*.* && false) + echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.1 -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.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + 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 }} @@ -109,21 +137,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.1.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 }} @@ -201,7 +220,7 @@ jobs: if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi cat >> cabal.project <> cabal.project.local + $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(hgettext)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan @@ -209,7 +228,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 @@ -236,8 +255,8 @@ jobs: rm -f cabal.project.local $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - name: save cache - uses: actions/cache/save@v3 if: always() + uses: actions/cache/save@v4 with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} path: ~/.cabal/store diff --git a/hgettext.cabal b/hgettext.cabal index 8c27134..da56290 100644 --- a/hgettext.cabal +++ b/hgettext.cabal @@ -1,6 +1,6 @@ cabal-version: 1.14 name: hgettext -version: 0.1.40.1 +version: 0.1.40.2 build-type: Simple license: BSD3 @@ -19,6 +19,9 @@ description: This package provides bindings to the @gettext@ internation A user-contributed tutorial can be found in the [Haskell Wiki](https://wiki.haskell.org/Internationalization_of_Haskell_programs_using_gettext). tested-with: + GHC == 9.10.1 + GHC == 9.8.4 + GHC == 9.8.2 GHC == 9.8.1 GHC == 9.6.3 GHC == 9.4.7 @@ -50,11 +53,11 @@ library other-modules: Internal hs-source-dirs: src - build-depends: base >=4.5 && <4.20 - , Cabal >=1.14 && <1.25 || >= 2.0 && < 2.5 || >=3.0 && <3.12 + build-depends: base >=4.5 && <4.22 + , Cabal >=1.14 && <1.25 || >= 2.0 && < 2.5 || >=3.0 && <3.15 , containers >=0.4.2 && <0.8 , directory >=1.1 && <1.4 - , filepath >=1.3 && <1.5 + , filepath >=1.3 && <1.6 , process >=1.1 && <1.7 , setlocale >=0.0.3 && <1.1 @@ -84,7 +87,7 @@ executable hgettext , haskell-src-exts >=1.18 && <1.24 , uniplate >=1.6.12 && <1.7 , split >=0.2.3.4 && <0.3 - , extra >=0.1 && <1.8 + , extra >=0.1 && <1.9 -- readFileUTF8 exists since extra-0.1 ghc-options: -Wall From d82223c9f6e97622c929580ab0b6b17cbc656575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Had=C5=BEi=C4=87?= Date: Mon, 13 Jan 2025 16:19:19 +0100 Subject: [PATCH 2/3] Updated CI file to use @andreasabel haskell-ci fork --- .github/workflows/haskell-ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index d8fd335..523e595 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -6,11 +6,11 @@ # # haskell-ci regenerate # -# For more information, see https://github.com/haskell-CI/haskell-ci +# For more information, see https://github.com/andreasabel/haskell-ci # -# version: 0.19.20250104 +# version: 0.19.20241219 # -# REGENDATA ("0.19.20250104",["github","hgettext.cabal"]) +# REGENDATA ("0.19.20241219",["github","hgettext.cabal"]) # name: Haskell-CI on: @@ -113,10 +113,11 @@ jobs: mkdir -p "$HOME/.ghcup/bin" 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 + - name: Install cabal-install (prerelease) run: | - "$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.1 || (cat "$HOME"/.ghcup/logs/*.* && false) - echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.1 -vnormal+nowrap" >> "$GITHUB_ENV" + "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml; + "$HOME/.ghcup/bin/ghcup" install cabal 3.15.0.0.2024.10.3 || (cat "$HOME"/.ghcup/logs/*.* && false) + echo "CABAL=$HOME/.ghcup/bin/cabal-3.15.0.0.2024.10.3 -vnormal+nowrap" >> "$GITHUB_ENV" - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | From b89bb6fcea752d652f5ceebb4199f90a3bf78bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Had=C5=BEi=C4=87?= Date: Mon, 13 Jan 2025 17:32:45 +0100 Subject: [PATCH 3/3] Testing for GHC-9.8.1 and 9.8.2 removed; 9.6 and 9.4 bumped to 9.6.6 and 9.4.8 --- .github/workflows/haskell-ci.yml | 18 ++++-------------- hgettext.cabal | 6 ++---- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 523e595..ec81002 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -42,24 +42,14 @@ jobs: compilerVersion: 9.8.4 setup-method: ghcup allow-failure: false - - compiler: ghc-9.8.2 + - compiler: ghc-9.6.6 compilerKind: ghc - compilerVersion: 9.8.2 + compilerVersion: 9.6.6 setup-method: ghcup allow-failure: false - - compiler: ghc-9.8.1 + - compiler: ghc-9.4.8 compilerKind: ghc - compilerVersion: 9.8.1 - setup-method: ghcup - allow-failure: false - - compiler: ghc-9.6.3 - compilerKind: ghc - compilerVersion: 9.6.3 - setup-method: ghcup - allow-failure: false - - compiler: ghc-9.4.7 - compilerKind: ghc - compilerVersion: 9.4.7 + compilerVersion: 9.4.8 setup-method: ghcup allow-failure: false - compiler: ghc-9.2.8 diff --git a/hgettext.cabal b/hgettext.cabal index da56290..e979819 100644 --- a/hgettext.cabal +++ b/hgettext.cabal @@ -21,10 +21,8 @@ description: This package provides bindings to the @gettext@ internation tested-with: GHC == 9.10.1 GHC == 9.8.4 - GHC == 9.8.2 - GHC == 9.8.1 - GHC == 9.6.3 - GHC == 9.4.7 + GHC == 9.6.6 + GHC == 9.4.8 GHC == 9.2.8 GHC == 9.0.2 GHC == 8.10.7