-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
82 lines (58 loc) · 1.94 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
PYTHON := python3
SEEDS := 3
ifeq ($(OS),Windows_NT) # is Windows_NT on XP, 2000, 7, Vista, 10...
detected_OS := Windows
else
detected_OS := $(shell uname) # same as "uname -s"
endif
all: build install test docs
build:
${PYTHON} -m pip install maturin --upgrade
${PYTHON} -m pip install sphinx-rtd-theme
if [ $(detected_OS) = Darwin ]; then\
rustup target add aarch64-apple-darwin;\
rustup target add x86_64-apple-darwin;\
${PYTHON} -m maturin build --release -i ${PYTHON} --target universal2-apple-darwin;\
else\
${PYTHON} -m maturin build --release -i ${PYTHON};\
fi
install:
${PYTHON} -m pip install .
install-x86-64:
ARCHFLAGS="-arch x86_64" pip install . --compile --no-cache-dir
test:
cd tests && ${PYTHON} test.py
docs: kwargs
cd docs && make html
clean:
cargo clean
rm -f experiments/plots/*
cd experiments && make clean
kwargs:
cd scripts && ${PYTHON} gen_kwargs_listing.py > ../docs/source/generated_kwargs_table.rst
publish-test:
make all
${PYTHON} -m maturin publish --repository testpypi
${PYTHON} -m pip uninstall stitch_core
${PYTHON} -m pip install -i https://test.pypi.org/simple/ stitch-core
claim-1:
cp Cargo.toml experiments/plots/claim1-Cargo.toml
cd experiments && make claim-1
claim-2:
cp Cargo.toml experiments/plots/claim2-Cargo.toml
cd experiments && make claim-2 SEEDS=${SEEDS}
claim-2-minimal:
cp Cargo.toml experiments/plots/claim2-Cargo.toml
cd experiments && make claim-2-minimal SEEDS=${SEEDS}
claim-2-tiny:
cp Cargo.toml experiments/plots/claim2-Cargo.toml
cd experiments && make claim-2-tiny SEEDS=${SEEDS}
benchmark: all clean claim-1 claim-2
benchmark-minimal: all clean claim-1 claim-2-minimal
benchmark-tiny: all clean claim-1 claim-2-tiny
plots-old:
rm -rf experiments/plots_old
cp -r experiments/plots experiments/plots_old
eta-long:
cd experiments && make eta-long
.PHONY: all build build_osx install test docs clean claim-1 claim-2 benchmark plots-old eta-long