diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 744b7987..4625447d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,7 +20,7 @@ jobs: - name: Set up HLint uses: haskell-actions/hlint-setup@v2 with: - version: "3.6.1" + version: "3.8" - name: Apply HLint run: | set -ex diff --git a/.github/workflows/stan.yml b/.github/workflows/stan.yml index 33ce8a41..809e830b 100644 --- a/.github/workflows/stan.yml +++ b/.github/workflows/stan.yml @@ -14,10 +14,10 @@ jobs: uses: actions/checkout@v4 - name: Cache dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.stack - key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }} + key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('stack.yaml') }} - name: Install stan run: | @@ -33,7 +33,7 @@ jobs: run: .bin/stan report --cabal-file-path=pantry.cabal - name: Upload HTML report - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Stan_report path: stan.html diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 73ccfa7a..d8c664fe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,8 +7,8 @@ on: - master workflow_dispatch: -# As of 6 January 2024, ubuntu-latest, windows-latest and macos-latest come -# with Stack 2.13.1. +# As of 4 February 2024, ubuntu-latest, windows-latest and macos-latest come +# with Stack 2.13.1. However, macos-14 does not come with Haskell tools. jobs: build: @@ -21,11 +21,14 @@ jobs: - ubuntu-latest resolver: - stack-ghc-9.4.8.yaml - - stack-ghc-9.6.3.yaml + - stack-ghc-9.6.4.yaml - stack-ghc-9.8.1.yaml include: - os: macos-latest resolver: stack-ghc-9.8.1.yaml + # macos-14 provides macOS/AArch64 (M1) + - os: macos-14 + resolver: stack-ghc-9.8.1.yaml - os: windows-latest resolver: stack-ghc-9.8.1.yaml steps: @@ -33,22 +36,29 @@ jobs: uses: actions/checkout@v4 - name: Cache dependencies on Unix-like OS if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS') - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.stack - key: ${{ runner.os }}-${{ matrix.resolver }} + key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.resolver }} - name: Cache dependencies on Windows if: startsWith(runner.os, 'Windows') - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~\AppData\Roaming\stack ~\AppData\Local\Programs\stack - key: ${{ runner.os }}-${{ matrix.resolver }} + key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.resolver }} - name: Build and run tests shell: bash run: | set -ex + + if [[ "${{ matrix.os }}" == "macos-14" ]] + then + # macos-14 does not include Haskell tools as at 2024-02-04. + curl -sSL https://get.haskellstack.org/ | sh + fi + stack --resolver ${{ matrix.resolver }} test --bench --no-run-benchmarks --haddock --no-haddock-deps test-pretty-exceptions: name: Test build of test-pretty-exceptions @@ -66,18 +76,18 @@ jobs: uses: actions/checkout@v4 - name: Cache dependencies on Unix-like OS if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS') - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.stack - key: ${{ runner.os }}-${{ matrix.resolver }}-pretty + key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.resolver }}-pretty - name: Cache dependencies on Windows if: startsWith(runner.os, 'Windows') - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~\AppData\Roaming\stack ~\AppData\Local\Programs\stack - key: ${{ runner.os }}-${{ matrix.resolver }}-pretty + key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.resolver }}-pretty - name: Build test-pretty-exceptions shell: bash run: | diff --git a/.hlint.yaml b/.hlint.yaml index ee70d74f..094bbc12 100644 --- a/.hlint.yaml +++ b/.hlint.yaml @@ -7,3 +7,7 @@ name: "Use fewer imports" within: - Pantry.Types +- ignore: + name: "Functor law" + within: + - Pantry.Types diff --git a/stack-ghc-9.2.8.yaml b/stack-ghc-9.2.8.yaml index 036cce35..55962672 100644 --- a/stack-ghc-9.2.8.yaml +++ b/stack-ghc-9.2.8.yaml @@ -1,5 +1,5 @@ # Snapshot specification for GHC 9.2.8. -resolver: lts-20.26 # GHC 9.2.8 +snapshot: lts-20.26 # GHC 9.2.8 packages: - aeson-warning-parser-0.1.1@sha256:e5b81492d39bfe5de99fdc838e54e0fc0f2e290eb9fcfd4531cabf24baeada76,1353 diff --git a/stack-ghc-9.4.8.yaml b/stack-ghc-9.4.8.yaml index 9e8062ff..de12e2e0 100644 --- a/stack-ghc-9.4.8.yaml +++ b/stack-ghc-9.4.8.yaml @@ -1,5 +1,5 @@ # Snapshot specification for GHC 9.4.8. -resolver: lts-21.25 # GHC 9.4.8 +snapshot: lts-21.25 # GHC 9.4.8 packages: - aeson-warning-parser-0.1.1@sha256:e5b81492d39bfe5de99fdc838e54e0fc0f2e290eb9fcfd4531cabf24baeada76,1353 diff --git a/stack-ghc-9.6.3.yaml b/stack-ghc-9.6.3.yaml deleted file mode 100644 index 7804e589..00000000 --- a/stack-ghc-9.6.3.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# Snapshot specification for GHC 9.6.3. -resolver: lts-22.6 # GHC 9.6.3 - -flags: - hackage-security: - cabal-syntax: true diff --git a/stack-ghc-9.6.4.yaml b/stack-ghc-9.6.4.yaml new file mode 100644 index 00000000..bebfb366 --- /dev/null +++ b/stack-ghc-9.6.4.yaml @@ -0,0 +1,6 @@ +# Snapshot specification for GHC 9.6.4. +snapshot: lts-22.9 # GHC 9.6.4 + +flags: + hackage-security: + cabal-syntax: true diff --git a/stack-ghc-9.8.1.yaml b/stack-ghc-9.8.1.yaml index 071f6086..023cf7d5 100644 --- a/stack-ghc-9.8.1.yaml +++ b/stack-ghc-9.8.1.yaml @@ -1,5 +1,5 @@ # Snapshot specification for GHC 9.8.1. -resolver: nightly-2024-01-17 # GHC 9.8.1 +snapshot: nightly-2024-02-04 # GHC 9.8.1 packages: - hedgehog-1.4@sha256:47633efec27b49fe5a21d51f3b9fce428ca4b945d39eaa163b2b6a1d3e1465be,4724 diff --git a/stack.yaml b/stack.yaml index 81cd7970..c0fbaec4 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1 +1 @@ -resolver: stack-ghc-9.6.3.yaml +snapshot: stack-ghc-9.6.4.yaml diff --git a/stack.yaml.lock b/stack.yaml.lock index 1b74b0a3..74ebb5da 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -6,7 +6,7 @@ packages: [] snapshots: - completed: - sha256: 1b4c2669e26fa828451830ed4725e4d406acc25a1fa24fcc039465dd13d7a575 - size: 714100 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/6.yaml - original: lts-22.6 + sha256: ad2884d5d84ed4ea576897103606212da3be693eef30591efe2d8d2965895500 + size: 714105 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/9.yaml + original: lts-22.9