-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
86 lines (67 loc) · 2.29 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
.PHONY: test-unit test-integration repl test-unit-ghcid test-integration-ghcid build-watch test-unit-watch test-e2e build-all clean test-compile-ghcid
test-mode=-fbyte-code # or -fobject-code
ghci-options= --no-build --ghc-options $(test-mode)
ghci-disabled-warnings= --ghci-options -Wno-unused-matches \
--ghci-options -Wno-redundant-constraints \
--ghci-options -Wno-unused-binds \
--ghci-options -Wno-partial-type-signatures \
--ghci-options -Wno-unused-imports \
--ghci-options -Wno-unused-foralls
clean:
stack clean
test-all:
stack test --ghc-options "-O0 -j4 +RTS -A128m -n2m -RTS" habits:habits-test-all
test-unit:
stack test --ghc-options "-O0 -j4 +RTS -A128m -n2m -RTS" habits:habits-test-unit
test-e2e:
stack test --ghc-options "-O0 -j4 +RTS -A128m -n2m -RTS" habits:habits-test-e2e
test-integration:
stack test --ghc-options "-O0 -j4 +RTS -A128m -n2m -RTS" habits:habits-test-integration
repl:
stack ghci $(ghci-options) habits:habits-test-all
test-ghcid:
reset && clear
ghcid --restart=habits.cabal --reload=.reload-ghcid --test=:quit \
--command="stack ghci \
$(ghci-options) $(ghci-disabled-warnings) \
habits:habits-test-unit"
reset && clear
test-unit-ghcid:
reset && clear
ghcid --restart=habits.cabal --reload=.reload-ghcid --test=UnitSpec.main \
--command="stack ghci \
$(ghci-options) $(ghci-disabled-warnings) \
habits:habits-test-all"
reset && clear
test-e2e-ghcid:
reset && clear
ghcid --restart=habits.cabal --reload=.reload-ghcid --test=E2ESpec.main \
--command="stack ghci \
$(ghci-options) $(ghci-disabled-warnings) \
habits:habits-test-all"
reset && clear
test-all-ghcid:
reset && clear
ghcid --restart=habits.cabal --reload=.reload-ghcid --test=Main.main \
--command="stack ghci \
$(ghci-options) $(ghci-disabled-warnings) \
habits:habits-test-all"
reset && clear
test-integration-ghcid:
reset && clear
ghcid --restart=habits.cabal --reload=.reload-ghcid --test=IntegrationSpec.main \
--command="stack ghci \
$(ghci-options) $(ghci-disabled-warnings) \
habits:habits-test-all"
reset && clear
test-compile-ghcid:
reset && clear
ghcid --restart=habits.cabal --reload=.reload-ghcid \
--command="stack ghci \
$(ghci-options) \
habits:habits-test-all"
reset && clear
reload-ghcid:
touch .reload-ghcid
restart-ghcid:
touch habits.cabal