-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (31 loc) · 1.5 KB
/
Copy pathMakefile
File metadata and controls
42 lines (31 loc) · 1.5 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
JULIA:=julia
default: help
setup:
${JULIA} -e 'import Pkg; Pkg.add(["Changelog"])'
${JULIA} --project=@runic --startup-file=no -e 'using Pkg; Pkg.add("Runic")'
format:
${JULIA} --project=@runic --startup-file=no -e 'using Runic; exit(Runic.main(ARGS))' -- --inplace .
changelog:
${JULIA} -e 'using Changelog; Changelog.generate(Changelog.CommonMark(), "CHANGELOG.md"; repo = "qutip/QuantumToolbox.jl")'
test:
${JULIA} --project=test -e 'using Pkg; Pkg.update()' && ${JULIA} --project -e 'using Pkg; Pkg.update(); Pkg.test()'
docs:
${JULIA} --project=docs -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
${JULIA} --project=docs docs/make.jl
benchmark:
${JULIA} --project=benchmarks -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
${JULIA} --project=benchmarks --threads=2 benchmarks/runbenchmarks.jl
vitepress:
npm --prefix docs run docs:dev
all: setup format changelog test docs vitepress
help:
@echo "The following make commands are available:"
@echo " - make setup: install the dependencies for make command"
@echo " - make format: format codes with JuliaFormatter"
@echo " - make changelog: generate changelog"
@echo " - make test: run the tests"
@echo " - make docs: instantiate and build the documentation"
@echo " - make benchmark: run the benchmarks"
@echo " - make vitepress: start Vitepress site of documentation"
@echo " - make all: run every commands in the above order"
.PHONY: default setup format changelog test docs benchmark vitepress all help