Skip to content

ci: add release workflow to publish prebuilt SDK binaries - #628

Open
chinaux wants to merge 14 commits into
alibaba:mainfrom
chinaux:feat/release-prebuilt
Open

ci: add release workflow to publish prebuilt SDK binaries#628
chinaux wants to merge 14 commits into
alibaba:mainfrom
chinaux:feat/release-prebuilt

Conversation

@chinaux

@chinaux chinaux commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR adds a GitHub Release pipeline that publishes prebuilt C++/C SDK binaries, so users can consume zvec directly without building from source.

What's included

New workflows

  • .github/workflows/release.yml — the release entry point:
    • Triggered by pushing a v* tag, or manually via workflow_dispatch with a tag input
    • Calls the reusable build workflow, then creates a GitHub Release with
      auto-generated notes via softprops/action-gh-release
    • Tags containing alpha / beta / rc are automatically marked as prerelease
  • .github/workflows/_build_prebuilt.yml — reusable build workflow
    (workflow_call + workflow_dispatch), building the SDK on 4 platforms in parallel

Release assets

Asset Runner
zvec-sdk-linux-amd64.tar.gz ubuntu-24.04
zvec-sdk-linux-arm64.tar.gz ubuntu-24.04-arm
zvec-sdk-osx-arm64.tar.gz macos-15
zvec-sdk-windows-amd64.zip windows-2025

@chinaux
chinaux requested a review from Cuiyus as a code owner July 28, 2026 11:46
@chinaux
chinaux requested a review from egolearner as a code owner July 31, 2026 07:20
@chinaux
chinaux force-pushed the feat/release-prebuilt branch from 49580a5 to a53a9d0 Compare August 11, 2026 03:17
- release.yml: triggered by v* tag push or manual dispatch, creates GitHub Release via softprops/action-gh-release
- _build_prebuilt.yml: reusable workflow building zvec SDK (include/ + lib/, shared libs only) for osx-arm64, linux-amd64, linux-arm64 and windows-amd64 with DuckDB-style asset naming
…lock

When called via workflow_call, github.workflow resolves to the caller's name, making the reusable workflow compete with the caller for the same concurrency group and deadlocking the run. Concurrency is controlled by the caller (release.yml).
lz4's Makefile.inc defines 'INSTALL_DIR ?= install -d -m 755' as a command, which gets overridden by our INSTALL_DIR environment variable, breaking 'make install' on all Unix platforms. Prefix our env vars with ZVEC_.
@chinaux
chinaux force-pushed the feat/release-prebuilt branch from a53a9d0 to 2b45a34 Compare August 12, 2026 03:10
arch: arm64
ext: tar.gz
- target: x86_64-unknown-linux-gnu
os: ubuntu-24.04

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

貌似没有指定 glibc 版本?会使用 ubuntu 24.04 glibc 2.38

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修复

Linux prebuilt .so files were linked against glibc 2.38 (ubuntu-24.04),
making them incompatible with older distros. Run the Linux build jobs
inside manylinux_2_28 containers (glibc 2.28) to match the Python wheel
build's compatibility — see [tool.cibuildwheel.linux] in pyproject.toml.

- Add per-matrix 'container' field; macOS/Windows use '' (no container)
- Skip actions/setup-python on Linux (container provides python3+pip)
- Change 'python' to 'python3' in Unix install step for container compat

Android and iOS jobs are unchanged (cross-compiled, no host glibc dep).
The manylinux_2_28 container's system Python (/usr/bin/python3) does
not have pip installed. Use the manylinux-bundled CPython at
/opt/python/cp311/bin/ instead, which includes pip. Fall back to
python3 from actions/setup-python on non-Linux platforms.
The manylinux_2_28 image does not have /opt/python/cp311/bin (the
previous fallback path). Use actions/setup-python on all platforms
including inside the Linux container — it installs Python 3.11 with
pip into the tool cache which is mounted into the container. Also
remove pip caching to avoid container cache path issues.
actions/setup-python downloads a CPython built for glibc 2.34+, which
cannot run inside the manylinux_2_28 container (glibc 2.28). Use the
manylinux-bundled CPython at /opt/python/cp3*/bin/ instead, which has
pip and is compatible with the container's glibc.

- Skip actions/setup-python on Linux (glibc incompatibility)
- Glob /opt/python/cp3*/bin to find any bundled CPython version
- Add to GITHUB_PATH so cmake/ninja are available in later steps
- Fall back to python3 from setup-python on macOS
The shell uses 'bash -e -o pipefail'. On macOS, the glob
/opt/python/cp3*/bin doesn't match, causing 'ls' to fail and
pipefail to propagate the non-zero exit, triggering set -e and
killing the script before reaching pip install. Add '|| true' to
the command substitution to prevent this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants