Created: Wed Aug 22 20:02:00 CEST 2018
Last modiﬁed: Tue Jan 29 05:52:39 CET 2019
Develop locally, test remotely, git commit locally. This is my Haskell workﬂow on FreeBSD.
Before installing the Haskell suite, you will need a swapﬁle. Especially if the virtual machine has something like 1gb of RAM.
You need one because of a current issue with the Hackage cache consuming several gigabytes in memory when updated.
Installing Stack and bootstrapping a new project
Connect to your server.
curl "https://get.haskellstack.org" | sh stack new my-project haskeleton
You project is now located at
Retrieve it from your server with rsync.
rsync -a user@server:my-project ./
Automating remote tests
Copy-paste the following in my-project/run-test.sh.
#!/usr/bin/env sh set -e DIRNAME=$(basename $(pwd)) rsync -a ../$DIRNAME user@server:~/ ssh user@server \ "cd $DIRNAME && stack test"
cd ~/my-project && sh run-test.sh # my-project # is trivially true: OK # # All 1 tests passed (0.01s)