on 1.4.5.0 help sign in
29 lines 950 B history raw
1#!/bin/sh
3set -ex
5case $BUILD in
6 stack)
7 stack build --test --haddock --no-terminal
8 ;;
9 cabal)
10 if [ -f configure.ac ]; then autoreconf -i; fi
11 cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
12 cabal build # this builds all libraries and executables (including tests/benchmarks)
13 cabal test
14 cabal sdist # tests that a source-distribution can be generated
16 # Check that the resulting source distribution can be built & installed.
17 # If there are no other `.tar.gz` files in `dist`, this can be even simpler:
18 # `cabal install --force-reinstalls dist/*-*.tar.gz`
19 SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
20 (cd dist && cabal install --force-reinstalls "$SRC_TGZ")
21 ;;
22 cabal2)
23 cabal v2-build --enable-tests --enable-benchmarks
24 cabal v2-test --enable-tests --enable-benchmarks
25 ;;
26 hlint)
27 make lint
28 ;;
29esac