Using Nim with CircleCI

Feb 08, 2015

Using Nim with CircleCI is fairly easy, the same instructions can be used for bootstrapping as usual.

What is CircleCI?

CircleCI is a new continuous integration service that is particularly suitable for open source projects. They allow 1 free VM for all projects, and 4 free VMs if you attach it to a Github repo. It seems to use the same model as Github and Bitbucket: Free for individuals and OSS, paid for corporations.

Setting up the environment

    - |
        if [ ! -x ~/bin/nim ]; then
          if [ ! -x ~/nim/bin/nim ]; then
            git clone -b devel --depth 1 ~/nim/
            git clone -b devel --depth 1 git:// ~/nim/csources/
            cd ~/nim/csources
            cd ../
            bin/nim c koch
            ./koch boot

          ln -s ~/nim/bin/nim ~/bin/nim

    - "~/bin/"
    - "~/nim/"

Lets go over that again.

Running tests

    - nim c -r tests/all

This is straightforward, just add the appropriate command to the circle.yaml file. The command you’ll have use depends on how you’ve set up your tests.

Other notes

You can use Nim from master or a tag, just adapt the git commands appropriately.

You may also want to check out It provides a guide to getting started with Nim and suggests a similar setup for CI!