-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (60 loc) · 1.8 KB
/
Copy pathpython.yml
File metadata and controls
64 lines (60 loc) · 1.8 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
name: Python
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
quality:
name: Python quality (macos-14)
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: bindings/python/pyproject.toml
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.93.0
- uses: Swatinem/rust-cache@v2
- run: python -m pip install --upgrade pip
- run: python -m pip install --editable './bindings/python[dev]'
- run: cargo build --locked -p zeppelin-embed-ffi
- name: Ruff
working-directory: bindings/python
run: ruff check .
- name: Strict mypy
working-directory: bindings/python
run: mypy
- name: Pytest core bindings
working-directory: bindings/python
env:
ZEPPELIN_EMBED_LIBRARY: ${{ github.workspace }}/target/debug/libzeppelin_embed_ffi.dylib
run: pytest tests --ignore=tests/test_text_api.py
wheels:
name: Wheel (macOS arm64)
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.93.0
- uses: Swatinem/rust-cache@v2
- uses: pypa/cibuildwheel@v4.1.1
with:
package-dir: bindings/python
output-dir: wheelhouse
- name: Verify wheel in a fresh environment
run: python bindings/python/tests/verify_wheel.py wheelhouse/*.whl
- uses: actions/upload-artifact@v4
with:
name: zeppelin-embed-macos-arm64
path: wheelhouse/*.whl