Skip to content

enhance(ci): add manually-triggered try-build workflow and dependency fixes - #1989

Open
yhmo wants to merge 5 commits into
zilliztech:mainfrom
yhmo:ci-gcc16-build
Open

yhmo wants to merge 5 commits into
zilliztech:mainfrom
yhmo:ci-gcc16-build

Conversation

@yhmo

@yhmo yhmo commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

What

Add .github/workflows/try-build.yaml, a manually triggered workflow
(workflow_dispatch) to build knowhere on runner/compiler combinations
outside the regular UT matrix, mirroring the approach validated for the
Milvus dependency graph in zilliztech/milvus-common#155.

How it works

  • Inputs: runner (ubuntu-22.04 / ubuntu-24.04 / macos-15 / macos-26),
    compiler (runner-native / gcc-11..16 / clang-15/16/17/19/21/22/23), and
    extra_options (appended to the conan profile [options]).
  • Toolchain: the requested gcc/clang is installed per OS (Linux apt /
    toolchain PPA / Homebrew, macOS Homebrew), exposed under every common name
    (cc/c++/clang/g++) via a prepended BIN_DIR, and CC/CXX are
    exported as absolute paths.
  • Verification: the resolved compiler's reported major version is checked
    against the requested one, so the build can never silently use the runner
    default while the conan profile claims another version.
  • Conan profile: generated from conan profile detect with
    compiler/compiler.version and tools.build:compiler_executables
    pointing at the requested toolchain, then passed via make CONAN_PROFILE=...
    (Cardinal explicitly disabled on macOS, as it is not part of the macOS
    build matrix).
  • Cold build: no conan package cache is restored or saved, so every
    manual run is a clean cold source build and never grows the repo's 10GB
    cache quota.

Dependency fixes required for the upper-bound toolchains

  • conanfile.py — folly: bump the recipe revision to #387e621c so folly
    resolves libsodium from the @milvus/dev channel carrying the armcrypto
    pragma fix (fix(libsodium): move armcrypto target pragma after arm_neon.h include milvus-io/conanfiles#276 / Mergify #281); this fixes clang-17 (arm64)
    and clang-23 (libc++) builds. force=True aligns the whole graph.
  • conanfile.py — liburing: bump the Linux override 2.8 -> 2.15, matching
    the folly recipe's IORING_OP_RECV_ZC requirement.
  • thirdparty/faiss: add the missing #include <cerrno> to eight vendored
    files (impl/io.cpp, impl/io_macros.h, impl/index_read.cpp, impl/mapped_io.cpp,
    invlists/OnDiskInvertedLists.cpp x2, cppcontrib/knowhere impl/index_read.cpp,
    impl/platform_macros.h), required by newer libc++ builds.

Validation

  • The try-build workflow was exercised during the course of this PR against
    gcc-12/13/14/15/16 and clang-17/19/21/22/23 on ubuntu/macos runners.
  • Regular CI (ut on ubuntu-22.04, ut on macos-15, linux-x86_64, python3 wheel)
    is green on the final head.

@sre-ci-robot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: yhmo
To complete the pull request process, please assign chasingegg after the PR has been reviewed.
You can assign the PR to them by writing /assign @chasingegg in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mergify

mergify Bot commented Nov 26, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.

  • Queue this pull request once it meets the queue conditions

@yhmo
yhmo force-pushed the ci-gcc16-build branch 3 times, most recently from 6d005b0 to c8db0d8 Compare November 26, 2026 08:01
@yhmo

yhmo commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator Author

First gcc-16-build run failed in every conan-based job with:

ERROR: Version conflict: Conflict between folly/2026.04.20.00@milvus/dev and folly/2026.04.20.00@milvus/dev in the graph.
Conflict originates from milvus-common/1.0.0-a88c21f@milvus/dev

Cause: this PR bumps knowhere's direct folly require to the fixed recipe revision #bb88f7ff…, while the Conan milvus-common package (still consumed on main) transitively pins the old #06852bea… — Conan rejects two revisions of the same ref in one graph.

Fix (c8db0d8): the bumped require now carries force=True (the same graph-wide override pattern this recipe already uses for fmt/openssl/zlib), so the whole graph resolves to the fixed folly revision and Conan rebuilds the affected binaries as needed. The new run should proceed to the actual gcc-16/clang-23 compilation.

@yhmo yhmo changed the title enhance: add gcc-16 (ubuntu-24.04) build workflow enhance: add gcc-16 (ubuntu-24.04) clang-23(macos-26) build workflow Nov 26, 2026
Comment thread .github/workflows/gcc16-build.yml Resolved
Comment thread .github/workflows/gcc16-build.yml Resolved
Comment thread conanfile.py Resolved
@mergify

mergify Bot commented Nov 26, 2026

Copy link
Copy Markdown

@yhmo e2e jenkins job failed, comment /run-e2e can trigger the job again.

@mergify mergify Bot added ci-passed and removed ci-passed labels Nov 28, 2026
Comment thread thirdparty/faiss/faiss/impl/io_macros.h Resolved
Comment thread conanfile.py Resolved
Comment thread thirdparty/faiss/faiss/impl/io.cpp Resolved
@yhmo

yhmo commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator Author

conanfile.py line:162 (commit hygiene)
Low ---- The repo convention (AGENTS.md / DCO workflow) is exactly one commit per PR, but this PR currently has 3 commits (199396a, d224811, 227028d), the last two being CI-fix follow-ups. Please squash them into a single Signed-off-by commit before merge. (This comment is non-blocking. If you consider this issue not important, you can close this comment directly.)

@mergify mergify Bot added the ci-passed label Nov 29, 2026
@mergify mergify Bot removed the ci-passed label Nov 30, 2026
@alexanderguzhva

Copy link
Copy Markdown
Collaborator

/hold
let me merge faiss-related changes to the faiss baseline first
I'll create a separate PR

@alexanderguzhva

Copy link
Copy Markdown
Collaborator

wait for facebookresearch/faiss#6010

@mergify

mergify Bot commented Dec 2, 2026

Copy link
Copy Markdown

@yhmo e2e jenkins job failed, comment /run-e2e can trigger the job again.

@alexanderguzhva

Copy link
Copy Markdown
Collaborator

@yhmo wait for #2000 and merge on top of it, please. This one contains the needed change for the baseline. Thanks.

@yhmo

yhmo commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator Author

Sure, no problem.

@yhmo yhmo changed the title enhance: add gcc-16 (ubuntu-24.04) clang-23(macos-26) build workflow enhance(ci): add manually-triggered try-build workflow and dependency fixes Dec 3, 2026
Comment thread .github/workflows/try-build.yaml Resolved
Comment thread .github/workflows/try-build.yaml Resolved
@mergify mergify Bot removed the ci-passed label Dec 3, 2026
@mergify mergify Bot added the ci-passed label Dec 3, 2026
@alexanderguzhva

Copy link
Copy Markdown
Collaborator

/unhold

@alexanderguzhva

Copy link
Copy Markdown
Collaborator

@yhmo looks good to me
is it good on your end to merge this?

… fixes

Add .github/workflows/try-build.yaml for manual cold builds of knowhere
on runner/compiler combinations outside the regular UT matrix
(workflow_dispatch with runner, compiler, and extra_options inputs).
Each run installs conan 2.33.0, resolves the requested toolchain
(gcc/clang on Linux/macOS), verifies the resolved compiler major
version, generates a conan profile (preserving libcxx/cppstd), validates
the profile, and runs make (Cardinal disabled on macOS) with no conan
package cache, so every build is a clean cold build.

Dependency fixes for the upper-bound compilers used by the Milvus
dependency validation (see milvus-io/conanfiles BUILD_MATRIX.md):

- conanfile.py: bump folly recipe revision to 7af84eb7 (compiler-compat
  fixes zilliztech#252/zilliztech#253 and libsodium@milvus/dev armcrypto fix zilliztech#281); bump
  liburing override to 2.15; bump boost to b28dcffa (gcc-15/16 emplace
  UB fix zilliztech#270); bump opentelemetry-cpp to 4499df73 (ABI fix zilliztech#232).
- thirdparty/faiss: add missing <cerrno> includes to the two vendored
  cppcontrib/knowhere files, required by newer libc++ (clang-17/23)
  builds.

Signed-off-by: yhmo <yihua.mo@zilliz.com>
@mergify mergify Bot removed the ci-passed label Dec 4, 2026
@mergify

mergify Bot commented Dec 4, 2026

Copy link
Copy Markdown

@yhmo e2e jenkins job failed, comment /run-e2e can trigger the job again.

@yhmo

yhmo commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator Author

@yhmo looks good to me is it good on your end to merge this?

Not yet, I need to update some conan dependencies.

Add a Report build environment step after the build that prints the
runner label, OS, resolved compiler version, C++ standard, build type,
and the generated conan profile, so a manual try-build run's exact
toolchain is visible in the job log.

Signed-off-by: yhmo <yihua.mo@zilliz.com>
@mergify

mergify Bot commented Dec 4, 2026

Copy link
Copy Markdown

@yhmo e2e jenkins job failed, comment /run-e2e can trigger the job again.

yhmo added 2 commits December 4, 2026 12:29
Add a 'Building with a different compiler' section to the README,
mirroring milvus-common#155 and cardinal#1060: the verified gcc/clang
ranges, the recommended custom-Conan-profile flow (CONAN_PROFILE +
tools.build:compiler_executables), an edit-default-profile alternative,
and notes on macOS keg-only toolchains/libomp, gcc-15/16 packaging, and
the clang-17 libsodium@milvus/dev dependency.

Signed-off-by: yhmo <yihua.mo@zilliz.com>
Align with milvus-io/conanfiles BUILD_MATRIX.md:
- boost: pin the @milvus/dev channel (same b28dcffa revision) to match
  the published channel for custom recipes.
- lz4: bump to f4836e8d, the current revision on default-conan-local2.

Signed-off-by: yhmo <yihua.mo@zilliz.com>
@mergify

mergify Bot commented Dec 4, 2026

Copy link
Copy Markdown

@yhmo e2e jenkins job failed, comment /run-e2e can trigger the job again.

1 similar comment
@mergify

mergify Bot commented Dec 4, 2026

Copy link
Copy Markdown

@yhmo e2e jenkins job failed, comment /run-e2e can trigger the job again.

The newer 4499df73 (conanfiles#232 ABI fix) no longer accepts the
brace-enclosed TraceId/SpanId initializers that milvus-common's
Tracer.h/Tracer.cpp use, breaking every build that compiles
milvus-common (linux-x86_64, ut, wheel, analyzer). Keep the old pin
until milvus-common adapts to the new opentelemetry-cpp constructors.
boost channel alignment and the lz4 bump are retained.

Signed-off-by: yhmo <yihua.mo@zilliz.com>
@mergify mergify Bot added the ci-passed label Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants