-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile
47 lines (37 loc) · 1.58 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
.PHONY: dev test devtest coverage docs codestyle fmt wheel help
help:
@echo "Commands for SCALib development:"
@echo " dev: Build in debug mode and run tests."
@echo " The associated virtualenv in as .tox/dev, and the SCALib install"
@echo " is editable: changes in the python source code are automatically used."
@echo " (You'll still need to re-run if you update rust code.)"
@echo " test: Build in release mode and run tests, also checks formatting."
@echo " coverage: Like test, but also generates detailed coverage report."
@echo " docs: Generate docs."
@echo " codestyle: Check fromatting."
@echo " fmt: Format code."
@echo " wheel_local: Build a wheel for the local machine."
@echo " wheel_portable: Build a wheel for with maximal portability (at the expense of efficiency)."
@echo " wheel_avx2: Build a wheel with AVX2 instruction (should work on any recent x86-64)."
dev:
tox run -e dev
test:
tox run -e fmt -- --check
RUST_BACKTRACE=1 CARGO_TARGET_DIR=.cargo_build cargo test --workspace --manifest-path src/scalib_ext/Cargo.toml
tox run -e test
coverage:
tox run -e test
tox run -e coverage
@echo "Open htmlcov/index.html to see detailled coverage information."
docs:
tox run -e docs
codestyle:
tox run -e fmt -- --check
fmt:
tox run -e fmt
wheel_avx2:
SCALIB_AVX2=1 CARGO_TARGET_DIR=.cargo_build_avx2 python3 -m build -w -o dist/avx2
wheel_local:
CARGO_TARGET_DIR=.cargo_build python3 -m build -w -o dist/local
wheel_portable:
SCALIB_PORTABLE=1 CARGO_TARGET_DIR=.cargo_build_portable python3 -m build -w -o dist/portable