Last active
June 29, 2017 09:53
-
-
Save dbp/bef96402ea07001dfed2 to your computer and use it in GitHub Desktop.
Haskell project with Stack on CircleCI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
hmm I was having a bit of an issue with this where Circle doesn't pick up the stack-installed GHC in the stack build
command (stack setup
sets up GHC 7.10.3, but stack build
complains about GHC 7.10.2)
http://qiita.com/fujimura/items/b619e0a4ca2028b0eb03 <-- this circle.yml
file got me into a working state (installing stack from apt-get insead of a potentially older version of stack)
I think is better to use this way:
dependencies:
cache_directories:
- "~/.stack"
pre:
- wget https://github.com/commercialhaskell/stack/releases/download/v1.2.0/stack-1.2.0-linux-x86_64.tar.gz -O /tmp/stack.tar.gz
- mkdir /tmp/stack/
- tar -xvzf /tmp/stack.tar.gz -C /tmp/stack/
- sudo mv /tmp/stack/stack-1.2.0-linux-x86_64/stack /usr/bin/stack
override:
- stack setup --no-terminal
- stack build --no-system-ghc --only-configure --no-terminal
compile:
override:
- stack build --no-terminal
test:
override:
- stack test --no-terminal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This tends to die with projects with large dependencies. I used these commands to limit the memory usage: