Skip to content

Commit 56c8be6

Browse files
authored
Split python to see if can speed up ci a bit (#24)
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
1 parent cc3c5cb commit 56c8be6

1 file changed

Lines changed: 56 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 56 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,39 +99,83 @@ jobs:
9999
- name: Run examples
100100
run: just wasm examples
101101

102-
# Python SDK checks go here so we don't rebuild everything from scratch on another job
103-
# Build JS sandbox first — the Python hyperlight-js backend shares the root
104-
# workspace target/ and needs hyperlight-js-runtime to be compiled.
102+
python-sdk:
103+
name: Python SDK (${{ matrix.os }})
104+
runs-on: ${{ matrix.os }}
105+
strategy:
106+
matrix:
107+
os: [ubuntu-latest, windows-latest]
108+
steps:
109+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
110+
111+
- uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4
112+
with:
113+
components: clippy
114+
rustflags: ""
115+
116+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
117+
118+
- name: Install Python
119+
run: uv python install 3.12
120+
121+
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
122+
with:
123+
node-version: "latest"
124+
cache: npm
125+
cache-dependency-path: src/wasm_sandbox/guests/javascript/package-lock.json
126+
127+
- name: Install just
128+
run: cargo install --locked just
129+
130+
- name: Install clang (Linux)
131+
if: runner.os == 'Linux'
132+
run: sudo apt-get update && sudo apt-get install -y clang
133+
134+
- name: Install LLVM (Windows)
135+
if: runner.os == 'Windows'
136+
run: choco install llvm -y
137+
138+
- name: Enable KVM
139+
if: runner.os == 'Linux' && !env.ACT
140+
run: |
141+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
142+
sudo udevadm control --reload-rules
143+
sudo udevadm trigger --name-match=kvm
144+
sudo chmod 666 /dev/kvm
145+
146+
- name: Build WASM sandbox
147+
run: just wasm build
148+
105149
- name: Build JS sandbox
106150
run: just js build
107151

108-
- name: Python SDK Format check
152+
- name: Format check
109153
run: just python fmt-check
110154

111-
- name: Python SDK Lint
155+
- name: Lint
112156
run: just python lint
113157

114-
- name: Python SDK Build
158+
- name: Build
115159
run: just python build
116160

117-
- name: Python SDK examples
161+
- name: Examples
118162
run: just python examples
119163

120-
- name: Python SDK Tests
164+
- name: Tests
121165
run: just python python-test
122166

123-
- name: Python SDK Fuzz
167+
- name: Fuzz
124168
run: just fuzz 30
125169

126170
# this is too flaky in github actions to run on PRs
127171
# copilot fails to repsond in a timely fashion
128-
# - name: Run Python SDK integration examples
172+
# - name: Integration examples
129173
# env:
130174
# COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_TOKEN }}
131175
# run: just integration-examples
132176

133-
# run last becuase it runs in build mode and messes with maturin
134-
- name: Python SDK Benchmark
177+
# run last because it runs in build mode and messes with maturin
178+
- name: Benchmark
135179
run: just benchmark
136180

137181
# Build all Python packages on Linux (pure + backend wheels).

0 commit comments

Comments
 (0)