-
Notifications
You must be signed in to change notification settings - Fork 11
83 lines (68 loc) · 2.41 KB
/
build-and-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: build and push
description: build a conan package and push it to artifactory
on:
workflow_dispatch:
inputs:
package:
description: 'package name'
required: true
version:
description: 'package version'
required: true
conanfile_path:
description: 'the conanfile.py path of the package '
required: true
default: 'all/conanfile.py'
repository:
description: 'Choose Artifactory repository'
required: false
type: choice
options:
- production
- testing
default: 'testing'
user_channel:
description: 'define the user and channel for the package '
required: false
default: ''
jobs:
build-and-push:
runs-on: ubuntu-latest
env:
CONAN_REVISIONS_ENABLED: 1
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install Conan
run: |
pip install --user conan==1.65.0
conan --version
- name: Configure Conan remote
run: |
conan remote remove conan-center
conan remote add default-conan-local https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local
conan remote add testing https://milvus01.jfrog.io/artifactory/api/conan/testing
# make conan-center the lowest priority
conan remote add conan-center https://center.conan.io
- name: List remote Conan repositories
run: |
# List remote Conan repositories
conan remote list
- name: build a package
run: |
conanfile_path="${{ github.event.inputs.package }}/${{ github.event.inputs.conanfile_path }}"
conan create $conanfile_path ${{ github.event.inputs.package }}/${{ github.event.inputs.version }}@ --build=missing -s compiler=gcc -s compiler.version=11 -s compiler.libcxx=libstdc++11 -s build_type=Release
- name: inspect built package
run: |
conan search '*' --revisions
- name: Upload
run: |
conan user -p ${{ secrets.JFROG_PASSWORD }} -r artifactory ${{ secrets.JFROG_USERNAME }}
# upload all packages
if [ "${{ github.event.inputs.repository }}" = "production" ]; then
conan upload '*' -r artifactory -c
else
conan upload '*' -r testing -c
fi