[Haskell-cafe] Stack and Circle CI

23 views
Skip to first unread message

Nicola Gigante

unread,
Aug 24, 2016, 11:59:26 AM8/24/16
to Haskell Cafe
Hi all,

has any of you had any success testing haskell projects on
CircleCI with a setup that involved Stack?

CircleCI seems to directly support haskell by specifying the
version of GHC but I wanted my dependencies and tests to
be handled by Stack also on the testing machines, since it
is my main development tool.

I’m also new to Circle CI in particular, although I used Travis
in the past. I’ve tried collecting some example files but it seems
to have problems with the first ‘stack build’ phase since I see
no output in the online console.

My circle.yml file:

dependencies:
cache_directories:
- "~/.stack"
pre:
- wget https://github.com/commercialhaskell/stack/releases/download/v0.1.2.0/stack-0.1.2.0-x86_64-linux.gz -O /tmp/stack.gz
- gunzip /tmp/stack.gz && chmod +x /tmp/stack
- sudo mv /tmp/stack /usr/bin/stack
override:
- stack setup
- stack build

test:
override:
- stack test


Anybody? Thanks.

Greetings,
Nicola
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.

Joel H

unread,
Aug 24, 2016, 12:14:08 PM8/24/16
to Nicola Gigante, Haskell Cafe
Hi,

I've used this one: https://github.com/jhedev/todobackend-haskell/blob/master/circle.yml And it worked great so far.

Maybe this helps.

Regards,
Joel

Nicola Gigante

unread,
Aug 24, 2016, 12:36:25 PM8/24/16
to Haskell Cafe

> Il giorno 24 ago 2016, alle ore 18:13, Joel H <joel.h...@gmail.com> ha scritto:
>
> Hi,
>
> I've used this one: https://github.com/jhedev/todobackend-haskell/blob/master/circle.yml And it worked great so far.
>
> Maybe this helps.
>

Thanks!

It fails on the update-alternatives command.

'update-alternatives: error: alternative path /usr/bin/gcc-4.6 doesn't exist’

What should they do?

> Regards,
> Joel

Joel Hermanns

unread,
Aug 25, 2016, 5:17:17 AM8/25/16
to Nicola Gigante, Haskell Cafe
I had some weird linker issues (see https://circleci.com/gh/jhedev/todobackend-haskell/48) when using an older gcc 4.9. So switching to gcc-4.6 helped. 

I think you are using the newer ubuntu 14.04 build image which does not include gcc-4.6. Maybe you can try removing the update alternatives commands.

For your problem I guess its more important to set `-j 1` for the `stack build` command. To avoid getting no output etc.

Regards,
Joel
Reply all
Reply to author
Forward
0 new messages