Haskell & CircleCI 2.0 Beta

This article describes a startup guide to set up a continuous integration pipeline with CircleCI 2.0 for a my Haskell application. For me Haskell & CircleCI is a perfect match. It works without complicated configuration, makes it easy to build project and deploy to any host.

If you’re in a rush, just copy the my configuration below into a .circleci/config.yml in your project’s root directory and start building.
Otherwise, i recommend reading the circleci walkthrough for a detailed explanation of circleci configuration.

I working on my own Haskell project and make a few assumptions here:

  • You are using stack 1.4.0
  • You are using maybe coveralls for test coverage.
  • You wan use a prepared docker build haskell image (docker-circleci-haskell)

Here my configuration (you should change some values, for your project ) :

I use current my own docker image with “stack setup” inside. Wich includes also shc for coveralls and git. It can be found on my github account, contributors are welcome.

The rest of the sections (checkout,restore_cache,save_cache) is part of the circleci commands and can be read up hier (project-walkthrough).