Skip to content

Commit 1d20020

Browse files
authored
ci: guess-and-check wheel build fixes (#26)
1 parent 4d6b54c commit 1d20020

File tree

2 files changed

+27
-22
lines changed

2 files changed

+27
-22
lines changed

.github/workflows/pypi.yaml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: PyPI
22

33
on:
44
push:
5+
branches:
6+
- main
57
tags:
68
- "v*"
79
workflow_dispatch:
@@ -19,22 +21,22 @@ jobs:
1921
strategy:
2022
matrix:
2123
platform:
22-
- runner: ubuntu-latest
24+
- runner: ubuntu-22.04
2325
target: x86_64
2426
manylinux: auto
25-
- runner: ubuntu-latest
27+
- runner: ubuntu-22.04
2628
target: x86
2729
manylinux: auto
28-
- runner: ubuntu-latest
30+
- runner: ubuntu-22.04
2931
target: aarch64
3032
manylinux: "2_28"
31-
- runner: ubuntu-latest
33+
- runner: ubuntu-22.04
3234
target: armv7
3335
manylinux: auto
34-
- runner: ubuntu-latest
36+
- runner: ubuntu-22.04
3537
target: s390x
3638
manylinux: auto
37-
- runner: ubuntu-latest
39+
- runner: ubuntu-22.04
3840
target: ppc64le
3941
manylinux: auto
4042
steps:
@@ -47,7 +49,7 @@ jobs:
4749
with:
4850
target: ${{ matrix.platform.target }}
4951
args: --release --out dist --find-interpreter -F duckdb/bundled
50-
sccache: "true"
52+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
5153
manylinux: ${{ matrix.platform.manylinux }}
5254
- name: Upload wheels
5355
uses: actions/upload-artifact@v4
@@ -60,13 +62,13 @@ jobs:
6062
strategy:
6163
matrix:
6264
platform:
63-
- runner: ubuntu-latest
65+
- runner: ubuntu-22.04
6466
target: x86_64
65-
- runner: ubuntu-latest
67+
- runner: ubuntu-22.04
6668
target: x86
67-
- runner: ubuntu-latest
69+
- runner: ubuntu-22.04
6870
target: aarch64
69-
- runner: ubuntu-latest
71+
- runner: ubuntu-22.04
7072
target: armv7
7173
steps:
7274
- uses: actions/checkout@v4
@@ -78,15 +80,14 @@ jobs:
7880
with:
7981
target: ${{ matrix.platform.target }}
8082
args: --release --out dist --find-interpreter -F duckdb/bundled
81-
sccache: "true"
83+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
8284
manylinux: musllinux_1_2
8385
- name: Upload wheels
8486
uses: actions/upload-artifact@v4
8587
with:
8688
name: wheels-musllinux-${{ matrix.platform.target }}
8789
path: dist
8890

89-
# https://github.com/gadomski/stacrs/issues/1
9091
# windows:
9192
# runs-on: ${{ matrix.platform.runner }}
9293
# strategy:
@@ -106,8 +107,8 @@ jobs:
106107
# uses: PyO3/maturin-action@v1
107108
# with:
108109
# target: ${{ matrix.platform.target }}
109-
# args: --release --out dist --find-interpreter
110-
# sccache: "true"
110+
# args: --release --out dist --find-interpreter -F duckdb/bundled
111+
# sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
111112
# - name: Upload wheels
112113
# uses: actions/upload-artifact@v4
113114
# with:
@@ -133,7 +134,7 @@ jobs:
133134
with:
134135
target: ${{ matrix.platform.target }}
135136
args: --release --out dist --find-interpreter -F duckdb/bundled
136-
sccache: "true"
137+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
137138
- name: Upload wheels
138139
uses: actions/upload-artifact@v4
139140
with:
@@ -159,10 +160,12 @@ jobs:
159160
name: Release
160161
runs-on: ubuntu-latest
161162
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
162-
needs: [linux, musllinux, macos, sdist]
163-
environment:
164-
name: pypi
165-
url: https://pypi.org/p/stacrs
163+
needs:
164+
- linux
165+
- musllinux
166+
# - windows
167+
- macos
168+
- sdist
166169
permissions:
167170
id-token: write
168171
contents: write
@@ -173,7 +176,9 @@ jobs:
173176
uses: actions/attest-build-provenance@v1
174177
with:
175178
subject-path: "wheels-*/*"
176-
- uses: PyO3/maturin-action@v1
179+
- name: Publish to PyPI
180+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
181+
uses: PyO3/maturin-action@v1
177182
with:
178183
command: upload
179184
args: --non-interactive --skip-existing wheels-*/*

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ crate-type = ["cdylib"]
1111
[dependencies]
1212
duckdb = { version = "1.1.1" }
1313
geojson = "0.24.1"
14-
pyo3 = "0.23.4"
14+
pyo3 = { version = "0.23.4", features = ["extension-module"] }
1515
pyo3-async-runtimes = { version = "0.23.0", features = [
1616
"tokio",
1717
"tokio-runtime",

0 commit comments

Comments
 (0)