From 98daca73f846111ed016ef0c00dd86328df41837 Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Wed, 23 Aug 2023 20:02:35 +0000 Subject: [PATCH] Update haskell-ci for the new cabal.project --- .github/workflows/haskell-ci.yml | 15 ++++++++++++--- cabal.project | 3 +++ code/cabal.project | 3 --- 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 cabal.project delete mode 100644 code/cabal.project diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 4e15d415..9092d751 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -1,6 +1,6 @@ # This GitHub workflow config has been generated by a script via # -# haskell-ci 'github' '--haddock' '--hlint' '--hlint-job' '9.4.5' '--github-patches' '.github/haskell-ci.patch' 'code/hsec-tools/hsec-tools.cabal' +# haskell-ci 'github' '--haddock' '--hlint' '--hlint-job' '9.4.5' '--github-patches' '.github/haskell-ci.patch' 'cabal.project' # # To regenerate the script (for example after adjusting tested-with) run # @@ -10,7 +10,7 @@ # # version: 0.16.3 # -# REGENDATA ("0.16.3",["github","--haddock","--hlint","--hlint-job","9.4.5","--github-patches",".github/haskell-ci.patch","code/hsec-tools/hsec-tools.cabal"]) +# REGENDATA ("0.16.3",["github","--haddock","--hlint","--hlint-job","9.4.5","--github-patches",".github/haskell-ci.patch","cabal.project"]) # name: Haskell-CI on: @@ -175,6 +175,7 @@ jobs: run: | touch cabal.project echo "packages: $GITHUB_WORKSPACE/source/code/hsec-tools" >> cabal.project + echo "packages: $GITHUB_WORKSPACE/source/code/cwe" >> cabal.project cat cabal.project - name: sdist run: | @@ -188,15 +189,20 @@ jobs: run: | PKGDIR_hsec_tools="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/hsec-tools-[0-9.]*')" echo "PKGDIR_hsec_tools=${PKGDIR_hsec_tools}" >> "$GITHUB_ENV" + PKGDIR_cwe="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/cwe-[0-9.]*')" + echo "PKGDIR_cwe=${PKGDIR_cwe}" >> "$GITHUB_ENV" rm -f cabal.project cabal.project.local touch cabal.project touch cabal.project.local echo "packages: ${PKGDIR_hsec_tools}" >> cabal.project + echo "packages: ${PKGDIR_cwe}" >> cabal.project echo "package hsec-tools" >> cabal.project echo " ghc-options: -Werror=missing-methods" >> cabal.project + echo "package cwe" >> cabal.project + echo " ghc-options: -Werror=missing-methods" >> cabal.project cat >> cabal.project <> cabal.project.local + $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(cwe|hsec-tools)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan @@ -226,10 +232,13 @@ jobs: run: | if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_hsec_tools} && hlint -XHaskell2010 src) ; fi if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_hsec_tools} && hlint -XHaskell2010 app) ; fi + if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_cwe} && hlint -XHaskell2010 src) ; fi - name: cabal check run: | cd ${PKGDIR_hsec_tools} || false ${CABAL} -vnormal check + cd ${PKGDIR_cwe} || false + ${CABAL} -vnormal check - name: haddock run: | $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all diff --git a/cabal.project b/cabal.project new file mode 100644 index 00000000..d564aa41 --- /dev/null +++ b/cabal.project @@ -0,0 +1,3 @@ +tested-with: GHC==9.2.5 + +packages: code/hsec-tools, code/cwe diff --git a/code/cabal.project b/code/cabal.project deleted file mode 100644 index 0814a5cb..00000000 --- a/code/cabal.project +++ /dev/null @@ -1,3 +0,0 @@ -tested-with: GHC==9.2.5 - -packages: hsec-tools, cwe