-
Notifications
You must be signed in to change notification settings - Fork 660
Expand file tree
/
Copy pathMakefile
More file actions
149 lines (114 loc) · 3.85 KB
/
Makefile
File metadata and controls
149 lines (114 loc) · 3.85 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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# Makefile - Shim that delegates to mise tasks
#
# This Makefile provides backward compatibility for common targets.
# All task definitions live in mise.toml. Run `mise tasks` to see available tasks.
#
# For new development, prefer using mise directly:
# mise run build:cog instead of make cog
# mise run test:go instead of make test-go
# mise run fmt:fix instead of make fmt
SHELL := bash
# Show deprecation warning (set MAKE_NO_WARN=1 to suppress)
ifndef MAKE_NO_WARN
$(info )
$(info ┌────────────────────────────────────────────────────────────────────┐)
$(info │ NOTE: This Makefile is a compatibility shim. Prefer using mise: │)
$(info │ │)
$(info │ mise run build:cog mise run test:go mise run fmt:fix │)
$(info │ │)
$(info │ Run 'mise tasks' to see all available tasks. │)
$(info │ Set MAKE_NO_WARN=1 to suppress this message. │)
$(info └────────────────────────────────────────────────────────────────────┘)
$(info )
endif
PREFIX ?= /usr/local
GO ?= go
COG_BINARIES := cog base-image
default: cog
# =============================================================================
# Build targets
# =============================================================================
.PHONY: cog base-image
$(COG_BINARIES):
mise run build:cog
.PHONY: wheel
wheel:
mise run build:sdk
.PHONY: install
install: cog
PREFIX=$(PREFIX) mise run install
# =============================================================================
# Test targets
# =============================================================================
.PHONY: test
test:
mise run test:go
mise run test:python
.PHONY: test-go
test-go:
mise run test:go
.PHONY: test-python
test-python:
mise run test:python
.PHONY: test-integration
test-integration:
mise run test:integration
.PHONY: test-coglet
test-coglet: test-coglet-rust
.PHONY: test-coglet-rust
test-coglet-rust:
mise run test:rust
.PHONY: test-coglet-python
test-coglet-python:
mise run test:coglet:python
# =============================================================================
# Format and lint targets
# =============================================================================
.PHONY: fmt
fmt:
mise run fmt:fix
.PHONY: check-fmt
check-fmt:
mise run fmt
.PHONY: lint
lint:
mise run lint
.PHONY: vet
vet:
$(GO) vet ./...
# =============================================================================
# Code generation
# =============================================================================
.PHONY: generate
generate:
mise run generate
.PHONY: gen-mocks
gen-mocks:
mockery
# =============================================================================
# Coglet (Rust) targets
# =============================================================================
.PHONY: fmt-coglet
fmt-coglet:
mise run fmt:rust:fix
.PHONY: check-fmt-coglet
check-fmt-coglet:
mise run fmt:rust
.PHONY: lint-coglet
lint-coglet:
mise run lint:rust
# =============================================================================
# Documentation
# =============================================================================
.PHONY: run-docs-server
run-docs-server:
mise run docs:serve
# =============================================================================
# Clean
# =============================================================================
.PHONY: clean
clean:
mise run clean
.PHONY: clean-coglet
clean-coglet:
mise run clean:rust