Skip to content

Commit dc04a44

Browse files
committed
Speed up CI by merging Python backend crates into root workspace
The three Python SDK backend crates were separate Cargo workspaces with duplicate [patch] sections and isolated target/ directories, causing the full dependency tree (~500 crates) to be compiled three times. Moving them into the root workspace means the second and third builds are essentially free. This required several related fixes: - Rename native lib targets from '_native' to '_native_wasm' and '_native_js' to avoid artifact collisions in the shared target/ dir. Both crates produced lib_native.so; the last one built would overwrite the other. - Restructure python-build to use 'uv sync' with --no-install-package for the backend crates (installed separately via maturin develop) and 'uv run --no-sync' for maturin to prevent PEP 517 editable rebuilds that fail due to missing release-profile runtime binaries. - Add 'just jssandbox build' before Python SDK steps in CI so hyperlight-js-runtime is compiled in the shared target/ directory. - Clean stale cargo fingerprints before release-profile maturin builds to force the build scripts to re-run and produce the runtime binaries. - Update examples/Justfile integration dep syncs to skip building backend crates (already installed by maturin develop). Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
1 parent 89fce8b commit dc04a44

14 files changed

Lines changed: 385 additions & 290 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,32 +89,38 @@ jobs:
8989
run: just wasm examples
9090

9191
# Python SDK checks go here so we don't rebuild everything from scratch on another job
92-
- name: Format check
92+
# Build JS sandbox first — the Python hyperlight-js backend shares the root
93+
# workspace target/ and needs hyperlight-js-runtime to be compiled.
94+
- name: Build JS sandbox
95+
run: just jssandbox build
96+
97+
- name: Python SDK Format check
9398
run: just python fmt-check
9499

95-
- name: Lint
100+
- name: Python SDK Lint
96101
run: just python lint
97102

98-
- name: Build
103+
- name: Python SDK Build
99104
run: just python build
100105

101-
- name: Run examples
106+
- name: Python SDK examples
102107
run: just python examples
103108

104-
- name: Tests
109+
- name: Python SDK Tests
105110
run: just python python-test
106111

107-
- name: Fuzz
108-
run: just fuzz 90
109-
110-
- name: Benchmark
111-
run: just benchmark
112+
- name: Python SDK Fuzz
113+
run: just fuzz 30
112114

113-
- name: Run integration examples
115+
- name: Run Python SDK integration examples
114116
env:
115117
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_TOKEN }}
116118
run: just integration-examples
117119

120+
# run last becuase it runs in build mode and messes with maturin
121+
- name: Python SDK Benchmark
122+
run: just benchmark
123+
118124
javascript-sandbox:
119125
name: JS Sandbox · lint / build / examples
120126
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)