Skip to content

Commit 34fbdba

Browse files
committed
Migrate conan to 2.25.1
Signed-off-by: yhmo <yihua.mo@zilliz.com>
1 parent 937d93c commit 34fbdba

File tree

317 files changed

+3508
-6299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+3508
-6299
lines changed

.github/workflows/build-and-push.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,8 @@ jobs:
3838
build-and-push:
3939
runs-on: ubuntu-latest
4040
env:
41-
CONAN_REVISIONS_ENABLED: 1
4241
# the path of the conanfile.py
4342
PACKAGE_RECIPE_PATH: ${{ github.event.inputs.package }}/${{ github.event.inputs.conanfile_path }}
44-
# the package reference
45-
PACKAGE_REF: ${{ github.event.inputs.package }}/${{ github.event.inputs.version }}@${{ github.event.inputs.user_channel }}
4643
steps:
4744
- uses: actions/checkout@v4
4845
- uses: actions/setup-python@v5
@@ -51,17 +48,15 @@ jobs:
5148

5249
- name: Install Conan
5350
run: |
54-
pip install --user conan==1.65.0
51+
pip install --user conan==2.25.1
5552
conan --version
53+
conan profile detect
5654
5755
- name: Configure Conan remote
5856
run: |
59-
conan remote remove conancenter
60-
conan remote add default-conan-local https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local
61-
conan remote add testing https://milvus01.jfrog.io/artifactory/api/conan/testing
62-
63-
# make conancenter the lowest priority
64-
conan remote add conancenter https://center.conan.io
57+
conan remote add default-conan2-local https://milvus01.jfrog.io/artifactory/api/conan2/default-conan2-local --index 0
58+
conan remote add testing https://milvus01.jfrog.io/artifactory/api/conan2/testing --index 1
59+
# conancenter is added by default, keep it as lowest priority
6560
6661
- name: List remote Conan repositories
6762
run: |
@@ -91,8 +86,14 @@ jobs:
9186
9287
- name: build a package
9388
run: |
94-
95-
conan create $PACKAGE_RECIPE_PATH $PACKAGE_REF \
89+
USER_CHANNEL="${{ github.event.inputs.user_channel }}"
90+
USER_FLAGS=""
91+
if [ -n "$USER_CHANNEL" ]; then
92+
USER_FLAGS="--user=${USER_CHANNEL%%/*} --channel=${USER_CHANNEL#*/}"
93+
fi
94+
conan create $PACKAGE_RECIPE_PATH \
95+
--version=${{ github.event.inputs.version }} \
96+
$USER_FLAGS \
9697
--build=missing \
9798
-s compiler=gcc \
9899
-s compiler.version=11 \
@@ -104,18 +105,17 @@ jobs:
104105
105106
- name: inspect built package
106107
run: |
107-
conan search '*' --revisions
108+
conan list '*:*'
108109
109110
- name: Upload
110111
run: |
111-
112112
# upload all packages
113113
if [ "${{ github.event.inputs.repository }}" = "production" ]; then
114-
conan user -p ${{ secrets.JFROG_PASSWORD }} -r default-conan-local ${{ secrets.JFROG_USERNAME }}
114+
conan remote login default-conan2-local ${{ secrets.JFROG_USERNAME }} -p ${{ secrets.JFROG_PASSWORD }}
115115
# upload to production repository
116-
conan upload '*' -r default-conan-local -c
116+
conan upload '*' -r default-conan2-local -c
117117
else
118-
conan user -p ${{ secrets.JFROG_PASSWORD }} -r testing ${{ secrets.JFROG_USERNAME }}
118+
conan remote login testing ${{ secrets.JFROG_USERNAME }} -p ${{ secrets.JFROG_PASSWORD }}
119119
# upload to testing repository
120120
conan upload '*' -r testing -c
121121
fi

.github/workflows/sync-to-artifactory.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,48 +22,46 @@ jobs:
2222
sync-conan-package:
2323
runs-on: ubuntu-latest
2424
env:
25-
CONAN_REVISIONS_ENABLED: 1
26-
PACKAGE_REF: ${{ github.event.inputs.package }}/${{ github.event.inputs.version }}@
25+
PACKAGE_REF: ${{ github.event.inputs.package }}/${{ github.event.inputs.version }}
2726
steps:
2827
- uses: actions/checkout@v4
2928
- uses: actions/setup-python@v5
3029
with:
31-
python-version: '3.13'
30+
python-version: '3.13'
3231

3332
- name: Install Conan
3433
run: |
35-
pip install --user conan==1.65.0
34+
pip install --user conan==2.25.1
3635
conan --version
36+
conan profile detect
3737
3838
- name: Configure Conan remote
3939
run: |
4040
if [ "${{ github.event.inputs.repository }}" = "production" ]; then
41-
conan remote add artifactory https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local
41+
conan remote add artifactory https://milvus01.jfrog.io/artifactory/api/conan2/default-conan2-local
4242
else
4343
# for testing purpose
44-
conan remote add artifactory https://milvus01.jfrog.io/artifactory/api/conan/testing
44+
conan remote add artifactory https://milvus01.jfrog.io/artifactory/api/conan2/testing
4545
fi
46-
47-
# List remote Conan repositories; should include Conan Center by default
46+
# conancenter is added by default
4847
conan remote list
4948
5049
- name: Install package
5150
run: |
52-
conan install $PACKAGE_REF \
51+
conan install --requires=$PACKAGE_REF \
5352
-s compiler=gcc \
5453
-s compiler.version=11 \
5554
-s compiler.libcxx=libstdc++11 \
5655
-s build_type=Release
5756
5857
- name: inspect installed package
5958
run: |
60-
# Search for installed packages and their revisions
61-
conan search '*' --revisions
59+
# List installed packages and their revisions
60+
conan list '*:*'
6261
6362
- name: Upload
6463
run: |
65-
conan user -p ${{ secrets.JFROG_PASSWORD }} -r artifactory ${{ secrets.JFROG_USERNAME }}
64+
conan remote login artifactory ${{ secrets.JFROG_USERNAME }} -p ${{ secrets.JFROG_PASSWORD }}
6665
67-
# upload all packages
68-
# Upload only the Conan recipe to the specified local repository, excluding binaries
69-
conan upload '*' -r artifactory -c
66+
# upload all packages (recipes and binaries)
67+
conan upload '*' -r artifactory -c

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
1+
__pycache__/
12
.docker/
23
**/build
34
**/build-release
45
**/build-aux
56
velox/all/source_subfolder
7+
8+
# CMake
9+
CMakeUserPresets.json
10+
11+
# Conan build artifacts (generated by conan create / test_package)
12+
**/test_package/conanbuild.sh
13+
**/test_package/conanrun.sh
14+
**/test_package/conanbuildenv-*.sh
15+
**/test_package/conanrunenv-*.sh
16+
**/test_package/deactivate_*.sh
17+
18+
# Autotools generated files
19+
**/test_package/src/Makefile.in
20+
**/test_package/src/aclocal.m4
21+
**/test_package/src/autom4te.cache/
22+
**/test_package/src/config.h.in
23+
**/test_package/src/config.h.in~
24+
**/test_package/src/configure
25+
**/test_package/src/configure~
26+
27+
# M4 test artifacts
28+
**/test_package/input.m4
29+
30+
# Conan env scripts (root level)
31+
conanbuild.sh
32+
conanbuildenv-*.sh
33+
conanrun.sh
34+
conanrunenv-*.sh
35+
deactivate_conanbuild.sh
36+
deactivate_conanrun.sh

0 commit comments

Comments
 (0)