-
Notifications
You must be signed in to change notification settings - Fork 59
227 lines (195 loc) · 6.73 KB
/
Copy pathpython-wheels.yml
File metadata and controls
227 lines (195 loc) · 6.73 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: python-wheels
on:
pull_request:
branches:
- main
paths:
- 'ci/scripts/wheels-*'
- '.github/workflows/python-wheels.yml'
- '.github/workflows/wheels-expr.yml'
- '.github/workflows/wheels-zarr.yml'
- '.github/actions/setup-wheel-build/**'
push:
branches:
- main
- 'branch-**'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
env:
# At s2geometry updated to 0.13.0
VCPKG_REF: 580d480f750618f8affeb77abbb956e6eeaee0ce
jobs:
windows-x86_64:
runs-on: windows-2022
steps:
- uses: actions/checkout@v7
with:
submodules: 'true'
fetch-depth: 0
- uses: ./.github/actions/setup-wheel-build
with:
rust-cache-key: "python-wheel-windows-latest-v3"
delvewheel: "true"
- name: Clone vcpkg
uses: actions/checkout@v7
with:
repository: microsoft/vcpkg
ref: ${{ env.VCPKG_REF }}
path: vcpkg
- name: Build and test wheels (sedonadb)
run: |
cd ci/scripts
.\wheels-build-windows.ps1
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
VCPKG_DEFAULT_TRIPLET: x64-windows-dynamic-release
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
CIBW_BUILD: "*-win_amd64"
CIBW_TEST_REQUIRES: pytest adbc_driver_manager geoarrow-pyarrow geopandas
CIBW_TEST_COMMAND: pytest {package}/tests -vv
- uses: actions/upload-artifact@v7
with:
name: release-wheels-windows-x86_64
path: python/sedonadb/dist/*.whl
macOS-arm64:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v7
with:
submodules: 'true'
fetch-depth: 0
- uses: ./.github/actions/setup-wheel-build
with:
rust-cache-key: "python-wheel-macOS-latest-v2"
cache-bin: "false"
- name: Clone vcpkg
uses: actions/checkout@v7
with:
repository: microsoft/vcpkg
ref: ${{ env.VCPKG_REF }}
path: vcpkg
- name: Build and test wheels (sedonadb)
run: |
cd ci/scripts
./wheels-build-macos.sh sedonadb
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
CIBW_TEST_REQUIRES: pytest adbc_driver_manager geoarrow-pyarrow geopandas duckdb
CIBW_TEST_COMMAND: pytest {package}/tests -vv
- uses: actions/upload-artifact@v7
with:
name: release-wheels-macOS-arm64
path: python/sedonadb/dist/*.whl
macOS-amd64:
runs-on: macos-15-intel
steps:
- uses: actions/checkout@v7
with:
submodules: 'true'
fetch-depth: 0
- uses: ./.github/actions/setup-wheel-build
with:
rust-cache-key: "python-wheel-macOS-latest-v2"
cache-bin: "false"
- name: Clone vcpkg
uses: actions/checkout@v7
with:
repository: microsoft/vcpkg
ref: ${{ env.VCPKG_REF }}
path: vcpkg
- name: Build and test wheels (sedonadb)
run: |
cd ci/scripts
./wheels-build-macos.sh sedonadb
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
CIBW_TEST_REQUIRES: pytest adbc_driver_manager geoarrow-pyarrow geopandas duckdb
CIBW_TEST_COMMAND: pytest {package}/tests -vv
SEDONADB_MACOS_ARCH: x86_64
- uses: actions/upload-artifact@v7
with:
name: release-wheels-macOS-amd64
path: python/sedonadb/dist/*.whl
wheels-linux:
name: ${{ matrix.config.label }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {os: "ubuntu-latest", label: "linux-x86_64", arch: "x86_64"}
- {os: "ubuntu-24.04-arm", label: "linux-arm64", arch: "aarch64"}
steps:
- uses: actions/checkout@v7
with:
submodules: 'true'
fetch-depth: 0
- uses: ./.github/actions/setup-wheel-build
- name: Build and test wheels (sedonadb)
run: |
cd ci/scripts
./wheels-build-linux.sh ${{ matrix.config.arch }} sedonadb
env:
CIBW_SKIP: "*musllinux*"
CIBW_TEST_REQUIRES: pytest adbc_driver_manager geoarrow-pyarrow geopandas duckdb
CIBW_TEST_COMMAND: pytest {package}/tests -vv
- uses: actions/upload-artifact@v7
with:
name: release-wheels-${{ matrix.config.label }}
path: python/sedonadb/dist/*.whl
# Extension wheels build in their own reusable workflow, gated on the
# sedonadb jobs (so they run in the same run and can download those wheels
# to test against) but isolated so an extension failure can't block the
# core package's nightly. Future extensions follow the same shape.
expr:
needs: ["windows-x86_64", "macOS-arm64", "macOS-amd64", "wheels-linux"]
uses: ./.github/workflows/wheels-expr.yml
secrets: inherit
zarr:
needs: ["windows-x86_64", "macOS-arm64", "macOS-amd64", "wheels-linux"]
uses: ./.github/workflows/wheels-zarr.yml
secrets: inherit
upload_nightly:
needs: ["wheels-linux", "macOS-arm64", "macOS-amd64", "windows-x86_64"]
name: Upload nightly packages
runs-on: "macos-latest"
steps:
- uses: actions/download-artifact@v8
with:
pattern: release-wheels-*
merge-multiple: true
path: dist
- name: Install gemfury client
run: |
brew tap gemfury/tap
brew install fury-cli
fury --version
- name: Upload packages to Gemfury
if: github.repository == 'apache/sedona-db' && github.ref == 'refs/heads/main'
shell: bash
run: |
fury push \
--api-token=${GEMFURY_PUSH_TOKEN} \
--as="sedona-nightlies" \
dist/*
env:
GEMFURY_PUSH_TOKEN: ${{ secrets.GEMFURY_PUSH_TOKEN }}