1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-27 10:10:50 +03:00
guide/b

30 lines
864 B
Plaintext
Raw Normal View History

2017-01-31 00:46:02 +03:00
#!/usr/bin/env bash
set -e
args=''
test=false
2017-06-29 21:17:36 +03:00
with_nix=false
2017-01-31 00:46:02 +03:00
for var in "$@"
do
if [[ $var == "-t" ]]; then
test=true
2017-06-29 21:17:36 +03:00
elif [[ $var == "--nix" ]]; then
with_nix=true
2017-01-31 00:46:02 +03:00
else
args="$args $var"
fi
done
2017-06-29 21:17:36 +03:00
if [[ $no_nix == true ]]; then
args="$args --nix"
fi
2017-01-31 03:58:36 +03:00
stack build $args --ghc-options="+RTS -A256m -n2m -RTS" --test --no-run-tests --no-haddock-deps --bench --no-run-benchmarks --jobs=4 --dependencies-only
2017-01-31 00:46:02 +03:00
2017-02-05 13:55:11 +03:00
stack build $args --fast --ghc-options="+RTS -A256m -n2m -RTS" --test --no-run-tests --no-haddock-deps --bench --no-run-benchmarks --jobs=4 2>&1 | perl -pe '$|++; s/(.*) Compiling\s([^\s]+)\s+\(\s+([^\/]+).*/\1 \2/p' | grep -E --color "(^.*warning.*$|^.*error.*$|^ .*$)|"
2017-01-31 00:46:02 +03:00
if [[ $test == true ]]; then
2017-02-05 13:55:11 +03:00
stack build $args --fast --ghc-options="+RTS -A256m -n2m -RTS" --test --no-haddock-deps --bench --no-run-benchmarks --jobs=4
2017-01-31 00:46:02 +03:00
fi