Custom Conan 2.x recipes for Milvus C++ dependencies. This repo holds conanfile.py recipes, patches, and configurations for third-party libraries that Milvus's C++ core depends on.
All recipes are organized under the recipes/ directory, with each subdirectory representing a single package (e.g. recipes/zlib/, recipes/arrow/).
Recipes can be built and uploaded to Milvus's private Conan Artifactory either by triggering the GitHub Actions workflows, or by running the local scripts directly (requires Artifactory credentials).
Requirements:
- Python 3.8 or later
- Conan 2.25.1
Install Conan:
pip install --user conan==2.25.1 pyyamlInitialize Conan:
conan profile detectThis detects your default build profile (compiler, arch, OS). The profile is stored at ~/.conan2/profiles/default.
For a step-by-step walkthrough — including recipe structure, verification, and publishing — see PUBLISH_GUIDELINE.md.
To add a new recipe (or a new version of an existing recipe), submit a pull request to the master branch:
-
Create a new folder under
recipes/<package>/with this layout:recipes/<package>/ ├── config.yml # maps versions to recipe folders └── all/ # (or version-specific folder, e.g. v2024/, 3.x.x/) ├── conanfile.py # Conan 2.x recipe (required_conan_version = ">=2.0") ├── conandata.yml # source URLs and sha256 hashes └── test_package/ # small test consumer ├── conanfile.py └── CMakeLists.txt -
The recipe must follow the Conan 2.x API (
from conan import ConanFile,CMakeToolchain,CMakeDeps, etc.). Conan 1.x recipes (from conans import ConanFile) are not accepted. -
Verify the recipe builds locally before submitting:
./scripts/build-and-push.sh <package> <version> --no-upload
-
Open a PR against
master. Once merged, maintainers can trigger thebuild-and-push.ymlworkflow to publish it to Artifactory.
Triggering these workflows requires write access (or higher) to the conanfiles repo. All the workflows authenticate to Artifactory using the JFROG_USERNAME2 and JFROG_PASSWORD2 GitHub repository secrets (configured in Settings → Secrets and variables → Actions).
Downloads a package from ConanCenter (upstream) and re-uploads it (with all transitive deps) to JFrog Artifactory. Used when you want a vanilla upstream package mirrored into your private registry.
Inputs:
| Input | Required | Description |
|---|---|---|
package |
Yes | Package name (e.g. zlib) |
version |
Yes | Package version (e.g. 1.3.1) |
repository |
No | Target Artifactory repository: production or testing (default: production) |
Job: sync-conan-package
| Step | Command | Description |
|---|---|---|
| Install Conan | pip install --user conan==2.25.1 |
Install Conan 2.25.1 and detect default profile |
| Sync to Artifactory | ./scripts/sync-to-artifactory.sh |
Delegates to scripts/sync-to-artifactory.sh with workflow inputs passed as arguments (see scripts/sync-to-artifactory.sh for details) |
Builds a package from a local recipe in this repo (custom/patched), then uploads it to Artifactory. Used for Milvus-specific recipes that differ from upstream.
When triggering the workflow from the GitHub Actions page (Run workflow button), you can configure the following:
- Use workflow from (branch/tag) — the built-in GitHub Actions selector for which branch or tag's workflow and recipes to use
- The input fields listed below
Inputs:
| Input | Required | Description |
|---|---|---|
package |
Yes | Package name (e.g. folly) |
version |
Yes | Package version (e.g. 2024.08.12.00) |
conanfile_path |
Yes | Relative path to conanfile.py within the package dir (default: all/conanfile.py) |
repository |
No | Target Artifactory repository: production or testing (default: production) |
user_channel |
No | User/channel for the package (e.g. milvus/dev) |
extra_options |
No | Extra conan options (e.g. -o pkg:opt=val -c conf=val) |
upload_binaries |
No | Also upload the target package's binary packages: yes/no (default no) |
Job: build-and-push
| Step | Command | Description |
|---|---|---|
| Install Conan and dependencies | pip install --user conan==2.25.1 pyyaml |
Install Conan 2.25.1, pyyaml, and detect default profile |
| Build and push | ./scripts/build-and-push.sh |
Delegates to scripts/build-and-push.sh with workflow inputs passed as arguments (see scripts/build-and-push.sh for details) |
Builds a package from a local recipe without uploading anything to Artifactory. Used to validate recipes on different OS before publishing. Besides the runner's native compiler, it can also install and build with a newer toolchain (gcc-16 or clang-23).
The build always runs under a hardcoded milvus/ci user/channel (never published), so conan create uses the local recipe instead of resolving a previously published @milvus/dev revision from the production remote.
Inputs:
| Input | Required | Description |
|---|---|---|
package |
Yes | Package name (e.g. milvus-common) |
version |
Yes | Package version (e.g. 1.0.0-28a2b48) |
conanfile_path |
Yes | Relative path to conanfile.py within the package dir (default: all/conanfile.py) |
runner |
Yes | GitHub-hosted runner: ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-15 or macos-26 |
compiler |
Yes | Toolchain: runner-native, gcc-11, gcc-12, gcc-13, gcc-14, gcc-15, gcc-16, clang-15, clang-16, clang-17, clang-19, clang-21, clang-22 or clang-23 (default: runner-native) |
source |
Yes | Recipe source: conanfiles (local recipes, default) or conancenter (build a ConanCenter package directly) |
extra_options |
No | Extra conan options (default: -s compiler.cppstd=20 -s:b compiler.cppstd=20 -c tools.system.package_manager:mode=install) |
Recipe sources:
| Source | Behavior |
|---|---|
conanfiles |
Builds the local recipe at recipes/<package>/<conanfile_path> via build-and-push.sh (milvus/ci channel, no upload). |
conancenter |
Resolves the recipe from ConanCenter and builds it with the selected compiler via conan install --requires=<package>/<version> --build=missing. Used to validate packages that have no conanfiles recipe (e.g. metis, liburing, catch2, hdf5, icu, openblas). |
Compiler options:
| Compiler | Behavior |
|---|---|
runner-native |
Uses conan profile detect from the selected runner for compiler/compiler version/libcxx. Recommended for ubuntu-24.04-arm and macos-15; add -s compiler.cppstd=<std> in extra_options when a recipe needs a different C++ standard. On ubuntu-22.04 this is gcc-11, matching the repo's production settings. |
gcc-11 |
Linux only: installs gcc-11/g++-11 (present in the ubuntu-22.04/24.04 apt repos; ubuntu-toolchain-r/test PPA otherwise) and builds with --settings-mode custom --compiler gcc --compiler-version 11 --libcxx libstdc++11, keeping the system libc headers. |
gcc-12 .. gcc-16 / clang-15 .. clang-23 |
Installs the requested toolchain (distro apt → ubuntu-toolchain-r/test PPA → Homebrew-on-Linux fallback for gcc; apt.llvm.org for Linux clang; Homebrew llvm@N for macOS clang) and builds with --settings-mode custom, using Conan 2.33.0 (the first release whose bundled settings support gcc 16 and clang 23). |
Custom toolchains:
| OS | gcc (11-16) | clang (15-23) |
|---|---|---|
| Ubuntu | distro apt (gcc-11/12) → ubuntu-toolchain-r/test PPA (gcc-13/14) → Homebrew-on-Linux (gcc@15/gcc@16) |
apt.llvm.org (clang-15..clang-23) |
| macOS | Homebrew (gcc@11..gcc@16) |
Homebrew (llvm@15..llvm@23) |
Job: try-build
| Step | Command | Description |
|---|---|---|
| Install Conan and dependencies | python -m pip install conan==2.33.0 pyyaml |
Conan 2.33.0 (first release whose bundled settings support gcc 16 and clang 23; its settings cover gcc 11-16 and clang 15-23), then detect the runner profile |
| Install toolchain | — | Installs the requested gcc/clang toolchain when a non-native compiler is selected |
| Try build | ./scripts/build-and-push.sh --user-channel milvus/ci --settings-mode <mode> --repository testing --no-upload |
Builds the local recipe through the standard script but skips Artifactory upload |
Example inputs for milvus-common:
| Input | Value |
|---|---|
package |
milvus-common |
version |
1.0.0-28a2b48 |
conanfile_path |
all/conanfile.py |
runner |
ubuntu-24.04-arm |
compiler |
runner-native |
extra_options |
-s compiler.cppstd=20 -s:b compiler.cppstd=20 -c tools.system.package_manager:mode=install |
Builds all 56 Milvus C++ dependencies from this repo's recipes in the correct dependency order, using conan create with Milvus-specific settings and options. Packages are built in 8 phases, from foundational libraries (zlib, lz4) up to complex ones (arrow, folly). This was run once during the initial population of the default-conan-local2 Artifactory.
See MILVUS_DEPENS.md for the full Milvus dependency graph (resolved from milvus/internal/core/conanfile.py), including version pins, custom @milvus/dev channel packages, and build order.
Usage:
./scripts/build-milvus-deps.sh # build only
./scripts/build-milvus-deps.sh --upload # build and upload recipes to ArtifactoryBuild settings:
- Compiler: gcc 11, libstdc++11, C++17, Release
- Parallel jobs: 6
- CMake compatibility:
CMAKE_POLICY_VERSION_MINIMUM=3.5(for CMake 4.x)
Upload: When --upload is specified, built recipes are uploaded to the default-conan-local2 Artifactory remote. Requires JFROG_USERNAME2 and JFROG_PASSWORD2 environment variables (or prompts interactively).
Builds a single Conan package from this repo's recipes and uploads the recipe and its dependencies (recipe-only) to JFrog Artifactory. Uses the conan create --format=json build graph to determine exactly which packages to upload, so it is safe to run locally without uploading unrelated packages from the cache. Supports both production and testing remotes. This script is also used by the build-and-push.yml GitHub Actions workflow.
Usage:
./scripts/build-and-push.sh <package> <version> [options]Options:
| Option | Description |
|---|---|
--conanfile <path> |
Relative path to conanfile.py within the package dir (default: all/conanfile.py) |
--user-channel <u/c> |
User/channel for the package (e.g. milvus/dev) |
--extra-options <opts> |
Extra conan options (e.g. -o pkg:opt=val) |
--settings-mode <mode> |
Conan settings mode: linux-gcc-11, runner-default or custom (default: linux-gcc-11) |
--compiler <compiler> |
Custom compiler type for --settings-mode custom: gcc or clang |
--compiler-version <v> |
Custom compiler version for --settings-mode custom (e.g. 16, 23) |
--libcxx <libcxx> |
Custom libcxx for --settings-mode custom; defaults to libstdc++11 (libc++ for clang on macOS) |
--repository <repo> |
Target Artifactory repository: production or testing (default: production) |
--no-upload |
Build only, skip uploading to Artifactory |
--upload-binaries |
Also upload the target package's binary packages (default: recipe-only upload) |
Examples:
./scripts/build-and-push.sh zlib 1.3.1
./scripts/build-and-push.sh protobuf 5.27.0 --user-channel milvus/dev
./scripts/build-and-push.sh protobuf 5.27.0 --user-channel milvus/dev --repository testing
./scripts/build-and-push.sh folly 2024.08.12.00 --conanfile v2024/conanfile.py --user-channel milvus/dev --extra-options "-o folly/*:shared=True"
./scripts/build-and-push.sh milvus-common 1.0.0-28a2b48 --user-channel milvus/dev --settings-mode runner-default --extra-options "-s compiler.cppstd=20" --no-upload
./scripts/build-and-push.sh zlib 1.3.1 --no-upload # build onlyAuthentication: Uploading to Artifactory requires JFROG_USERNAME2 and JFROG_PASSWORD2 environment variables (or prompts interactively).
Build metadata: After a successful upload, the script automatically sets the following properties on the uploaded recipe in JFrog Artifactory:
| Property | Description |
|---|---|
build.branch |
Current git branch name |
build.commit |
HEAD commit SHA of this repo |
build.datetime |
UTC timestamp of the build |
build.author |
Git author of the latest commit |
Downloads a package from ConanCenter (upstream) and uploads it along with all transitive dependencies (recipes and binaries) to JFrog Artifactory. Uses the conan install --format=json install graph to determine exactly which packages to upload, so it is safe to run locally without uploading unrelated packages from the cache. Supports both production and testing remotes. This script is also used by the sync-to-artifactory.yml GitHub Actions workflow.
Usage:
./scripts/sync-to-artifactory.sh <package> <version> [options]Options:
| Option | Description |
|---|---|
--repository <repo> |
Target Artifactory repository: production or testing (default: production) |
--no-upload |
Download only, skip uploading to Artifactory |
Examples:
./scripts/sync-to-artifactory.sh openssl 3.3.2
./scripts/sync-to-artifactory.sh libcurl 8.10.1 --repository testing
./scripts/sync-to-artifactory.sh prometheus-cpp 1.2.4 --no-upload # download onlyAuthentication: Uploading to Artifactory requires JFROG_USERNAME2 and JFROG_PASSWORD2 environment variables (or prompts interactively).
After a recipe is uploaded, you can browse it via the JFrog web UI:
- Production: https://milvus01.jfrog.io/ui/repos/tree/Properties/default-conan-local2
- Testing: https://milvus01.jfrog.io/ui/repos/tree/Properties/testing2
Navigate to a recipe's conanfile.py and open the Properties tab to see the build metadata (build.author, build.branch, build.commit, build.datetime).
Example: folly/2024.08.12.00@milvus/dev properties: