views:

271

answers:

2

What is the preferred way to automate build/test/ci/doc-gen/... for a Haskell project?

At the moment I use Cabal for the "final" build and bash-scripts to automate testing/checkins/doc-gen/.. but I would like to replace the bash-scripts.

I've installed Nemesis (rake for Haskell according to the author) but I'm not yet sure it's the right tool.

Just to clarify: I'm looking for something that I can add custom commands with custom arguments to (is it possible with Cabal?), i.e.

foo test unit

foo test db

foo test all

foo db migrate

...

+2  A: 

I might be old fashioned, but I just set up my .cabal file and darcs repository and add a Makefile that with the dependencies of its default action tries to build my package, runs any tests, checks in the current build, and fires off cabal haddock to generate my documentation.

Then I just crack open vim and keep call out to make as needed.

Edward Kmett
+3  A: 

Cabal is the preferred way to build/test/generate docs for Haskell projects. ~1500 projects are built this way on hackage:

To build docs for your project:

  • cabal haddock

To build your project:

  • cabal install

To clean your project:

  • cabal clean
Don Stewart
It sounded like he was looking for something that ran cabal for him (at least, thats what I got from the continuous-integration tag).
Edward Kmett
I'm using `cabal build` seems to be a fair bit faster. You don't need to install every time.
Ollie Saunders