Skip to content

Commit c787e21

Browse files
committed
build: switch to abi3 build to make build faster and reduce size
1 parent d0f53da commit c787e21

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

.github/workflows/release.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
name: Cargo.toml
4444
- uses: actions/setup-python@v5
4545
with:
46-
python-version: 3.x
46+
python-version: 3.13
4747
- name: Build wheels
4848
uses: PyO3/maturin-action@v1
4949
with:
@@ -58,6 +58,24 @@ jobs:
5858
name: wheels-${{ matrix.platform.os }}-${{ matrix.platform.target }}
5959
path: dist
6060

61+
test-abi3:
62+
runs-on: ubuntu-24.04
63+
needs: build
64+
strategy:
65+
matrix:
66+
py: ["3.11", "3.12", "3.13"]
67+
steps:
68+
- uses: actions/download-artifact@v4
69+
with:
70+
name: wheels-linux-x86_64
71+
- uses: actions/setup-python@v5
72+
with:
73+
python-version: ${{ matrix.py }}
74+
- run: python -V
75+
- run: pip install --no-index --find-links=./ cocoindex
76+
- run: python -c "import cocoindex, sys; print('import ok on', sys.version)"
77+
78+
6179
sdist:
6280
runs-on: ubuntu-latest
6381
needs: [create-versioned-toml]

Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ name = "cocoindex_engine"
1515
crate-type = ["cdylib"]
1616

1717
[dependencies]
18-
pyo3 = { version = "0.25.1", features = ["chrono", "auto-initialize", "uuid"] }
18+
pyo3 = { version = "0.25.1", features = [
19+
"abi3-py311",
20+
"auto-initialize",
21+
"chrono",
22+
"uuid",
23+
] }
1924
pythonize = "0.25.0"
2025
pyo3-async-runtimes = { version = "0.25.0", features = ["tokio-runtime"] }
2126

0 commit comments

Comments
 (0)