-
Notifications
You must be signed in to change notification settings - Fork 22
/
Makefile
58 lines (41 loc) · 1.1 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
MAKEFLAGS += --jobs
MAKEFLAGS += --no-builtin-rules
MAKEFLAGS += --warn-undefined-variables
SHELL := bash
.DELETE_ON_ERROR:
.ONESHELL:
.SHELLFLAGS := --norc --noprofile -Eeuo pipefail -O dotglob -O nullglob -O failglob -O globstar -c
.DEFAULT_GOAL := dev
.PHONY: clean clobber lint mypy clippy deps build release ci test
OS ?=
ifeq ($(OS),Windows_NT)
VENV := Scripts
else
VENV := bin
endif
clean:
shopt -u failglob
rm -v -rf -- artifacts/*.{zip,deb} .mypy_cache/ target/ temp/
clobber: clean
rm -v -rf -- .venv/
.venv/$(VENV)/pip:
python3 -m venv -- .venv
.venv/$(VENV)/mypy: .venv/$(VENV)/pip
'$<' install --upgrade --requirement requirements.txt -- mypy types-PyYAML types-toml types-Jinja2
mypy: .venv/$(VENV)/mypy
'$<' -- .
dev:
cargo build
clippy:
cargo clippy --all-targets --all-features
lint: mypy clippy
deps: .venv/$(VENV)/mypy
.venv/$(VENV)/python3 ./build.py deps
build: lint test
.venv/$(VENV)/python3 ./build.py build
release: .venv/$(VENV)/mypy
.venv/$(VENV)/python3 ./build.py buildr -- "$$TRIPLE"
ci: .venv/$(VENV)/mypy
.venv/$(VENV)/python3 ./ci/release.py
test:
cargo test --locked