ligo/Makefile

57 lines
1.7 KiB
Makefile
Raw Normal View History

2019-09-06 06:02:18 +04:00
.ONESHELL:
all: test
# Use install-deps instead of 'install' because usually 'make install' adds a
# binary to the system path and we don't want to confuse users
install-deps:
# Install ligo/tezos specific system-level dependencies
sudo scripts/install_native_dependencies.sh
scripts/install_build_environment.sh # TODO: or scripts/install_opam.sh ?
build-deps:
2019-09-06 06:02:18 +04:00
export PATH="/usr/local/bin$${PATH:+:}$${PATH:-}"
# Create opam dev switch locally for use with Ligo, add merlin/etc
if [ -n "`opam switch show | grep -P ".+/ligo"`" ];
then :; else scripts/setup_switch.sh;
2019-09-06 06:02:18 +04:00
fi
scripts/setup_repos.sh
2019-09-06 06:02:18 +04:00
eval $$(opam config env)
# Install OCaml build dependencies for Ligo
scripts/install_vendors_deps.sh
build: build-deps
export PATH="/usr/local/bin$${PATH:+:}$${PATH:-}"
eval $$(opam config env)
# Build Ligo for local dev use
scripts/build_ligo_local.sh
test: build
export PATH="/usr/local/bin$${PATH:+:}$${PATH:-}"
eval $$(opam config env)
scripts/test_ligo.sh
2019-12-11 16:10:05 +04:00
2019-12-13 14:18:07 +04:00
clean:
dune clean
2019-12-13 15:25:54 +04:00
rm -fr _coverage_all _coverage_cli _coverage_ligo
2019-12-13 14:18:07 +04:00
coverage: clean
2019-12-11 16:10:05 +04:00
BISECT_ENABLE=yes dune runtest --force
2019-12-13 14:18:07 +04:00
bisect-ppx-report html -o ./_coverage_all --title="LIGO overall test coverage"
bisect-ppx-report summary --per-file
coverage-ligo: clean
BISECT_ENABLE=yes dune runtest src/test --force
bisect-ppx-report html -o ./_coverage_ligo --title="LIGO test coverage"
bisect-ppx-report summary --per-file
2019-12-23 18:18:32 +04:00
coverage-doc: clean
BISECT_ENABLE=yes dune build @doc-test --force
bisect-ppx-report html -o ./_coverage_doc --title="LIGO doc coverage"
bisect-ppx-report summary --per-file
2019-12-13 14:18:07 +04:00
coverage-cli: clean
BISECT_ENABLE=yes dune runtest src/bin/expect_tests
bisect-ppx-report html -o ./_coverage_cli --title="CLI test coverage"
bisect-ppx-report summary --per-file