Skip to content

Commit 66fde58

Browse files
authored
feat: build abi3 wheels (#94)
* chore: build and publish abi3 wheels * chore: bump requires python to 3.11 * fix: dependabot yaml format * ci: test against a python matrix * fix: dependency-groups * fix: use duckdb crate * ci: split wasm section * fix: build wasm test name
1 parent ef69a66 commit 66fde58

File tree

7 files changed

+169
-408
lines changed

7 files changed

+169
-408
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
version: 2
2+
updates:
23
- package-ecosystem: "github-actions"
34
directory: "/"
45
schedule:
@@ -18,4 +19,4 @@ version: 2
1819
- package-ecosystem: "cargo"
1920
directory: "/cli"
2021
schedule:
21-
interval: "weekly"
22+
interval: "weekly"

.github/workflows/ci.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,30 @@ jobs:
1414
test:
1515
name: Test
1616
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
python-version: ["3.11", "3.12", "3.13", "3.14"]
1720
steps:
1821
- uses: actions/checkout@v3
19-
- name: Install Rust
20-
uses: dtolnay/rust-toolchain@stable
21-
with:
22-
components: rustfmt, clippy
23-
- name: Install wasm-pack
24-
uses: jetli/wasm-pack-action@v0.4.0
25-
with:
26-
version: "latest"
2722
- uses: Swatinem/rust-cache@v2
2823
- uses: astral-sh/setup-uv@v3
24+
with:
25+
python-version: ${{ matrix.python-version }}
2926
- name: Lint
3027
run: scripts/lint
3128
- name: Test
3229
run: scripts/test
3330
- name: CLI smoke test
3431
run: uv run cql2 < examples/text/example01.txt
32+
build-wasm:
33+
name: Build wasm
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v3
37+
- uses: Swatinem/rust-cache@v2
38+
- name: Install wasm-pack
39+
uses: jetli/wasm-pack-action@v0.4.0
40+
with:
41+
version: "latest"
3542
- name: Build WASM
3643
run: scripts/buildwasm

.github/workflows/python.yml

Lines changed: 33 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -15,99 +15,87 @@ permissions:
1515

1616
jobs:
1717
linux:
18-
runs-on: ${{ matrix.platform.runner }}
18+
runs-on: ubuntu-latest
1919
strategy:
2020
matrix:
21-
platform:
22-
- runner: ubuntu-latest
23-
target: x86_64
24-
- runner: ubuntu-latest
25-
target: x86
26-
- runner: ubuntu-latest
27-
target: aarch64
28-
- runner: ubuntu-latest
29-
target: armv7
30-
- runner: ubuntu-latest
31-
target: s390x
32-
- runner: ubuntu-latest
33-
target: ppc64le
21+
target:
22+
- x86_64
23+
- x86
24+
- aarch64
25+
- armv7
26+
- s390x
27+
- ppc64le
3428
steps:
3529
- uses: actions/checkout@v4
3630
- uses: actions/setup-python@v5
3731
with:
38-
python-version: 3.x
32+
python-version: 3.11
3933
- name: Build wheels
4034
uses: PyO3/maturin-action@v1
4135
env:
4236
# https://github.com/rust-lang/stacker/issues/79#issuecomment-1497479267
4337
CFLAGS_s390x_unknown_linux_gnu: -march=z10
4438
with:
45-
target: ${{ matrix.platform.target }}
46-
args: --release --out dist --find-interpreter
39+
target: ${{ matrix.target }}
40+
args: --release --out dist -i 3.11 -F pyo3/abi3-py311
4741
sccache: "true"
4842
manylinux: auto
4943
- name: Upload wheels
5044
uses: actions/upload-artifact@v4
5145
with:
52-
name: wheels-linux-${{ matrix.platform.target }}
46+
name: wheels-linux-${{ matrix.target }}
5347
path: dist
5448

5549
musllinux:
56-
runs-on: ${{ matrix.platform.runner }}
50+
runs-on: ubuntu-latest
5751
strategy:
5852
matrix:
59-
platform:
60-
- runner: ubuntu-latest
61-
target: x86_64
62-
- runner: ubuntu-latest
63-
target: x86
64-
- runner: ubuntu-latest
65-
target: aarch64
66-
- runner: ubuntu-latest
67-
target: armv7
53+
target:
54+
- x86_64
55+
- x86
56+
- aarch64
57+
- armv7
6858
steps:
6959
- uses: actions/checkout@v4
7060
- uses: actions/setup-python@v5
7161
with:
72-
python-version: 3.x
62+
python-version: 3.11
7363
- name: Build wheels
7464
uses: PyO3/maturin-action@v1
7565
with:
76-
target: ${{ matrix.platform.target }}
77-
args: --release --out dist --find-interpreter
66+
target: ${{ matrix.target }}
67+
args: --release --out dist -i 3.11 -F pyo3/abi3-py311
7868
sccache: "true"
7969
manylinux: musllinux_1_2
8070
- name: Upload wheels
8171
uses: actions/upload-artifact@v4
8272
with:
83-
name: wheels-musllinux-${{ matrix.platform.target }}
73+
name: wheels-musllinux-${{ matrix.target }}
8474
path: dist
8575

8676
windows:
87-
runs-on: ${{ matrix.platform.runner }}
77+
runs-on: windows-latest
8878
strategy:
8979
matrix:
90-
platform:
91-
- runner: windows-latest
92-
target: x64
93-
- runner: windows-latest
94-
target: x86
80+
target:
81+
- x64
82+
- x86
9583
steps:
9684
- uses: actions/checkout@v4
9785
- uses: actions/setup-python@v5
9886
with:
99-
python-version: 3.x
100-
architecture: ${{ matrix.platform.target }}
87+
python-version: 3.11
88+
architecture: ${{ matrix.target }}
10189
- name: Build wheels
10290
uses: PyO3/maturin-action@v1
10391
with:
104-
target: ${{ matrix.platform.target }}
105-
args: --release --out dist --find-interpreter
92+
target: ${{ matrix.target }}
93+
args: --release --out dist -i 3.11 -F pyo3/abi3-py311
10694
sccache: "true"
10795
- name: Upload wheels
10896
uses: actions/upload-artifact@v4
10997
with:
110-
name: wheels-windows-${{ matrix.platform.target }}
98+
name: wheels-windows-${{ matrix.target }}
11199
path: dist
112100

113101
macos:
@@ -123,12 +111,12 @@ jobs:
123111
- uses: actions/checkout@v4
124112
- uses: actions/setup-python@v5
125113
with:
126-
python-version: 3.x
114+
python-version: 3.11
127115
- name: Build wheels
128116
uses: PyO3/maturin-action@v1
129117
with:
130118
target: ${{ matrix.platform.target }}
131-
args: --release --out dist --find-interpreter
119+
args: --release --out dist -i 3.11 -F pyo3/abi3-py311
132120
sccache: "true"
133121
- name: Upload wheels
134122
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)