@@ -144,3 +144,120 @@ jobs:
144144 cd python
145145 uv run dev/lint-python
146146 uv run dev/pytest
147+
148+ python-release-build :
149+ runs-on : ubuntu-24.04
150+ steps :
151+ - name : Checkout repository
152+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
153+ - name : Install Python and uv
154+ uses : astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
155+ with :
156+ python-version : " 3.10"
157+ - name : Install twine
158+ run : uv tool install twine
159+ - name : Build delta-sharing package
160+ run : |
161+ cd python
162+ uv build
163+ - name : Build delta-kernel-rust-sharing-wrapper distribution
164+ uses : PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
165+ with :
166+ command : build
167+ maturin-version : v1.12.6
168+ manylinux : 2014
169+ # maturin-action's default for manylinux2014 is the floating
170+ # quay.io/pypa/manylinux2014_x86_64:latest image.
171+ container : quay.io/pypa/manylinux2014_x86_64:2026.04.25-0@sha256:79abced054d8add673e4885d9598e1adc56260989b83aec0922e4cd6eb3ef066
172+ working-directory : python
173+ # The manylinux2014 container has perl but omits some core modules
174+ # that vendored OpenSSL's Configure script requires.
175+ before-script-linux : yum install -y perl-core
176+ args : >-
177+ --manifest-path delta-kernel-rust-sharing-wrapper/Cargo.toml
178+ --release
179+ --sdist
180+ -i python3.10
181+ - name : Check built distributions
182+ run : |
183+ cd python
184+ uv run twine check --strict dist/*
185+ uv run twine check --strict delta-kernel-rust-sharing-wrapper/target/wheels/*
186+ - name : Upload distributions
187+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
188+ with :
189+ name : python-release-distributions
190+ path : |
191+ python/dist/*
192+ python/delta-kernel-rust-sharing-wrapper/target/wheels/*
193+ if-no-files-found : error
194+
195+ # Install the wheels built by python-release-build on an older Ubuntu image
196+ # so we catch glibc / shared-library regressions that ubuntu-24.04 would
197+ # otherwise hide.
198+ python-release-test :
199+ needs : python-release-build
200+ runs-on : ubuntu-22.04
201+ env :
202+ SPARK_LOCAL_IP : localhost
203+ GOOGLE_APPLICATION_CREDENTIALS : /tmp/google_service_account_key.json
204+ steps :
205+ - name : Checkout repository
206+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
207+ - name : Cache Scala, SBT
208+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
209+ with :
210+ path : |
211+ ~/.sbt
212+ ~/.ivy2
213+ ~/.cache/coursier
214+ key : build-and-test-python-release-test
215+ - name : Install Java 8
216+ uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
217+ with :
218+ distribution : ' zulu'
219+ java-version : ' 8'
220+ - name : Install Python and uv
221+ uses : astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
222+ with :
223+ python-version : " 3.10"
224+ - name : Download built wheels
225+ uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
226+ with :
227+ name : python-release-distributions
228+ path : built-wheels/
229+ - name : Install built wheels into a fresh venv
230+ run : |
231+ set -euo pipefail
232+ shopt -s failglob
233+ uv venv /tmp/release-venv --python 3.10
234+ # actions/upload-artifact@v4 collapses the LCA, so paths inside the
235+ # artifact start at `dist/` and `delta-kernel-rust-sharing-wrapper/`,
236+ # not `python/dist/` and `python/delta-kernel-rust-sharing-wrapper/`.
237+ uv pip install --python /tmp/release-venv/bin/python \
238+ built-wheels/delta-kernel-rust-sharing-wrapper/target/wheels/*.whl \
239+ built-wheels/dist/*.whl \
240+ pytest
241+ # The published wheel intentionally excludes delta_sharing.tests, but
242+ # the test files import from `delta_sharing.tests.conftest`. Copy the
243+ # tests subpackage into the installed location so the import works.
244+ site_packages=$(/tmp/release-venv/bin/python -c "import sysconfig; print(sysconfig.get_paths()['purelib'])")
245+ cp -r python/delta_sharing/tests "$site_packages/delta_sharing/tests"
246+ # Rename the source package so it does not shadow the installed wheel
247+ # when pytest runs from python/ (cwd is needed for the sbt server fixture).
248+ mv python/delta_sharing python/delta_sharing.src
249+ - name : Build Server
250+ run : ./build/sbt package
251+ - name : Run tests against installed wheels
252+ env :
253+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
254+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
255+ AZURE_TEST_ACCOUNT_KEY : ${{ secrets.AZURE_TEST_ACCOUNT_KEY }}
256+ GOOGLE_SERVICE_ACCOUNT_KEY : ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}
257+ run : |
258+ cd python
259+ /tmp/release-venv/bin/python -m pytest \
260+ --verbose --showlocals --color=yes \
261+ --doctest-modules --pyargs delta_sharing \
262+ --ignore-glob='*/_yarl_patch.py' \
263+ -o log_cli=true -s
0 commit comments