-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
33 lines (28 loc) · 1.66 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
.PHONY: cross-perf, gha-dev
BRANCH_NAME := $(shell git rev-parse --abbrev-ref HEAD)
REPO := jpmorganchase/fusion
WORKFLOW_FILE := dev.yml
PYTHON_VERSIONS := 3.9 3.10 3.11 3.12
LD_LIBRARY_PATHS := $(HOME)/.rye/py/[email protected]/lib:$(HOME)/.rye/py/[email protected]/lib:$(HOME)/.rye/py/[email protected]/lib:$(HOME)/.rye/py/[email protected]/lib:$(HOME)/.rye/py/[email protected]/lib
RUSTFLAGS := -L $(HOME)/.rye/py/[email protected]/lib -L $(HOME)/.rye/py/[email protected]/lib -L $(HOME)/.rye/py/[email protected]/lib -L $(HOME)/.rye/py/[email protected]/lib -L $(HOME)/.rye/py/[email protected]/lib
cross-perf:
@for version in $(PYTHON_VERSIONS); do \
rye pin $$version && \
rye sync && \
LD_LIBRARY_PATH=$(LD_LIBRARY_PATHS):$$LD_LIBRARY_PATH RUSTFLAGS="$(RUSTFLAGS)" maturin develop -r && \
LD_LIBRARY_PATH=$(LD_LIBRARY_PATHS):$$LD_LIBRARY_PATH RUSTFLAGS="$(RUSTFLAGS)" cargo test -r && \
LD_LIBRARY_PATH=$(LD_LIBRARY_PATHS):$$LD_LIBRARY_PATH RUSTFLAGS="$(RUSTFLAGS)" cargo llvm-cov report --html --output-dir .reports/rust && \
rye run pytest --color=yes --benchmark-only --benchmark-autosave || true; \
done
cross-exp-perf:
@for version in $(PYTHON_VERSIONS); do \
rye pin $$version && \
rye sync && \
. .venv/bin/activate && \
LD_LIBRARY_PATH=$(LD_LIBRARY_PATHS):$$LD_LIBRARY_PATH RUSTFLAGS="$(RUSTFLAGS)" maturin develop -r --features experiments && \
rye run pytest --color=yes --benchmark-only --benchmark-autosave --experiments || true; \
done
gha-dev:
gh workflow run $(WORKFLOW_FILE) --ref $(BRANCH_NAME) --repo $(REPO)
gha-dev-cancel:
gh run list --branch $(BRANCH_NAME) --workflow=$(WORKFLOW_FILE) --limit 1 --json databaseId --jq '.[].databaseId' | xargs -I {} gh run cancel {}