diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 92faa7a..be8de35 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/andreasabel/haskell-ci # -# version: 0.17.20240110 +# version: 0.19.20240429 # -# REGENDATA ("0.17.20240110",["github","hackage-cli.cabal"]) +# REGENDATA ("0.19.20240429",["github","hackage-cli.cabal"]) # name: Haskell-CI on: @@ -27,19 +27,19 @@ 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.8.1 + - compiler: ghc-9.8.2 compilerKind: ghc - compilerVersion: 9.8.1 + compilerVersion: 9.8.2 setup-method: ghcup allow-failure: false - - compiler: ghc-9.6.4 + - compiler: ghc-9.6.5 compilerKind: ghc - compilerVersion: 9.6.4 + compilerVersion: 9.6.5 setup-method: ghcup allow-failure: false - compiler: ghc-9.4.8 @@ -91,8 +91,9 @@ jobs: 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" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml; "$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) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.3.0 || (cat "$HOME"/.ghcup/logs/*.* && false) apt-get update apt-get install -y libbrotli-dev env: @@ -112,7 +113,7 @@ jobs: 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" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.3.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" @@ -205,7 +206,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 @@ -235,7 +236,7 @@ jobs: rm -f cabal.project.local $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - name: save cache - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 if: always() with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml index 5d62207..317d36c 100644 --- a/.github/workflows/stack.yml +++ b/.github/workflows/stack.yml @@ -14,18 +14,16 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - ghc-ver: [9.8.1, 9.6.4] + ghc-ver: [9.8, 9.6] # Snapshots for 9.4.8, 9.2.8, 9.0.2, 8.10.7 do not have a recent enough base-compat; 0.13 is needed. # On ubuntu-22.04 the old versions 8.8.4, 8.6.5, 8.4.4, 8.2.2 fail due to HsOpenSSL linking errors. # They used to work under ubuntu-20.04, but it is not worth the trouble maintaining them. # Apparently, HsOpenSSL-0.11.6 and older are too old for ubuntu-22.04. include: - os: macos-latest - ghc-ver: 9.8.1 + ghc-ver: 9.8 - os: windows-latest - ghc-ver: 9.8.1 - env: - ARGS: "--stack-yaml=stack-${{ matrix.ghc-ver }}.yaml --no-terminal --system-ghc" + ghc-ver: 9.8 # Needed for Windows to make piping (... >> ...) and evaluation ( $(...) ) work. defaults: @@ -35,7 +33,7 @@ jobs: - uses: actions/checkout@v4 - uses: haskell-actions/setup@v2 - id: haskell-setup + id: setup with: ghc-version: ${{ matrix.ghc-ver }} enable-stack: true @@ -59,17 +57,16 @@ jobs: - name: Set environment variables based on Haskell setup run: | - STACK_VER=$(stack --numeric-version) - echo "STACK_VER=${STACK_VER}" >> "${GITHUB_ENV}" + echo "ARGS=--stack-yaml=stack-${{ steps.setup.outputs.ghc-version }}.yaml --no-terminal --system-ghc" >> "${GITHUB_ENV}" - name: Cache dependencies (restore) uses: actions/cache/restore@v4 id: cache with: - path: ${{ steps.haskell-setup.outputs.stack-root }} + path: ${{ steps.setup.outputs.stack-root }} # Use a unique primary key (always save new cache); works if caches aren't to big or too many... - key: ${{ runner.os }}-stack-${{ env.STACK_VER }}-ghc-${{ matrix.ghc-ver }}-commit-${{ github.sha }} - restore-keys: ${{ runner.os }}-stack-${{ env.STACK_VER }}-ghc-${{ matrix.ghc-ver }}- + key: ${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ steps.setup.outputs.ghc-version }}-commit-${{ github.sha }} + restore-keys: ${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ steps.setup.outputs.ghc-version }}- - name: Install dependencies # if: ${{ steps.cache.outputs.cache-hit != 'true' }} @@ -86,9 +83,8 @@ jobs: - name: Cache dependencies (save) uses: actions/cache/save@v4 - if: always() + if: always() && steps.cache.outputs.cache-hit != 'true' # # Will fail if we already have a cache with this key (in this case, cache-hit is true). - # if: ${{ steps.cache.outputs.cache-hit != 'true' }} with: - path: ${{ steps.haskell-setup.outputs.stack-root }} + path: ${{ steps.setup.outputs.stack-root }} key: ${{ steps.cache.outputs.cache-primary-key }} diff --git a/hackage-cli.cabal b/hackage-cli.cabal index 11313db..b0826d7 100644 --- a/hackage-cli.cabal +++ b/hackage-cli.cabal @@ -18,8 +18,8 @@ build-type: Simple -- Supported GHC versions when building with cabal: tested-with: -- Keep in descending order. - GHC == 9.8.1 - GHC == 9.6.4 + GHC == 9.8.2 + GHC == 9.6.5 GHC == 9.4.8 GHC == 9.2.8 GHC == 9.0.2 @@ -55,9 +55,9 @@ library cabal-revisions ghc-options: -Wall -Wcompat build-depends: - , base >= 4.10.0.0 && < 4.20 + , base >= 4.10.0.0 && < 5 , bytestring >= 0.10.4.0 && < 0.13 - , Cabal >= 3.4 && < 3.11 + , Cabal >= 3.4 && < 3.13 , containers >= 0.5.0.0 && < 0.8 , mtl >= 2.2.2 && < 2.3 || >= 2.3.1 && < 2.4 , pretty ^>= 1.1.2 @@ -79,7 +79,7 @@ test-suite cabal-revisions-tests , tasty >= 1.0 && < 1.6 -- tasty-1.0 for stack-8.2.2.yaml , tasty-golden ^>= 2.3.2 - , filepath ^>= 1.4.0.0 + , filepath >= 1.4.0.0 && < 1.6 executable hackage-cli default-language: Haskell2010 @@ -134,8 +134,8 @@ executable hackage-cli , tagsoup ^>= 0.14 , tar >= 0.5 && < 1 , text >= 1.2 && < 2.2 - , time >= 1.5.0.1 && < 1.13 + , time >= 1.5.0.1 && < 1.15 , unordered-containers ^>= 0.2.7 - , zlib ^>= 0.6.1 + , zlib >= 0.6.1 && < 0.8 ghc-options: -Wall -Wcompat -threaded diff --git a/stack-9.4.8.yaml b/stack-9.4.8.yaml index f28a3dd..a3fe096 100644 --- a/stack-9.4.8.yaml +++ b/stack-9.4.8.yaml @@ -1,3 +1,7 @@ resolver: lts-21.25 compiler: ghc-9.4.8 compiler-check: match-exact + +# Cannot easily update base-compat in this snapshot +# extra-deps: +# - base-compat-0.13.1 diff --git a/stack-9.6.yaml b/stack-9.6.yaml new file mode 100644 index 0000000..6c5ba3a --- /dev/null +++ b/stack-9.6.yaml @@ -0,0 +1 @@ +resolver: lts-22.21 diff --git a/stack-9.8.yaml b/stack-9.8.yaml new file mode 100644 index 0000000..edac743 --- /dev/null +++ b/stack-9.8.yaml @@ -0,0 +1 @@ +resolver: nightly-2024-05-11