1+ name : build 
12on : [push] 
2- name : haskell-ci 
3+ 
4+ #  INFO: The following configuration block ensures that only one build runs per branch,
5+ #  which may be desirable for projects with a costly build process.
6+ #  Remove this block from the CI workflow to let each CI job run to completion.
7+ concurrency :
8+   group : build-${{ github.ref }} 
9+   cancel-in-progress : true 
10+ 
311jobs :
412  hlint :
513    runs-on : ubuntu-latest 
614    steps :
7-     - uses : actions/checkout@v3  
15+     - uses : actions/checkout@v4  
816    - uses : haskell-actions/hlint-setup@v2 
917    - uses : haskell-actions/hlint-run@v2 
1018      with :
@@ -13,94 +21,70 @@ jobs:
1321  ormolu :
1422    runs-on : ubuntu-latest 
1523    steps :
16-       - uses : actions/checkout@v3 
17-       - uses : haskell-actions/run-ormolu@v14 
18- 
19-   cabal :
24+       - uses : actions/checkout@v4 
25+       - uses : haskell-actions/run-ormolu@v16 
26+   build :
2027    name : GHC ${{ matrix.ghc-version }} on ${{ matrix.os }} 
2128    runs-on : ${{ matrix.os }} 
2229    strategy :
2330      fail-fast : false 
2431      matrix :
2532        os : [ubuntu-latest] 
26-         ghc-version : ['9.6', '9.4', '9.2', '8.10'] 
27-         docspec : [false] 
28-         experimental : [false] 
33+         ghc-version : ['9.10', '9.8', '9.6'] 
2934
3035        include :
3136          - os : windows-latest 
32-             ghc-version : ' 9.6 ' 
37+             ghc-version : ' 9.8 ' 
3338          - os : macos-latest 
34-             ghc-version : ' 9.6' 
35-           - os : ubuntu-latest 
36-             ghc-version : ' 9.6' 
37-             docspec : true 
38-             experimental : true 
39-             name : docspec 
39+             ghc-version : ' 9.8' 
4040
4141    steps :
42-       - uses : actions/checkout@v3  
42+       - uses : actions/checkout@v4  
4343
4444      - name : Set up GHC ${{ matrix.ghc-version }} 
45-         uses : haskell/ actions/setup@v2 
45+         uses : haskell- actions/setup@v2 
4646        id : setup 
4747        with :
4848          ghc-version : ${{ matrix.ghc-version }} 
4949
50-       - name : Installed minor versions of GHC and Cabal 
51-         shell : bash 
52-         run : | 
53-           GHC_VERSION=$(ghc --numeric-version) 
54-           CABAL_VERSION=$(cabal --numeric-version) 
55-           echo "GHC_VERSION=${GHC_VERSION}"     >> "${GITHUB_ENV}" 
56-           echo "CABAL_VERSION=${CABAL_VERSION}" >> "${GITHUB_ENV}" 
57- 
5850      - name : Configure the build 
5951        run : | 
6052          cabal configure --enable-tests --enable-benchmarks --disable-documentation 
6153          cabal build --dry-run 
6254#  The last step generates dist-newstyle/cache/plan.json for the cache key.
6355
6456      - name : Restore cached dependencies 
65-         uses : actions/cache/restore@v3  
57+         uses : actions/cache/restore@v4  
6658        id : cache 
59+         env :
60+           key : ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }} 
6761        with :
6862          path : ${{ steps.setup.outputs.cabal-store }} 
69-           key : ${{ runner.os }}-ghc-${{ env.GHC_VERSION }}-cabal-${{ env.CABAL_VERSION }}-plan-${{ hashFiles('**/plan.json') }} 
70-           restore-keys : | 
71-             ${{ runner.os }}-ghc-${{ env.GHC_VERSION }}-cabal-${{ env.CABAL_VERSION }}- 
63+           key : ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }} 
64+           restore-keys : ${{ env.key }}- 
7265
7366      - name : Install dependencies 
67+         #  If we had an exact cache hit, the dependencies will be up to date.
68+         if : steps.cache.outputs.cache-hit != 'true' 
7469        run : cabal build all --only-dependencies 
7570
7671      #  Cache dependencies already here, so that we do not have to rebuild them should the subsequent steps fail.
7772      - name : Save cached dependencies 
78-         uses : actions/cache/save@v3 
79-         #  Caches are immutable, trying to save with the same key would error.
80-         if : ${{ !steps.cache.outputs.cache-hit 
81-           || steps.cache.outputs.cache-primary-key != steps.cache.outputs.cache-matched-key }} 
73+         uses : actions/cache/save@v4 
74+         #  If we had an exact cache hit, trying to save the cache would error because of key clash.
75+         if : steps.cache.outputs.cache-hit != 'true' 
8276        with :
8377          path : ${{ steps.setup.outputs.cabal-store }} 
8478          key : ${{ steps.cache.outputs.cache-primary-key }} 
8579
8680      - name : Build 
8781        run : cabal build all 
8882
89-       - name : Run tests 
90-         run : cabal test all 
83+       - if : ${{ matrix.os == 'ubuntu-latest' && matrix.ghc-version == '9.8'}} 
84+         name : doctests 
85+         run : | 
86+           cabal run doctests 
87+           cabal run markup-parse-diff 
9188
9289name : Check cabal file 
9390        run : cabal check 
94- 
95-       - if : matrix.docspec 
96-         name : cabal-docspec 
97-         run : | 
98-           mkdir -p $HOME/.cabal/bin 
99-           echo "$HOME/.cabal/bin" >> $GITHUB_PATH 
100-           curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20230406/cabal-docspec-0.0.0.20230406-x86_64-linux.xz > cabal-docspec.xz 
101-           echo '68fa9addd5dc453d533a74a763950499d4593b1297c9a05c3ea5bd1acc04c9dd cabal-docspec.xz' | sha256sum -c - 
102-           xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec 
103-           rm -f cabal-docspec.xz 
104-           chmod a+x $HOME/.cabal/bin/cabal-docspec 
105-           $HOME/.cabal/bin/cabal-docspec --version 
106-           cabal-docspec 
0 commit comments