aboutsummaryrefslogtreecommitdiff
path: root/semaphoreci.sh
diff options
context:
space:
mode:
Diffstat (limited to 'semaphoreci.sh')
-rwxr-xr-xsemaphoreci.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/semaphoreci.sh b/semaphoreci.sh
new file mode 100755
index 0000000..f77ac75
--- /dev/null
+++ b/semaphoreci.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+STACK=$SEMAPHORE_CACHE_DIR/stack
+
+setup() {
+ if [ ! -e "$STACK" ]
+ then
+ curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C $SEMAPHORE_CACHE_DIR '*/stack'
+ fi
+ $STACK --no-terminal setup
+}
+
+setup_test() {
+ $STACK --no-terminal test --only-snapshot
+}
+
+test() {
+ $STACK --no-terminal test --pedantic
+}
+
+test_docs() {
+ $STACK --no-terminal ghc -- -Wall -fno-code docs/tutorial/tutorial.lhs
+}
+
+setup_lint() {
+ $STACK --no-terminal install hlint
+}
+
+lint() {
+ $STACK --no-terminal exec hlint -- src tests
+}
+
+$1