diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c3ee9c1..cdc0e14 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,20 +5,15 @@ on: pull_request: { branches: [main] } create: { tags: [v*] } +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + defaults: run: shell: bash jobs: - cancel: - name: Cancel redundant actions already in progress - runs-on: ubuntu-latest - steps: - - name: Cancel actions in progress of same workflow and same branch - uses: styfle/cancel-workflow-action@0.9.0 - with: - access_token: ${{ github.token }} - # Check that Haskell code is formatted. code-formatter: runs-on: ubuntu-latest @@ -31,6 +26,7 @@ jobs: runs-on: ${{ matrix.os }} needs: code-formatter strategy: + fail-fast: false matrix: os: - ubuntu-latest @@ -44,14 +40,14 @@ jobs: # If you change it, make sure to adjust lower bounds there to reflect the change. # Also, make sure to adjust tested-with field in package.yaml so that it contains # corresponding GHC version. - stack-resolver: lts-18.21 + stack-resolver: lts-19.33 steps: - name: Checkout the repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Cache (Unix) - uses: actions/cache@v2 + uses: actions/cache@v4 if: runner.os == 'Linux' || runner.os == 'macOS' with: path: | @@ -77,7 +73,7 @@ jobs: restore-keys: | haskell-${{ runner.os }}-${{ hashFiles('stack.yaml') }}- - name: Cache (Windows) - uses: actions/cache@v2 + uses: actions/cache@v4 if: runner.os == 'Windows' with: # C\:sr is where stack installs compiled dependencies. @@ -98,29 +94,28 @@ jobs: # We are setting up haskell via ghcup instead of using haskell/actions/setup # because the mentioned gh action can be months late with the latest versions # of Stack. - - name: Set up Haskell (Stack) via ghcup (Unix) - if: runner.os == 'Linux' || runner.os == 'macOS' - run: | - export BOOTSTRAP_HASKELL_NONINTERACTIVE=1 - export BOOTSTRAP_HASKELL_INSTALL_STACK=1 - curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh - - - name: Set up Haskell (Stack) via ghcup (Win) - if: runner.os == 'Windows' - run: | - Set-ExecutionPolicy Bypass -Scope Process -Force - [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 - Invoke-Command -ScriptBlock ([ScriptBlock]::Create(".{$(Invoke-WebRequest https://www.haskell.org/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing)} -InstallStack")) - shell: powershell + # - name: Set up Haskell (Stack) via ghcup (Unix) + # if: runner.os == 'Linux' || runner.os == 'macOS' + # run: | + # export BOOTSTRAP_HASKELL_NONINTERACTIVE=1 + # export BOOTSTRAP_HASKELL_INSTALL_STACK=1 + # curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh + # + # - name: Set up Haskell (Stack) via ghcup (Win) + # if: runner.os == 'Windows' + # run: | + # Set-ExecutionPolicy Bypass -Scope Process -Force + # [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 + # Invoke-Command -ScriptBlock ([ScriptBlock]::Create(".{$(Invoke-WebRequest https://www.haskell.org/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing)} -InstallStack")) + # shell: powershell # NOTE: I commented out this in favor of manual setup above, since with this action we # couldn't get the latest version of Stack. - # - name: Set up Haskell (Stack) - # uses: haskell/actions/setup@v1 - # with: - # ghc-version: latest - # enable-stack: true - # stack-version: latest + - uses: haskell-actions/setup@v2 + with: + ghc-version: latest + enable-stack: true + stack-version: latest - name: Set Stack resolver if: matrix.stack-resolver != 'from-stack-yaml' @@ -134,10 +129,10 @@ jobs: stack path --stack-root stack ghc -- --version ghc --version - - - name: Build dependencies + + - name: Build dependencies run: stack --install-ghc test --only-dependencies - + - name: Build StrongPath & Run tests run: stack test diff --git a/package.yaml b/package.yaml index 604bdd2..f1a9ef2 100644 --- a/package.yaml +++ b/package.yaml @@ -15,7 +15,7 @@ category: System, Filesystem, FilePath description: Replacement for a FilePath that enables you to handle filepaths in your code in a type-safe manner. You can specify at type level if they are relative, absolute, file, directory, posix, windows, and even to which file or directory they point to or are relative to. -tested-with: GHC == 8.10.7, GHC == 9.0.1 # lts-18.21, nightly-2022-01-04 +tested-with: GHC == 9.0.2 # lts-19.33 dependencies: - base >= 4.7 && < 5 @@ -35,7 +35,7 @@ library: - path >=0.9.2 && <0.10 - exceptions >=0.10 && <0.11 - filepath >=1.4 && <1.5 - - template-haskell >=2.16 && <2.18 + - template-haskell >=2.17 && <2.18 - hashable >=1.3 && < 1.4 tests: @@ -52,7 +52,7 @@ tests: - filepath - hashable >=1.3 && < 1.4 - tasty >=1.4 && <1.5 - - tasty-hspec >=1.1 && <1.3 + - tasty-hspec >=1.2 && <1.3 - tasty-quickcheck >=0.10 && <0.11 - tasty-discover >=4.2 && <4.3 - - hspec >=2.7 && <2.10 + - hspec >=2.8 && <2.10 diff --git a/stack.yaml b/stack.yaml index 37058bc..0d07b5d 100644 --- a/stack.yaml +++ b/stack.yaml @@ -20,7 +20,7 @@ # NOTE: If you modify this field, make sure to update the tested-with # field in package.yaml to contain the corresponding GHC versions. -resolver: nightly-2022-01-04 +resolver: lts-19.33 # User packages to be built. # Various formats can be used as shown in the example below. @@ -43,8 +43,6 @@ packages: # - git: https://github.com/commercialhaskell/stack.git # commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a # -extra-deps: - - path-0.9.2 # Override default flag values for local packages and extra-deps # flags: {} diff --git a/stack.yaml.lock b/stack.yaml.lock index 1f2ae92..53255a7 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -1,19 +1,12 @@ # This file was autogenerated by Stack. # You should not edit this file by hand. # For more information, please see the documentation at: -# https://docs.haskellstack.org/en/stable/lock_files +# https://docs.haskellstack.org/en/stable/topics/lock_files +packages: [] snapshots: -- original: nightly-2022-01-04 - completed: - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2022/1/4.yaml - sha256: ea584edfba307b5a88b51fc1db7c0c1b7da5f714fd30d69699fc78e3e1ce5212 - size: 623654 -packages: -- original: - hackage: path-0.9.2 - completed: - pantry-tree: - sha256: 2acf94a62daeeb0aee9b77d044ece55b5e03445b574e6980a2e84a5a514f5517 - size: 1206 - hackage: path-0.9.2@sha256:2f2a7f01737cd350b30381b619e1a862601c83f10ede4d6935f76f66e63ae0c7,3273 +- completed: + sha256: 6d1532d40621957a25bad5195bfca7938e8a06d923c91bc52aa0f3c41181f2d4 + size: 619204 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/33.yaml + original: lts-19.33 diff --git a/strong-path.cabal b/strong-path.cabal index 4ba168b..e7777d1 100644 --- a/strong-path.cabal +++ b/strong-path.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4. +-- This file has been generated from package.yaml by hpack version 0.37.0. -- -- see: https://github.com/sol/hpack @@ -48,7 +48,7 @@ library , filepath ==1.4.* , hashable ==1.3.* , path >=0.9.2 && <0.10 - , template-haskell >=2.16 && <2.18 + , template-haskell ==2.17.* default-language: Haskell2010 test-suite strong-path-test @@ -71,11 +71,11 @@ test-suite strong-path-test base >=4.7 && <5 , filepath , hashable ==1.3.* - , hspec >=2.7 && <2.10 + , hspec >=2.8 && <2.10 , path , strong-path , tasty ==1.4.* , tasty-discover ==4.2.* - , tasty-hspec >=1.1 && <1.3 + , tasty-hspec ==1.2.* , tasty-quickcheck ==0.10.* default-language: Haskell2010