-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
37 lines (24 loc) · 1.2 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
SHELL = /bin/bash
.DEFAULT_GOAL = help
.PHONY: lint format
scripts_init:
julia --project=scripts/ -e 'using Pkg; Pkg.instantiate(); Pkg.update(); Pkg.precompile();'
lint: scripts_init ## Code formating check
julia --project=scripts/ scripts/format.jl
format: scripts_init ## Code formating run
julia --project=scripts/ scripts/format.jl --overwrite
.PHONY: benchmark
benchmark_init:
julia --project=benchmark/ -e 'using Pkg; Pkg.instantiate();'
benchmark: benchmark_init ## Runs simple benchmark
julia --project=benchmark/ --startup-file=no scripts/benchmark.jl
.PHONY: docs
doc_init:
julia --project=docs -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate();'
docs: doc_init ## Generate documentation
julia --project=docs/ docs/make.jl
.PHONY: test
test: ## Run tests (use test_args="folder1:test1 folder2:test2" argument to run reduced testset)
julia -e 'import Pkg; Pkg.activate("."); Pkg.test(test_args = split("$(test_args)") .|> string)'
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-24s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)