-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (43 loc) · 1.44 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
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
.PHONY: ghci
ghci:
stack ghci wow-stream:lib
.PHONY: test-unit-ghcid
test-unit-ghcid:
reset && clear
ghcid --warnings --restart=wow-stream.cabal --reload=.reload-ghcid --test=UnitSpec.main \
--command="stack ghci \
$(ghci-options) $(ghci-disabled-warnings) \
wow-stream:wow-stream-test-all"
reset && clear
.PHONY: test-e2e-ghcid
test-e2e-ghcid:
reset && clear
ghcid --warnings --restart=wow-stream.cabal --reload=.reload-ghcid --test=E2ESpec.main \
--command="stack ghci \
$(ghci-options) $(ghci-disabled-warnings) \
wow-stream:wow-stream-test-all"
reset && clear
.PHONY: test-compile-ghcid
test-compile-ghcid:
reset && clear
ghcid --restart=wow-stream.cabal --reload=.reload-ghcid \
--command="stack ghci \
$(ghci-options) \
wow-stream:wow-stream-test-all"
reset && clear
.PHONY: test-unit
test-unit:
stack test --ghc-options "-O0 -j4 +RTS -A128m -n2m -RTS" wow-stream:wow-stream-test-unit
.PHONY: test-e2e
test-e2e:
stack test --ghc-options "-O0 -j4 +RTS -A128m -n2m -RTS" wow-stream:wow-stream-test-e2e
build-run-docker:
docker run --rm -it $(docker build -q --no-cache .)