-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (55 loc) · 1.68 KB
/
Makefile
File metadata and controls
63 lines (55 loc) · 1.68 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
.PHONY: ffi/python/header
ffi/python/header:
cd rust && cbindgen --config cbindgen.toml --output include/pyroscope_ffi.h
.PHONY: ffi/python/cffi
ffi/python/cffi:
python scripts/tests/compile_ffi.py
.PHONY: linux/amd64
linux/amd64:
docker buildx build \
--build-arg=PLATFORM=x86_64 \
--platform=linux/amd64 \
--output=. \
-f docker/wheel.Dockerfile \
.
.PHONY: linux/arm64
linux/arm64:
docker buildx build \
--build-arg=PLATFORM=aarch64 \
--platform=linux/arm64 \
--output=. \
-f docker/wheel.Dockerfile \
.
.PHONY: musllinux/amd64
musllinux/amd64:
docker buildx build \
--build-arg=PLATFORM=x86_64 \
--platform=linux/amd64 \
--output=. \
-f docker/wheel-musllinux.Dockerfile \
.
.PHONY: musllinux/arm64
musllinux/arm64:
docker buildx build \
--build-arg=PLATFORM=aarch64 \
--platform=linux/arm64 \
--output=. \
-f docker/wheel-musllinux.Dockerfile \
.
.PHONY: mac/amd64
mac/amd64:
MACOSX_DEPLOYMENT_TARGET=11.0 CARGO_BUILD_TARGET=x86_64-apple-darwin python -m build --wheel
wheel tags --platform-tag macosx_11_0_x86_64 --remove dist/*.whl
.PHONY: mac/arm64
mac/arm64:
MACOSX_DEPLOYMENT_TARGET=11.0 CARGO_BUILD_TARGET=aarch64-apple-darwin python -m build --wheel
wheel tags --platform-tag macosx_11_0_arm64 --remove dist/*.whl
.PHONY: check/tag-version
check/tag-version:
@TAG_VERSION=$${TAG#python-}; \
CARGO_VERSION=$$(cd rust && cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version'); \
if [ "$$TAG_VERSION" != "$$CARGO_VERSION" ]; then \
echo "error: tag version ($$TAG_VERSION) does not match Cargo.toml version ($$CARGO_VERSION)"; \
exit 1; \
fi; \
echo "tag version ($$TAG_VERSION) matches Cargo.toml version ($$CARGO_VERSION)"