diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae0cda5..9886c74 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -88,6 +88,12 @@ jobs: cabal test all --builddir=${{ env.cabal-build-dir }} + - name: Benchmark + run: > + cabal bench all + --builddir=${{ env.cabal-build-dir }} + || true + - name: Documentation (Generation) run: > cabal haddock diff --git a/haskell-example.cabal b/haskell-example.cabal index 8f67b8e..e392c0f 100644 --- a/haskell-example.cabal +++ b/haskell-example.cabal @@ -74,3 +74,18 @@ test-suite haskell-example-test base >=4.7 && <5 , haskell-example , hspec + +benchmark haskell-example-benchmark + import: + common-extensions + default-language: + Haskell2010 + type: + exitcode-stdio-1.0 + hs-source-dirs: + src/haskell-example-benchmark + main-is: + Main.hs + build-depends: + base >=4.7 && <5 + , haskell-example diff --git a/src/haskell-example-benchmark/Main.hs b/src/haskell-example-benchmark/Main.hs new file mode 100644 index 0000000..7b59c38 --- /dev/null +++ b/src/haskell-example-benchmark/Main.hs @@ -0,0 +1,6 @@ +module Main where + +import Prelude + +main :: IO () +main = pure ()