Skip to content

Commit

Permalink
Add a benchmark step to CI. (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles authored Mar 14, 2023
2 parents c95f68f + eca2812 commit 1615aa4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions haskell-example.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions src/haskell-example-benchmark/Main.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module Main where

import Prelude

main :: IO ()
main = pure ()

0 comments on commit 1615aa4

Please sign in to comment.