forked from tezos-checker/checker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (49 loc) · 1.72 KB
/
Makefile
File metadata and controls
68 lines (49 loc) · 1.72 KB
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
all: build test
build: build-ocaml build-ligo
src/checkerEntrypoints.ml: src/checker.mli scripts/generate-entrypoints.rb
ruby scripts/generate-entrypoints.rb src/checker.mli > $@
ocp-indent -i $@
ocaml-src: src/checkerEntrypoints.ml
build-ocaml: ocaml-src
dune build @install
generate-ligo: ocaml-src
mkdir -p generated/ligo
sh ./scripts/generate-ligo.sh
build-ligo: generate-ligo
ruby ./scripts/compile-ligo.rb
test: ocaml-src
sh ./scripts/ensure-unique-errors.sh
dune runtest .
fast-test: ocaml-src
sh ./scripts/ensure-unique-errors.sh
dune build @run-fast-tests
build-test-coverage: ocaml-src
dune runtest --instrument-with bisect_ppx --force .
test-coverage: build-test-coverage
bisect-ppx-report html
bisect-ppx-report summary
test-coverage.json: build-test-coverage
bisect-ppx-report summary --per-file \
| awk '{ match($$0, "^ *([0-9.]+) *% *[^ ]* *(.*)$$", res); print res[1] "|" res[2] }' \
| jq -R "split(\"|\") | { \
\"value\": .[0] | tonumber, \
\"key\": (.[1] | if . == \"Project coverage\" then \"TOTAL\" else ltrimstr(\"src/\") end) \
}" \
| jq --sort-keys -s 'from_entries' \
| tee test-coverage.json
clean:
$(RM) -r _build _coverage generated src/checkerEntrypoints.ml docs/spec/_build test-coverage.json
indent:
bash ./scripts/format.sh
spec:
make -C docs/spec html
watch-spec:
while sleep 0.1; do ls docs/spec/* | entr -d make spec; done
view-spec:
test -d docs/spec/_build/html || make spec
live-server docs/spec/_build/html
docs: ocaml-src spec
cd src && dune build @doc
@echo "Docs generated in _build/default/_doc/_html"
distclean: clean
.PHONY: all build ocaml-src build-ocaml generate-ligo build-ligo tests clean indent spec docs distclean watch-spec view-spec