Skip to content

Commit

Permalink
haskell-ci: use latest doctest to fix ghc-9.6.x job
Browse files Browse the repository at this point in the history
  • Loading branch information
peti committed Sep 4, 2023
1 parent 7173dc6 commit ad5238a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This GitHub workflow config has been generated by a script via
#
# haskell-ci 'github' '--hlint' '--doctest' 'hledger-interest.cabal'
# haskell-ci 'github' '--doctest' '--hlint' '--hlint-job=9.4.7' '--doctest-version=^>=0.22' 'hledger-interest.cabal'
#
# To regenerate the script (for example after adjusting tested-with) run
#
Expand All @@ -10,7 +10,7 @@
#
# version: 0.17.20230826
#
# REGENDATA ("0.17.20230826",["github","--hlint","--doctest","hledger-interest.cabal"])
# REGENDATA ("0.17.20230826",["github","--doctest","--hlint","--hlint-job=9.4.7","--doctest-version=^>=0.22","hledger-interest.cabal"])
#
name: Haskell-CI
on:
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
- name: cache (tools)
uses: actions/cache/restore@v3
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-a7a32ff6
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-7e5c04bc
path: ~/.haskell-ci-tools
- name: install cabal-plan
run: |
Expand All @@ -178,19 +178,19 @@ jobs:
cabal-plan --version
- name: install doctest
run: |
$CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.20'
$CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.22'
doctest --version
- name: install hlint
run: |
if [ $((HCNUMVER >= 90600)) -ne 0 ] ; then HLINTVER=$(cd /tmp && (${CABAL} v2-install -v $ARG_COMPILER --dry-run hlint --constraint='hlint >=3.5 && <3.6' | perl -ne 'if (/\bhlint-(\d+(\.\d+)*)\b/) { print "$1"; last; }')); echo "HLint version $HLINTVER" ; fi
if [ $((HCNUMVER >= 90600)) -ne 0 ] ; then if [ ! -e $HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint ]; then echo "Downloading HLint version $HLINTVER"; mkdir -p $HOME/.haskell-ci-tools; curl --write-out 'Status Code: %{http_code} Redirects: %{num_redirects} Total time: %{time_total} Total Dsize: %{size_download}\n' --silent --location --output $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz "https://github.com/ndmitchell/hlint/releases/download/v$HLINTVER/hlint-$HLINTVER-x86_64-linux.tar.gz"; tar -xzv -f $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz -C $HOME/.haskell-ci-tools; fi ; fi
if [ $((HCNUMVER >= 90600)) -ne 0 ] ; then mkdir -p $CABAL_DIR/bin && ln -sf "$HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint" $CABAL_DIR/bin/hlint ; fi
if [ $((HCNUMVER >= 90600)) -ne 0 ] ; then hlint --version ; fi
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then HLINTVER=$(cd /tmp && (${CABAL} v2-install -v $ARG_COMPILER --dry-run hlint --constraint='hlint >=3.5 && <3.6' | perl -ne 'if (/\bhlint-(\d+(\.\d+)*)\b/) { print "$1"; last; }')); echo "HLint version $HLINTVER" ; fi
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then if [ ! -e $HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint ]; then echo "Downloading HLint version $HLINTVER"; mkdir -p $HOME/.haskell-ci-tools; curl --write-out 'Status Code: %{http_code} Redirects: %{num_redirects} Total time: %{time_total} Total Dsize: %{size_download}\n' --silent --location --output $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz "https://github.com/ndmitchell/hlint/releases/download/v$HLINTVER/hlint-$HLINTVER-x86_64-linux.tar.gz"; tar -xzv -f $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz -C $HOME/.haskell-ci-tools; fi ; fi
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then mkdir -p $CABAL_DIR/bin && ln -sf "$HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint" $CABAL_DIR/bin/hlint ; fi
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then hlint --version ; fi
- name: save cache (tools)
uses: actions/cache/save@v3
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-a7a32ff6
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-7e5c04bc
path: ~/.haskell-ci-tools
- name: checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -246,7 +246,7 @@ jobs:
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
- name: hlint
run: |
if [ $((HCNUMVER >= 90600)) -ne 0 ] ; then (cd ${PKGDIR_hledger_interest} && hlint -XHaskell2010 .) ; fi
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_hledger_interest} && hlint -XHaskell2010 .) ; fi
- name: cabal check
run: |
cd ${PKGDIR_hledger_interest} || false
Expand Down

0 comments on commit ad5238a

Please sign in to comment.