@@ -14,29 +14,18 @@ concurrency:
1414 cancel-in-progress : false
1515
1616jobs :
17+ # TODO add bundled builds for platforms where we don't have pre-built libraries
1718 linux :
18- runs-on : ${{ matrix.platform.runner }}
19+ runs-on : ubuntu-22.04
1920 strategy :
2021 matrix :
2122 platform :
22- - runner : ubuntu-22.04
23- target : x86_64
23+ - target : x86_64
2424 manylinux : auto
25- - runner : ubuntu-22.04
26- target : x86
27- manylinux : auto
28- - runner : ubuntu-22.04
29- target : aarch64
25+ duckdb-slug : amd64
26+ - target : aarch64
3027 manylinux : " 2_28"
31- - runner : ubuntu-22.04
32- target : armv7
33- manylinux : auto
34- - runner : ubuntu-22.04
35- target : s390x
36- manylinux : auto
37- - runner : ubuntu-22.04
38- target : ppc64le
39- manylinux : auto
28+ duckdb-slug : aarch64
4029 steps :
4130 - uses : actions/checkout@v4
4231 - uses : astral-sh/setup-uv@v5
@@ -46,73 +35,27 @@ jobs:
4635 uses : PyO3/maturin-action@v1
4736 with :
4837 target : ${{ matrix.platform.target }}
49- args : --release --out dist -i 3.10
38+ args : --release --out dist -i 3.10 --auditwheel repair
5039 sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
5140 manylinux : ${{ matrix.platform.manylinux }}
41+ before-script-linux : |
42+ if command -v yum &> /dev/null; then
43+ yum install -y unzip
44+ elif command -v apt-get &> /dev/null; then
45+ apt-get update && apt-get install -y unzip
46+ else
47+ echo "No supported package manager found."
48+ exit 1
49+ fi
50+ curl -L -O https://github.com/duckdb/duckdb/releases/download/v1.2.0/libduckdb-linux-${{ matrix.platform.duckdb-slug }}.zip
51+ unzip libduckdb-linux-${{ matrix.platform.duckdb-slug }}.zip -d /opt/duckdb
52+ export DUCKDB_LIB_DIR=/opt/duckdb
5253 - name : Upload wheels
5354 uses : actions/upload-artifact@v4
5455 with :
5556 name : wheels-linux-${{ matrix.platform.target }}
5657 path : dist
5758
58- musllinux :
59- runs-on : ${{ matrix.platform.runner }}
60- strategy :
61- matrix :
62- platform :
63- - runner : ubuntu-22.04
64- target : x86_64
65- - runner : ubuntu-22.04
66- target : x86
67- - runner : ubuntu-22.04
68- target : aarch64
69- - runner : ubuntu-22.04
70- target : armv7
71- steps :
72- - uses : actions/checkout@v4
73- - uses : astral-sh/setup-uv@v5
74- - name : Install Pythons
75- run : uv python install 3.10
76- - name : Build wheels
77- uses : PyO3/maturin-action@v1
78- with :
79- target : ${{ matrix.platform.target }}
80- args : --release --out dist -i 3.10
81- sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
82- manylinux : musllinux_1_2
83- - name : Upload wheels
84- uses : actions/upload-artifact@v4
85- with :
86- name : wheels-musllinux-${{ matrix.platform.target }}
87- path : dist
88-
89- # windows:
90- # runs-on: ${{ matrix.platform.runner }}
91- # strategy:
92- # matrix:
93- # platform:
94- # - runner: windows-latest
95- # target: x64
96- # - runner: windows-latest
97- # target: x86
98- # steps:
99- # - uses: actions/checkout@v4
100- # - uses: actions/setup-python@v5
101- # with:
102- # python-version: 3.x
103- # architecture: ${{ matrix.platform.target }}
104- # - name: Build wheels
105- # uses: PyO3/maturin-action@v1
106- # with:
107- # target: ${{ matrix.platform.target }}
108- # args: --release --out dist --find-interpreter
109- # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
110- # - name: Upload wheels
111- # uses: actions/upload-artifact@v4
112- # with:
113- # name: wheels-windows-${{ matrix.platform.target }}
114- # path: dist
115-
11659 macos :
11760 runs-on : ${{ matrix.platform.runner }}
11861 strategy :
@@ -122,17 +65,34 @@ jobs:
12265 target : x86_64
12366 - runner : macos-14
12467 target : aarch64
68+ env :
69+ DUCKDB_VERSION : " 1.2.0"
12570 steps :
12671 - uses : actions/checkout@v4
12772 - uses : astral-sh/setup-uv@v5
128- - name : Install Pythons
73+ - name : Install Python
12974 run : uv python install 3.10
75+ - name : Install libduckdb
76+ run : |
77+ wget https://github.com/duckdb/duckdb/releases/download/v${DUCKDB_VERSION}/libduckdb-osx-universal.zip
78+ mkdir -p ./opt/duckdb
79+ unzip libduckdb-osx-universal.zip -d ${{ github.workspace }}/opt/duckdb
80+ - name : Install delocate
81+ run : |
82+ uv venv
83+ uv pip install delocate
13084 - name : Build wheels
13185 uses : PyO3/maturin-action@v1
86+ env :
87+ DUCKDB_LIB_DIR : ${{ github.workspace }}/opt/duckdb
13288 with :
13389 target : ${{ matrix.platform.target }}
13490 args : --release --out dist -i 3.10
13591 sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
92+ - name : Repair wheel
93+ run : .venv/bin/delocate-wheel -v dist/*.whl
94+ env :
95+ DYLD_LIBRARY_PATH : ${{ github.workspace }}/opt/duckdb
13696 - name : Upload wheels
13797 uses : actions/upload-artifact@v4
13898 with :
@@ -160,8 +120,6 @@ jobs:
160120 if : ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
161121 needs :
162122 - linux
163- - musllinux
164- # - windows
165123 - macos
166124 - sdist
167125 environment :
0 commit comments