forked from duckdb/duckdb-python
-
Notifications
You must be signed in to change notification settings - Fork 0
151 lines (145 loc) · 6.03 KB
/
Copy pathpackaging_wheels.yml
File metadata and controls
151 lines (145 loc) · 6.03 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
name: Wheels packaging
# Three jobs share the build steps in .github/actions/build-wheel:
#
# - seed_wheels builds the newest python on every platform and is the only
# cache writer, so each platform has exactly one coherent ccache generation
# per run. The cross python hit rate is high because most translation units
# are DuckDB core, which is python independent.
# - sanity_wheels builds the oldest python on Linux only, as a cheap boundary
# check in minimal mode (PRs). It runs parallel to the seeds: PR runs never
# save caches, so ordering buys nothing there.
# - build_wheels fans out the remaining pythons on every platform against the
# cache the seeds wrote. Full runs only. Skipping it in minimal mode is a
# job condition on purpose: matrix excludes cannot express zero jobs, and a
# matrix that excludes every combination fails the whole run at strategy
# evaluation time.
#
# The python lists below differ per release branch (v1.5-variegata includes
# cp310) and are kept line isolated so merges between branches resolve
# mechanically. Everything else in this file must stay identical across
# branches.
on:
workflow_call:
inputs:
minimal:
type: boolean
description: Build a minimal set of wheels to do a sanity check
default: false
testsuite:
type: string
description: Testsuite to run (none, fast, all)
required: true
default: all
duckdb-python-sha:
type: string
description: The commit or ref to build against (defaults to latest commit of current ref)
required: false
duckdb-sha:
type: string
description: Override the DuckDB submodule commit or ref to build against
required: false
set-version:
description: Force version (vX.Y.Z, optionally -postN or a PEP440 pre-release suffix like -a1/-alpha1/-b2/-rc3)
required: false
type: string
jobs:
seed_wheels:
name: 'Seed: ${{ matrix.python }}-${{ matrix.platform.cibw_system }}_${{ matrix.platform.arch }}'
strategy:
fail-fast: false
matrix:
python: [ cp314 ]
platform:
- { os: windows-2022, arch: amd64, cibw_system: win }
- { os: windows-11-arm, arch: ARM64, cibw_system: win } # cibw requires ARM64 to be uppercase
- { os: ubuntu-24.04, arch: x86_64, cibw_system: manylinux }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_system: manylinux }
- { os: macos-15, arch: arm64, cibw_system: macosx }
- { os: macos-15, arch: universal2, cibw_system: macosx }
- { os: macos-15-intel, arch: x86_64, cibw_system: macosx }
# Single value dimension, only here so the exclude below can key on it.
# Safe in this job: the exclude can never empty the matrix.
minimal:
- ${{ inputs.minimal }}
exclude:
- { minimal: true, platform: { arch: universal2 } }
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout DuckDB Python
uses: actions/checkout@v4
with:
ref: ${{ inputs.duckdb-python-sha }}
fetch-depth: 0
submodules: true
- name: Build the wheel
uses: ./.github/actions/build-wheel
with:
python: ${{ matrix.python }}
arch: ${{ matrix.platform.arch }}
cibw-system: ${{ matrix.platform.cibw_system }}
testsuite: ${{ inputs.testsuite }}
duckdb-sha: ${{ inputs.duckdb-sha }}
set-version: ${{ inputs.set-version }}
ccache-save: 'true'
sanity_wheels:
name: 'Sanity: ${{ matrix.python }}-${{ matrix.platform.cibw_system }}_${{ matrix.platform.arch }}'
if: ${{ inputs.minimal }}
strategy:
fail-fast: false
matrix:
python: [ cp311 ]
platform:
- { os: ubuntu-24.04, arch: x86_64, cibw_system: manylinux }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_system: manylinux }
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout DuckDB Python
uses: actions/checkout@v4
with:
ref: ${{ inputs.duckdb-python-sha }}
fetch-depth: 0
submodules: true
- name: Build the wheel
uses: ./.github/actions/build-wheel
with:
python: ${{ matrix.python }}
arch: ${{ matrix.platform.arch }}
cibw-system: ${{ matrix.platform.cibw_system }}
testsuite: ${{ inputs.testsuite }}
duckdb-sha: ${{ inputs.duckdb-sha }}
set-version: ${{ inputs.set-version }}
ccache-save: 'false'
build_wheels:
name: 'Wheel: ${{ matrix.python }}-${{ matrix.platform.cibw_system }}_${{ matrix.platform.arch }}'
if: ${{ !inputs.minimal }}
needs: seed_wheels
strategy:
fail-fast: false
matrix:
python: [ cp311, cp312, cp313 ]
platform:
- { os: windows-2022, arch: amd64, cibw_system: win }
- { os: windows-11-arm, arch: ARM64, cibw_system: win } # cibw requires ARM64 to be uppercase
- { os: ubuntu-24.04, arch: x86_64, cibw_system: manylinux }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_system: manylinux }
- { os: macos-15, arch: arm64, cibw_system: macosx }
- { os: macos-15, arch: universal2, cibw_system: macosx }
- { os: macos-15-intel, arch: x86_64, cibw_system: macosx }
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout DuckDB Python
uses: actions/checkout@v4
with:
ref: ${{ inputs.duckdb-python-sha }}
fetch-depth: 0
submodules: true
- name: Build the wheel
uses: ./.github/actions/build-wheel
with:
python: ${{ matrix.python }}
arch: ${{ matrix.platform.arch }}
cibw-system: ${{ matrix.platform.cibw_system }}
testsuite: ${{ inputs.testsuite }}
duckdb-sha: ${{ inputs.duckdb-sha }}
set-version: ${{ inputs.set-version }}
ccache-save: 'false'