Skip to content

Commit 4cd1697

Browse files
Added deploy job to upload conan package.
1 parent 49925a0 commit 4cd1697

File tree

1 file changed

+91
-2
lines changed

1 file changed

+91
-2
lines changed

.github/workflows/build.yml

Lines changed: 91 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ jobs:
8383
# key: conan-${{ matrix.config.name }}-${{ matrix.build_type }}-${{ hashFiles('inference_client/conanfile.txt') }}
8484

8585
# if: steps.cache-venv.outputs.cache-hit != 'true'
86+
8687
- name: Setup Virtual Environment
8788
uses: ./.github/actions/shell
8889
with:
@@ -141,7 +142,6 @@ jobs:
141142

142143
# - name: Upload Codecov
143144
# if: ${{ matrix.build_type == 'Release' && matrix.config.name == 'ubuntu2204_gcc12' }}
144-
145145
# uses: codecov/codecov-action@v4
146146
# with:
147147
# files: './results/coverage/cobertura.xml'
@@ -165,7 +165,96 @@ jobs:
165165
python3 scripts/conan/create.py ${{ matrix.build_type }} ${{ matrix.config.compiler }} ${{ matrix.config.compiler_version }}
166166
env:
167167
CONAN_USER_HOME: ${{ github.workspace }}
168-
168+
169+
- uses: actions/upload-artifact@v4
170+
with:
171+
name: ${{ matrix.config.name }}-${{ matrix.build_type }}
172+
path: ${{ github.workspace }}/.conan
173+
if-no-files-found: error
174+
overwrite: true
175+
176+
deploy:
177+
needs: build
178+
strategy:
179+
fail-fast: false
180+
matrix:
181+
build_type: ['Debug', 'Release', 'RelWithDebInfo']
182+
config:
183+
# - name: windows2022_msvc2022
184+
# os: windows-2022
185+
# compiler: visual_studio
186+
# compiler_version: 17
187+
# setup_build_env: 'call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"'
188+
# activate_venv: 'call ".venv\\Scripts\\activate.bat"'
189+
190+
# - name: windows2019_msvc2019
191+
# os: windows-2019
192+
# compiler: visual_studio
193+
# compiler_version: 16
194+
# setup_build_env: 'call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"'
195+
# activate_venv: 'call ".venv\\Scripts\\activate.bat"'
196+
197+
- name: ubuntu2204_gcc12
198+
os: ubuntu-22.04
199+
compiler: gcc
200+
compiler_version: 12
201+
setup_build_env: ""
202+
activate_venv: 'source .venv/bin/activate'
203+
204+
- name: ubuntu2204_clang15
205+
os: ubuntu-22.04
206+
compiler: clang
207+
compiler_version: 15
208+
setup_build_env: ""
209+
activate_venv: 'source .venv/bin/activate'
210+
211+
- name: macos14_clang15
212+
os: macos-14
213+
compiler: clang
214+
compiler_version: 15
215+
setup_build_env: ""
216+
activate_venv: 'source .venv/bin/activate'
217+
218+
runs-on: ${{ matrix.config.os }}
219+
name: ${{ matrix.config.name }} ${{ matrix.build_type }}
220+
221+
steps:
222+
- name: Checkout repository
223+
uses: actions/checkout@v4
224+
with:
225+
submodules: true
226+
227+
- name: Set Python version
228+
if: matrix.config.os == 'windows-2022' || matrix.config.os == 'windows-2019' || matrix.config.os == 'ubuntu-22.04'
229+
uses: actions/setup-python@v5
230+
with:
231+
python-version: '3.10'
232+
architecture: 'x64'
233+
234+
- name: Set Python version
235+
if: matrix.config.os == 'macos-14'
236+
uses: actions/setup-python@v5
237+
with:
238+
python-version: '3.12'
239+
architecture: 'x64'
240+
241+
- name: Setup Virtual Environment
242+
uses: ./.github/actions/shell
243+
with:
244+
commands: |
245+
python3 -m venv .venv
246+
${{ matrix.config.activate_venv }}
247+
pip3 install -r scripts/requirements.txt
248+
conan remote add teiacare ${{ secrets.ARTIFACTORY_URL }}/teiacare --insert 0 --force
249+
conan user ${{ secrets.ARTIFACTORY_USERNAME }} -p ${{ secrets.ARTIFACTORY_PASSWORD }} -r teiacare
250+
env:
251+
CONAN_USER_HOME: ${{ github.workspace }}
252+
253+
- name: Download Conan cache artifacts
254+
uses: actions/download-artifact@v4
255+
with:
256+
name: ${{ matrix.config.name }}-${{ matrix.build_type }}
257+
169258
- name: Upload Conan Package
170259
uses: ./.github/actions/shell
171260
with:

0 commit comments

Comments
 (0)