diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 6d4930a..e0ef764 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,20 +8,18 @@ # # For more information, see https://github.com/andreasabel/haskell-ci # -# version: 0.17.20230911 +# version: 0.17.20240110 # -# REGENDATA ("0.17.20230911",["github","netrc.cabal"]) +# REGENDATA ("0.17.20240110",["github","netrc.cabal"]) # name: Haskell-CI on: push: branches: - master - - ci* pull_request: branches: - master - - ci* jobs: linux: name: Haskell-CI - Linux - ${{ matrix.compiler }} @@ -34,19 +32,19 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.8.0.20230822 + - compiler: ghc-9.8.1 compilerKind: ghc - compilerVersion: 9.8.0.20230822 + compilerVersion: 9.8.1 setup-method: ghcup - allow-failure: true - - compiler: ghc-9.6.2 + allow-failure: false + - compiler: ghc-9.6.4 compilerKind: ghc - compilerVersion: 9.6.2 + compilerVersion: 9.6.4 setup-method: ghcup allow-failure: false - - compiler: ghc-9.4.7 + - compiler: ghc-9.4.8 compilerKind: ghc - compilerVersion: 9.4.7 + compilerVersion: 9.4.8 setup-method: ghcup allow-failure: false - compiler: ghc-9.2.8 @@ -67,56 +65,39 @@ 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 + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.4 compilerKind: ghc compilerVersion: 8.4.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.2.2 compilerKind: ghc compilerVersion: 8.2.2 - setup-method: hvr-ppa + setup-method: ghcup 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 + 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" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml; - "$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" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml; - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - fi + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev + 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 }} @@ -128,27 +109,18 @@ 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" echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" - if [ $((HCNUMVER >= 90800)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi + echo "HEADHACKAGE=false" >> "$GITHUB_ENV" echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" echo "GHCJSARITH=0" >> "$GITHUB_ENV" env: @@ -177,18 +149,6 @@ jobs: repository hackage.haskell.org url: http://hackage.haskell.org/ EOF - if $HEADHACKAGE; then - cat >> $CABAL_CONFIG <> $CABAL_CONFIG <= 80200)) -ne 0 ] ; then echo "package netrc" >> cabal.project ; fi if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi cat >> cabal.project <> cabal.project - fi - $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(bytestring|directory|netrc|process|unix)$/; }' >> cabal.project.local + $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(netrc)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan @@ -282,16 +237,6 @@ jobs: run: | rm -f cabal.project.local $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - - name: prepare for constraint sets - run: | - rm -f cabal.project.local - - name: constraint set bytestring-0.12 - run: | - if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' all --dry-run ; fi - if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then cabal-plan topo | sort ; fi - if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' --dependencies-only -j2 all ; fi - if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' all ; fi - if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' all ; fi - name: save cache uses: actions/cache/save@v3 if: always() diff --git a/cabal.haskell-ci b/cabal.haskell-ci index 6faa1f2..d5e2627 100644 --- a/cabal.haskell-ci +++ b/cabal.haskell-ci @@ -1,13 +1,2 @@ -branches: master ci* -installed: +all -bytestring -directory -process -unix - -constraint-set bytestring-0.12 - ghc: >= 8.2 - constraints: bytestring >= 0.12 - tests: True - run-tests: True - --- This is needed for the bytestring-0.12 constraint set as of 2021-07-12 -raw-project - allow-newer: parsec:bytestring - allow-newer: unix:bytestring +branches: master +-- installed: +all -bytestring -directory -process -unix diff --git a/changelog.md b/changelog.md index 8885155..fb48f99 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,8 @@ +## Unreleased + + - Drop cabal flag `bytestring_has_builder` and support for bytestring < 0.10.4. + - Drop support for GHC 7. + ## 0.2.0.0 - Change data representation to associate `macdef` entries with diff --git a/netrc.cabal b/netrc.cabal index 93064b1..41d58c9 100644 --- a/netrc.cabal +++ b/netrc.cabal @@ -20,9 +20,9 @@ description: tested-with: - GHC == 9.8.0 - GHC == 9.6.2 - GHC == 9.4.7 + GHC == 9.8.1 + GHC == 9.6.4 + GHC == 9.4.8 GHC == 9.2.8 GHC == 9.0.2 GHC == 8.10.7 @@ -31,17 +31,12 @@ tested-with: GHC == 8.4.4 GHC == 8.2.2 GHC == 8.0.2 - GHC == 7.10.3 extra-source-files: changelog.md src-tests/data/*.netrc src-tests/data/*.netrc.out -Flag bytestring_has_builder - description: whether bytestring is 0.10.4 or newer - default: True - library default-language: Haskell2010 other-extensions: @@ -53,28 +48,17 @@ library RecordWildCards build-depends: - base >= 4.5 && < 5 + base >= 4.9 && < 5 , deepseq >= 1.3 && < 1.6 - , bytestring >= 0.9.2.1 && < 0.13 + , bytestring >= 0.10.4 && < 0.13 , parsec >= 3.1 && < 3.2 - -- GHC.Generics lived in `ghc-prim` for GHC 7.2 & GHC 7.4 - if impl(ghc < 7.6) - build-depends: - ghc-prim == 0.2.* - - if flag(bytestring_has_builder) - build-depends: - bytestring >= 0.10.4 - else - build-depends: - bytestring < 0.10.4 - , bytestring-builder >= 0.10.4.1.2 && < 0.11 - hs-source-dirs: src exposed-modules: Network.NetRc - ghc-options: -Wall + ghc-options: + -Wall + -Wcompat test-suite test-netrc default-language: Haskell2010