1313 - ' .github/workflows/python-ci.yml'
1414
1515env :
16- CONAN_VERSION : " 1.64.0 "
16+ CONAN_VERSION : " 2.25.1 "
1717
1818jobs :
1919 lint :
@@ -55,27 +55,29 @@ jobs:
5555 - name : Set up uv
5656 uses : astral-sh/setup-uv@v4
5757
58+ # libaio-dev: Conan 2.x CMakeDeps doesn't propagate system_libs through shared
59+ # library targets, so libaio (required by folly) must be explicitly installed.
5860 - name : Install C++ dependencies
5961 run : |
6062 sudo apt-get update
61- sudo apt-get install -y cmake
63+ sudo apt-get install -y cmake libaio-dev
6264 pip install conan==${{ env.CONAN_VERSION }}
6365
64- - name : Setup Conan remote
65- run : |
66- if ! conan remote list | grep -q "default-conan-local"; then
67- conan remote add default-conan-local https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local --insert
68- fi
69- conan remote list
70-
7166 - name : Cache Conan packages
7267 uses : actions/cache@v4
7368 with :
74- path : ~/.conan
69+ path : ~/.conan2
7570 key : conan-cpp-${{ hashFiles('./cpp/conanfile.py') }}
7671 restore-keys : |
7772 conan-cpp-
7873
74+ - name : Setup Conan remote
75+ run : |
76+ conan profile detect --force
77+ # || true: Conan 2.x errors if the remote already exists (e.g. restored from cache)
78+ conan remote add default-conan-local2 https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local2 || true
79+ conan remote list
80+
7981 - name : Setup Rust
8082 id : rust-toolchain
8183 uses : dtolnay/rust-toolchain@stable
@@ -97,29 +99,43 @@ jobs:
9799 - name : Set library path
98100 run : |
99101 # Find all conan library directories and add to LD_LIBRARY_PATH
100- CONAN_LIB_PATHS=$(find ~/.conan/data -name "lib" -type d 2>/dev/null | grep "/package /" | tr '\n' ':')
102+ CONAN_LIB_PATHS=$(find ~/.conan2/p -name "lib" -type d 2>/dev/null | grep "/p /" | tr '\n' ':')
101103 # Remove trailing colon from CONAN_LIB_PATHS if present
102104 CONAN_LIB_PATHS="${CONAN_LIB_PATHS%:}"
103105 # Put CONAN_LIB_PATHS first to ensure conan-provided libraries (like newer liblzma) are preferred over system ones
104106 echo "LD_LIBRARY_PATH=${CONAN_LIB_PATHS}:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
105107
106108 # Find Conan's liblzma and preload it to override system liblzma
107- # We search for the shared library file directly across all xz_utils builds
108- CONAN_LZMA=$(find ~/.conan/data -path "*/xz_utils/*/package/*/lib/liblzma.so*" | head -n 1)
109+ CONAN_LZMA=$(find ~/.conan2/p -name "liblzma.so*" -path "*/lib/*" 2>/dev/null | head -n 1)
110+
111+ # Build LD_PRELOAD list for libraries that need to be forced at runtime
112+ PRELOAD_LIBS=""
109113
110114 if [ -n "$CONAN_LZMA" ]; then
111115 echo "Found Conan liblzma at: $CONAN_LZMA"
112- echo "LD_PRELOAD=$CONAN_LZMA" >> $GITHUB_ENV
113-
114116 echo "Checking symbol in $CONAN_LZMA:"
115117 nm -D "$CONAN_LZMA" | grep lzma_index_uncompressed_size || echo "Symbol NOT FOUND in Conan lib"
118+ PRELOAD_LIBS="$CONAN_LZMA"
116119 else
117120 echo "WARNING: Conan liblzma.so* not found! Verify xz_utils:shared=True"
118121 fi
119122
120123 echo "Checking system liblzma symbol:"
121124 nm -D /usr/lib/x86_64-linux-gnu/liblzma.so.5 2>/dev/null | grep lzma_index_uncompressed_size || echo "Symbol NOT FOUND in System lib"
122125
126+ # Preload libaio: folly (shared) uses io_submit but doesn't have libaio in DT_NEEDED
127+ LIBAIO=$(find /usr/lib -name "libaio.so*" 2>/dev/null | head -n 1)
128+ if [ -n "$LIBAIO" ]; then
129+ echo "Found libaio at: $LIBAIO"
130+ PRELOAD_LIBS="${PRELOAD_LIBS:+$PRELOAD_LIBS:}$LIBAIO"
131+ else
132+ echo "WARNING: libaio.so not found!"
133+ fi
134+
135+ if [ -n "$PRELOAD_LIBS" ]; then
136+ echo "LD_PRELOAD=$PRELOAD_LIBS" >> $GITHUB_ENV
137+ fi
138+
123139 echo "Configured LD_LIBRARY_PATH and LD_PRELOAD for runtime"
124140
125141 - name : Install Python package
@@ -133,7 +149,7 @@ jobs:
133149 ldconfig -p | grep lzma || echo "liblzma not in ldconfig, checking file system..."
134150 ls -la /usr/lib/x86_64-linux-gnu/liblzma* || true
135151 # Check glog dependencies
136- ldd ~/.conan/data/glog/0.7.1/_/_/package/*/lib/ libglog.so.2 2>/dev/null | head -20 || true
152+ find ~/.conan2/p -name " libglog.so*" -exec ldd {} \; 2>/dev/null | head -20 || true
137153
138154 - name : Run tests
139155 working-directory : ./python
0 commit comments