-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.45 KB
/
bindings-python.yml
File metadata and controls
59 lines (50 loc) · 1.45 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
# Python Bindings CI
# Runs on pushes/PRs to main/master when Python bindings or core crates change
name: Python Bindings
on:
push:
branches: [main, master]
paths:
- "bindings/python/**"
- "crates/**"
- "Cargo.toml"
- "Cargo.lock"
pull_request:
branches: [main, master]
paths:
- "bindings/python/**"
- "crates/**"
- "Cargo.toml"
- "Cargo.lock"
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
python-bindings:
name: Python Bindings
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: stable
- name: Cache Cargo registry
uses: Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2
with:
key: python-bindings
- name: Build and install Python wheel
run: |
cd bindings/python
python -m pip install --upgrade pip maturin pytest
maturin build --release --interpreter python3
python -m pip install --force-reinstall target/wheels/rtfkit-*.whl
- name: Run Python tests
run: |
cd bindings/python
pytest