Skip to content

Commit 61abb55

Browse files
committed
ci(release-readiness): verify wheel installs and Rust ext loads
cross-platform-build previously only proved wheels could be built. Add a post-build install/verify step per matrix leg so we catch wheel-vs- runtime mismatches (wrong glibc/musl, wrong abi tag, missing Rust extension symbols). The verification script imports pinecone, imports pinecone._grpc (forces the native dylib to load), and constructs a GrpcChannel — which is lazy and makes no network call. If the Rust extension wasn't correctly bundled or doesn't match the host ABI, this fails fast. Coverage: - linux-glibc x86_64/aarch64, macos arm64, windows x86_64: native install on the build host. - linux-musl x86_64/aarch64: install/verify inside python:3.12-alpine (or arm64v8/python:3.12-alpine), since musl wheels can't run on the glibc runner. - x86_64-apple-darwin: skipped — cross-compiled on an arm64 runner, can't be exercised in place. Logged as a notice.
1 parent a15ea69 commit 61abb55

1 file changed

Lines changed: 78 additions & 0 deletions

File tree

‎.github/workflows/release-readiness.yml‎

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,84 @@ jobs:
225225
exit 1
226226
fi
227227
228+
# Install verification: prove the wheel installs cleanly on its target
229+
# platform and the Rust extension loads + is callable. The GrpcChannel
230+
# constructor is lazy (no network), so this is a fast purely-local check.
231+
#
232+
# Skipped for x86_64-apple-darwin: it's cross-compiled on an arm64 runner
233+
# and can't be exercised in-place. Tracked as a known gap.
234+
- name: Set up Python for install verification
235+
if: matrix.target != 'x86_64-apple-darwin' && !endsWith(matrix.target, '-musl')
236+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
237+
with:
238+
python-version: "3.12"
239+
240+
- name: Write install-verification script
241+
if: matrix.target != 'x86_64-apple-darwin'
242+
shell: bash
243+
run: |
244+
mkdir -p .ci
245+
cat > .ci/verify_install.py <<'PY'
246+
"""Smoke-check that the just-installed pinecone wheel works.
247+
248+
Exercises the platform-specific Rust extension by importing
249+
pinecone._grpc and constructing a GrpcChannel (lazy, no network).
250+
"""
251+
import sys
252+
253+
import pinecone # noqa: F401 — top-level import must succeed
254+
print("OK: import pinecone")
255+
256+
import pinecone._grpc # native dylib must load on this platform
257+
print("OK: import pinecone._grpc")
258+
259+
ch = pinecone._grpc.GrpcChannel(
260+
endpoint="https://example.invalid:443",
261+
api_key="test-key",
262+
api_version="2025-10",
263+
version="0.0.0-install-test",
264+
)
265+
print("OK: GrpcChannel constructed:", type(ch).__name__)
266+
sys.exit(0)
267+
PY
268+
269+
- name: Install wheel + run verification (native host)
270+
if: matrix.target != 'x86_64-apple-darwin' && !endsWith(matrix.target, '-musl')
271+
shell: bash
272+
run: |
273+
set -euo pipefail
274+
wheel=$(ls dist/*.whl | head -n1)
275+
echo "Installing ${wheel} on $(uname -sm) with Python $(python -V)"
276+
python -m pip install --upgrade pip
277+
python -m pip install "${wheel}"
278+
python .ci/verify_install.py
279+
280+
- name: Install wheel + run verification (musl, alpine container)
281+
if: endsWith(matrix.target, '-musl')
282+
shell: bash
283+
run: |
284+
set -euo pipefail
285+
if [[ "${{ matrix.target }}" == aarch64-* ]]; then
286+
IMAGE="arm64v8/python:3.12-alpine"
287+
else
288+
IMAGE="python:3.12-alpine"
289+
fi
290+
echo "Verifying musl wheel inside ${IMAGE}"
291+
docker run --rm \
292+
-v "$PWD/dist:/dist:ro" \
293+
-v "$PWD/.ci/verify_install.py:/verify_install.py:ro" \
294+
"$IMAGE" sh -c '
295+
set -e
296+
ls /dist/*.whl
297+
pip install --quiet /dist/*.whl
298+
python /verify_install.py
299+
'
300+
301+
- name: Note skipped install verification (x86_64-apple-darwin)
302+
if: matrix.target == 'x86_64-apple-darwin'
303+
run: |
304+
echo "::notice::install verification skipped for x86_64-apple-darwin: cross-compiled on arm64 runner, cannot run in place. Real users on Intel macs are the first to exercise this wheel."
305+
228306
# ---------------------------------------------------------------------------
229307
# Sphinx docs build (warnings are errors).
230308
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)