OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[GHA] Store mac artifacts per commit (#29086)
Mikhail Ryzhov8db08c140b9f
diff --git a/.github/actions/common/constants.py b/.github/actions/common/constants.pyindex f50f0de92db..2bfde48f126 100644--- a/.github/actions/common/constants.py+++ b/.github/actions/common/constants.py@@ -19,6 +19,7 @@ productTypes = ('public_windows_vs2022_release','public_windows_vs2022_debug','public_manylinux2014_x86_64_release',+ 'public_macos_x86_64_release',)ProductType = Enum('ProductType', {t.upper(): t for t in productTypes})@@ -44,4 +45,5 @@ PlatformMapping = {PlatformKey.UBUNTU22_X86_64: ProductType.PUBLIC_LINUX_UBUNTU_22_04_X86_64_RELEASE,PlatformKey.UBUNTU24_X86_64: ProductType.PUBLIC_LINUX_UBUNTU_24_04_X86_64_RELEASE,PlatformKey.WINDOWS_X86_64: ProductType.PUBLIC_WINDOWS_VS2022_RELEASE,+ PlatformKey.MACOS_12_6_X86_64: ProductType.PUBLIC_MACOS_X86_64_RELEASE,}diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.ymlindex ed48aa167c8..0ac163deb63 100644--- a/.github/workflows/mac.yml+++ b/.github/workflows/mac.yml@@ -33,12 +33,16 @@ permissions: read-allenv:PYTHON_VERSION: '3.11'+ MANIFEST_FILE: manifest.yml+ PRODUCT_TYPE: public_macos_x86_64_releasejobs:+Smart_CI:runs-on: ubuntu-latestoutputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"+ changed_components: "${{ steps.smart_ci.outputs.changed_components }}"skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"steps:- name: checkout action@@ -59,7 +63,7 @@ jobs:repo_token: ${{ secrets.GITHUB_TOKEN }}skip_when_only_listed_labels_set: 'docs'skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg'-+Build:needs: Smart_CItimeout-minutes: 150@@ -78,6 +82,7 @@ jobs:INSTALL_DIR: ${{ github.workspace }}/openvino_installINSTALL_DIR_JS: ${{ github.workspace }}/openvino_install/jsINSTALL_TEST_DIR: ${{ github.workspace }}/tests_install+ DEVELOPER_PACKAGE_DIR: ${{ github.workspace }}/developer_package_installINSTALL_WHEELS_DIR: ${{ github.workspace }}/install/wheelsBUILD_DIR: ${{ github.workspace }}/buildif: "!needs.smart_ci.outputs.skip_workflow"@@ -171,17 +176,22 @@ jobs:- name: Cmake install - OpenVINOrun: |- cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -P ${{ env.BUILD_DIR }}/cmake_install.cmake- cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_TEST_DIR }} -DCOMPONENT=tests -P ${{ env.BUILD_DIR }}/cmake_install.cmake+ cmake --install . --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_DIR }}+ cmake --install . --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_TEST_DIR }} --component tests+ cmake --install . --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.DEVELOPER_PACKAGE_DIR }} --component developer_package+ working-directory: ${{ env.BUILD_DIR }}- - name: Pack Artifacts- run: |- pushd ${{ env.INSTALL_DIR }}- tar -cvf - * | pigz > ${{ env.BUILD_DIR }}/openvino_package.tar.gz- popd- pushd ${{ env.INSTALL_TEST_DIR }}- tar -cvf - * | pigz > ${{ env.BUILD_DIR }}/openvino_tests.tar.gz- popd+ - name: Pack openvino_package+ run: tar -cvf - * | pigz > ${{ env.BUILD_DIR }}/openvino_package.tar.gz+ working-directory: ${{ env.INSTALL_DIR }}++ - name: Pack openvino_developer_package+ run: tar -cvf - * | pigz > ${{ env.BUILD_DIR }}/openvino_developer_package.tar.gz+ working-directory: ${{ env.DEVELOPER_PACKAGE_DIR }}++ - name: Pack openvino_tests+ run: tar -cvf - * | pigz > ${{ env.BUILD_DIR }}/openvino_tests.tar.gz+ working-directory: ${{ env.INSTALL_TEST_DIR }}# Setup additional Python versions for wheels building- name: Setup Python 3.9@@ -225,6 +235,18 @@ jobs:should-setup-pip-paths: 'false'self-hosted-runner: 'false'+ - name: Generate product manifest and set CI_BUILD_NUMBER & CI_BUILD_DEV_TAG+ id: create_manifest+ uses: ./openvino/.github/actions/create_manifest+ with:+ repos: |+ ${{ env.OPENVINO_REPO }}+ ${{ env.OPENVINO_CONTRIB_REPO }}+ product_type: ${{ env.PRODUCT_TYPE }}+ target_arch: ${{ runner.arch }}+ build_type: 'release'+ save_to: ${{ github.workspace }}/${{ env.MANIFEST_FILE }}+- name: Cmake & Build - OpenVINO Contribrun: |cmake \@@ -275,6 +297,15 @@ jobs:name: openvino_testspath: ${{ env.BUILD_DIR }}/openvino_tests.tar.gzif-no-files-found: 'error'++ - name: Upload openvino developer package+ if: ${{ always() }}+ uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0+ with:+ name: openvino_developer_package+ path: ${{ env.BUILD_DIR }}/openvino_developer_package.tar.gz+ if-no-files-found: 'error'+- name: Upload openvino js packageif: fromJSON(needs.smart_ci.outputs.affected_components).JS_APIuses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0@@ -282,6 +313,14 @@ jobs:name: openvino_js_packagepath: ${{ env.BUILD_DIR }}/openvino_js_package.tar.gzif-no-files-found: 'error'++ - name: Upload product manifest+ if: ${{ always() }}+ uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0+ with:+ name: openvino_package_manifest+ path: ${{ github.workspace }}/${{ env.MANIFEST_FILE }}+ if-no-files-found: 'error'Samples:needs: [ Build, Smart_CI ]@@ -377,3 +416,61 @@ jobs:with:runner: 'macos-13'python-version: '3.11'++ upload_artifacts:+ name: Upload OpenVINO artifacts+ timeout-minutes: 10+ needs: [Build, Smart_CI]+ defaults:+ run:+ shell: bash+ runs-on: aks-linux-2-cores-8gb+ container:+ image: 'openvinogithubactions.azurecr.io/library/python:3.12-slim'+ volumes:+ - /mount:/mount+ - ${{ github.workspace }}:${{ github.workspace }}+ env:+ OPENVINO_REPO: ${{ github.workspace }}/openvino+ OPENVINO_CONTRIB_REPO: ${{ github.workspace }}/openvino_contrib+ ARTIFACTS_DIR: ${{ github.workspace }}/artifacts+ WHEELS_DIR: ${{ github.workspace }}/wheels+ ARTIFACTS_SHARE: "/mount/build-artifacts"++ steps:+ - name: Checkout OpenVINO actions+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2+ timeout-minutes: 15+ with:+ sparse-checkout: |+ .github/actions/common+ .github/actions/store_artifacts+ path: ${{ env.OPENVINO_REPO }}++ - name: Download OpenVINO artifacts+ uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8+ with:+ pattern: "{openvino_package,openvino_developer_package,openvino_js_package,openvino_package_manifest}"+ path: ${{ env.ARTIFACTS_DIR }}+ merge-multiple: true++ - name: Download OpenVINO wheels+ uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8+ with:+ name: openvino_wheels+ path: ${{ env.WHEELS_DIR }}+ merge-multiple: true++ - name: Store artifacts to a shared drive+ id: store_artifacts+ if: ${{ always() }}+ uses: ./openvino/.github/actions/store_artifacts+ with:+ artifacts: |+ ${{ env.ARTIFACTS_DIR }}/${{ env.MANIFEST_FILE }}+ ${{ env.ARTIFACTS_DIR }}/openvino_package.tar.gz+ ${{ env.ARTIFACTS_DIR }}/openvino_developer_package.tar.gz+ ${{ env.WHEELS_DIR }}+ ${{ fromJSON(needs.smart_ci.outputs.affected_components).JS_API && format('{0}/openvino_js_package.tar.gz', env.ARTIFACTS_DIR) || '' }}+ storage_dir: ${{ env.PRODUCT_TYPE }}+ storage_root: ${{ env.ARTIFACTS_SHARE }}\ No newline at end of file