diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 7bddbf8e..463233e7 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.13.20210827 +# version: 0.13.20211111 # -# REGENDATA ("0.13.20210827",["--config=cabal.haskell-ci","github","cabal.project"]) +# REGENDATA ("0.13.20211111",["--config=cabal.haskell-ci","github","cabal.project"]) # name: Haskell-CI on: @@ -24,21 +24,28 @@ jobs: linux: name: Haskell-CI - Linux - ${{ matrix.compiler }} runs-on: ubuntu-18.04 + timeout-minutes: + 60 container: image: buildpack-deps:bionic continue-on-error: ${{ matrix.allow-failure }} strategy: matrix: include: + - compiler: ghc-9.2.1 + compilerKind: ghc + compilerVersion: 9.2.1 + setup-method: ghcup + allow-failure: false - compiler: ghc-9.0.1 compilerKind: ghc compilerVersion: 9.0.1 setup-method: hvr-ppa allow-failure: false - - compiler: ghc-8.10.4 + - compiler: ghc-8.10.7 compilerKind: ghc - compilerVersion: 8.10.4 - setup-method: hvr-ppa + compilerVersion: 8.10.7 + setup-method: ghcup allow-failure: false - compiler: ghc-8.8.4 compilerKind: ghc @@ -81,9 +88,21 @@ jobs: run: | apt-get update apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" cabal-install-3.4 + if [ "${{ matrix.setup-method }}" = ghcup ]; then + mkdir -p "$HOME/.ghcup/bin" + curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup" + chmod a+x "$HOME/.ghcup/bin/ghcup" + "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" + "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 + 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.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup" + chmod a+x "$HOME/.ghcup/bin/ghcup" + "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 + fi env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} @@ -95,11 +114,20 @@ jobs: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER - 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=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> "$GITHUB_ENV" + if [ "${{ matrix.setup-method }}" = ghcup ]; then + HC=$HOME/.ghcup/bin/$HCKIND-$HCVER + echo "HC=$HC" >> "$GITHUB_ENV" + echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" + echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.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.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" + fi + 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" @@ -133,6 +161,10 @@ jobs: repository hackage.haskell.org url: http://hackage.haskell.org/ EOF + cat >> $CABAL_CONFIG <= 80200)) -ne 0 ] ; then echo "package github-samples" >> cabal.project ; fi if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi cat >> cabal.project <=1.3 + constraints: hashable >=1.3 constraints: semigroups ^>=0.19 constraints: github +openssl constraints: github-samples +openssl allow-newer: deepseq-generics-0.2.0.0:base allow-newer: deepseq-generics-0.2.0.0:ghc-prim - allow-newer: cryptohash-sha1-0.11.100.1:base - allow-newer: http-link-header-1.2.0:attoparsec + allow-newer: HsOpenSSL:bytestring optimization: False EOF $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(github|github-samples)$/; }' >> cabal.project.local diff --git a/cabal.project b/cabal.project index 0f0cd647..b9ac7eb6 100644 --- a/cabal.project +++ b/cabal.project @@ -4,7 +4,7 @@ packages: samples optimization: False tests: True -constraints: hashable ^>=1.3 +constraints: hashable >=1.3 constraints: semigroups ^>=0.19 constraints: github +openssl @@ -12,5 +12,4 @@ constraints: github-samples +openssl allow-newer: deepseq-generics-0.2.0.0:base allow-newer: deepseq-generics-0.2.0.0:ghc-prim -allow-newer: cryptohash-sha1-0.11.100.1:base -allow-newer: http-link-header-1.2.0:attoparsec +allow-newer: HsOpenSSL:bytestring diff --git a/github.cabal b/github.cabal index c25f94f3..e9f0b5bf 100644 --- a/github.cabal +++ b/github.cabal @@ -1,6 +1,7 @@ cabal-version: >=1.10 name: github version: 0.27 +x-revision: 1 synopsis: Access to the GitHub API, v3. category: Network description: @@ -37,8 +38,9 @@ tested-with: || ==8.4.4 || ==8.6.5 || ==8.8.4 - || ==8.10.4 + || ==8.10.7 || ==9.0.1 + || ==9.2.1 extra-source-files: README.md @@ -158,9 +160,9 @@ library -- Packages bundles with GHC, mtl and text are also here build-depends: - base >=4.7 && <4.16 + base >=4.7 && <4.17 , binary >=0.7.1.0 && <0.11 - , bytestring >=0.10.4.0 && <0.11 + , bytestring >=0.10.4.0 && <0.12 , containers >=0.5.5.1 && <0.7 , deepseq >=1.3.0.2 && <1.5 , mtl >=2.1.3.1 && <2.2 || >=2.2.1 && <2.3 @@ -177,7 +179,7 @@ library , cryptohash-sha1 >=0.11.100.1 && <0.12 , deepseq-generics >=0.2.0.0 && <0.3 , exceptions >=0.10.2 && <0.11 - , hashable >=1.2.7.0 && <1.4 + , hashable >=1.2.7.0 && <1.5 , http-client >=0.5.12 && <0.8 , http-link-header >=1.0.3.1 && <1.3 , http-types >=0.12.3 && <0.13 @@ -209,7 +211,7 @@ test-suite github-test hs-source-dirs: spec main-is: Spec.hs ghc-options: -Wall -threaded - build-tool-depends: hspec-discover:hspec-discover >=2.7.1 && <2.8 + build-tool-depends: hspec-discover:hspec-discover >=2.7.1 && <2.10 other-extensions: TemplateHaskell other-modules: GitHub.ActivitySpec @@ -234,7 +236,7 @@ test-suite github-test , bytestring , file-embed , github - , hspec >=2.6.1 && <2.8 + , hspec >=2.6.1 && <2.10 , tagged , text , unordered-containers diff --git a/samples/github-samples.cabal b/samples/github-samples.cabal index 270609d7..f1ff2045 100644 --- a/samples/github-samples.cabal +++ b/samples/github-samples.cabal @@ -16,8 +16,9 @@ tested-with: || ==8.4.4 || ==8.6.5 || ==8.8.4 - || ==8.10.4 + || ==8.10.7 || ==9.0.1 + || ==9.2.1 library hs-source-dirs: src