@@ -63,127 +63,20 @@ defaults:
6363
6464jobs :
6565 build_sdist :
66- name : Build sdist
67- runs-on : ubuntu-24.04
68- steps :
69-
70- - name : Checkout DuckDB Python
71- uses : actions/checkout@v4
72- with :
73- ref : ${{ inputs.git-ref }}
74- fetch-depth : 0
75- submodules : true
76-
77- - name : Checkout DuckDB
78- shell : bash
79- run : |
80- cd external/duckdb
81- git fetch origin
82- git checkout ${{ inputs.duckdb-git-ref }}
83-
84- - name : Set OVERRIDE_GIT_DESCRIBE
85- if : ${{ inputs.set-version != '' }}
86- run : echo "OVERRIDE_GIT_DESCRIBE=${{ inputs.set-version }}" >> $GITHUB_ENV
87-
88- - name : Install Astral UV
89- uses : astral-sh/setup-uv@v6
90- with :
91- version : " 0.7.14"
92- python-version : 3.11
93-
94- - name : Build sdist
95- run : uv build --sdist
96-
97- - name : Install sdist
98- run : |
99- cd ${{ runner.temp }}
100- uv venv
101- uv pip install ${{ github.workspace }}/dist/duckdb-*.tar.gz
102-
103- - name : Test sdist
104- if : ${{ inputs.testsuite != 'none' }}
105- run : |
106- # install the test requirements
107- uv export --only-group test --no-emit-project --output-file ${{ runner.temp }}/pylock.toml --quiet
108- cd ${{ runner.temp }}
109- uv pip install -r pylock.toml
110- # run tests
111- tests_root="${{ github.workspace }}/tests"
112- tests_dir="${tests_root}${{ inputs.testsuite == 'fast' && '/fast' || '/' }}"
113- uv run --verbose pytest $tests_dir --verbose --ignore=${tests_root}/stubs
114-
115- - uses : actions/upload-artifact@v4
116- with :
117- name : sdist
118- path : dist/*.tar.gz
119- compression-level : 0
66+ name : Build an sdist and determine versions
67+ uses : ./.github/workflows/packaging_sdist.yml
68+ with :
69+ testsuite : all
70+ git-ref : ${{ github.ref }}
71+ duckdb-git-ref : ${{ inputs.duckdb-sha }}
72+ set-version : ${{ inputs.stable-version }}
12073
12174 build_wheels :
122- name : ' Wheel: ${{ matrix.python }}-${{ matrix.platform.cibw_system }}_${{ matrix.platform.arch }}'
123- strategy :
124- fail-fast : false
125- matrix :
126- python : [ cp39, cp310, cp311, cp312, cp313 ]
127- platform :
128- - { os: windows-2025, arch: amd64, cibw_system: win }
129- - { os: ubuntu-24.04, arch: x86_64, cibw_system: manylinux }
130- - { os: ubuntu-24.04-arm, arch: aarch64, cibw_system: manylinux }
131- - { os: macos-15, arch: arm64, cibw_system: macosx }
132- - { os: macos-15, arch: universal2, cibw_system: macosx }
133- - { os: macos-13, arch: x86_64, cibw_system: macosx }
134- minimal :
135- - ${{ inputs.minimal }}
136- exclude :
137- - { minimal: true, python: cp310 }
138- - { minimal: true, python: cp311 }
139- - { minimal: true, python: cp312 }
140- - { minimal: true, platform: { arch: universal2 } }
141- runs-on : ${{ matrix.platform.os }}
142- env :
143- CIBW_TEST_SKIP : ${{ inputs.testsuite == 'none' && '*' || '*-macosx_universal2' }}
144- CIBW_TEST_SOURCES : tests
145- CIBW_BEFORE_TEST : >
146- uv export --only-group test --no-emit-project --output-file pylock.toml --directory {project} &&
147- uv pip install -r pylock.toml
148- CIBW_TEST_COMMAND : >
149- uv run -v pytest ${{ inputs.testsuite == 'fast' && './tests/fast' || './tests' }} --verbose --ignore=./tests/stubs
150-
151- steps :
152- - name : Checkout DuckDB Python
153- uses : actions/checkout@v4
154- with :
155- ref : ${{ inputs.git-ref }}
156- fetch-depth : 0
157- submodules : true
158-
159- - name : Checkout DuckDB
160- shell : bash
161- run : |
162- cd external/duckdb
163- git fetch origin
164- git checkout ${{ inputs.duckdb-git-ref }}
165-
166- # Make sure that OVERRIDE_GIT_DESCRIBE is propagated to cibuildwhel's env, also when it's running linux builds
167- - name : Set OVERRIDE_GIT_DESCRIBE
168- if : ${{ inputs.set-version != '' }}
169- run : echo "CIBW_ENVIRONMENT=OVERRIDE_GIT_DESCRIBE=${{ inputs.set-version }}" >> $GITHUB_ENV
170-
171- # Install Astral UV, which will be used as build-frontend for cibuildwheel
172- - uses : astral-sh/setup-uv@v6
173- with :
174- version : " 0.7.14"
175- enable-cache : false
176- cache-suffix : -${{ matrix.python }}-${{ matrix.platform.cibw_system }}_${{ matrix.platform.arch }}
177-
178- - name : Build${{ inputs.testsuite != 'none' && ' and test ' || ' ' }}wheels
179- 180- env :
181- CIBW_ARCHS : ${{ matrix.platform.arch == 'amd64' && 'AMD64' || matrix.platform.arch }}
182- CIBW_BUILD : ${{ matrix.python }}-${{ matrix.platform.cibw_system }}_${{ matrix.platform.arch }}
183-
184- - name : Upload wheel
185- uses : actions/upload-artifact@v4
186- with :
187- name : wheel-${{ matrix.python }}-${{ matrix.platform.cibw_system }}_${{ matrix.platform.arch }}
188- path : wheelhouse/*.whl
189- compression-level : 0
75+ name : Build and test releases
76+ uses : ./.github/workflows/packaging_wheels.yml
77+ with :
78+ minimal : false
79+ testsuite : all
80+ git-ref : ${{ github.ref }}
81+ duckdb-git-ref : ${{ inputs.duckdb-sha }}
82+ set-version : ${{ inputs.stable-version }}
0 commit comments