diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index a4ad20710b..9fad4198e9 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -172,6 +172,8 @@ jobs: cmake -DOpenVINODeveloperPackage_DIR=${{ env.OV_INSTALL_DIR }}/developer_package/cmake \ -DENABLE_PYTHON=OFF \ -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ + -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \ + -DCMAKE_C_COMPILER_LAUNCHER=sccache \ -S ${{ env.SRC_DIR }} \ -B ${{ env.BUILD_DIR }} cmake --build ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --parallel $(nproc) --verbose @@ -192,6 +194,8 @@ jobs: cmake -DOpenVINODeveloperPackage_DIR=${{ env.OV_INSTALL_DIR }}/developer_package/cmake \ -DENABLE_PYTHON=ON \ -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ + -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \ + -DCMAKE_C_COMPILER_LAUNCHER=sccache \ -S ${{ env.SRC_DIR }} \ -B ${{ env.BUILD_DIR }} echo "Configuring cmake done for python$py_version" @@ -240,10 +244,10 @@ jobs: path: ${{ env.MANIFEST_PATH }} if-no-files-found: 'error' - genai_build_wheel: - name: Build Wheel + genai_build_wheels: + name: Build Tokenizers & WWB Wheels needs: [ openvino_download ] - timeout-minutes: 90 + timeout-minutes: 30 defaults: run: shell: bash @@ -255,12 +259,11 @@ jobs: - ${{ github.workspace }}:${{ github.workspace }} options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING env: - CMAKE_GENERATOR: Unix Makefiles + CMAKE_GENERATOR: Ninja OV_INSTALL_DIR: ${{ github.workspace }}/ov INSTALL_DIR: ${{ github.workspace }}/install WHEELS_DIR: ${{ github.workspace }}/install/wheels SRC_DIR: ${{ github.workspace }}/src - OpenVINODeveloperPackage_DIR: ${{ github.workspace }}/ov/developer_package/cmake steps: - name: Clone openvino.genai @@ -276,21 +279,12 @@ jobs: path: ${{ env.OV_INSTALL_DIR }} merge-multiple: true - - name: Set CI environment - id: create_manifest - uses: openvinotoolkit/openvino/.github/actions/create_manifest@master - with: - repos: ${{ env.SRC_DIR }} - product_type: ${{ env.BASE_PRODUCT_TYPE }}_Release - target_arch: 'x86_64' - build_type: Release - save_to: ${{ github.workspace }} - - name: Build Tokenizers Wheel run: | python -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} \ --config-settings='override=wheel.build_tag="${{ github.run_number }}"' \ --config-settings=override=cross.arch="manylinux_2_31_x86_64" \ + --config-settings=cmake.args="-DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache" \ ${{ needs.openvino_download.outputs.ov_wheel_source }} \ ${{ env.SRC_DIR }}/thirdparty/openvino_tokenizers working-directory: ${{ env.OV_INSTALL_DIR }} @@ -298,24 +292,85 @@ jobs: - name: Build WWB Wheel run: python -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} ${{ env.SRC_DIR }}/tools/who_what_benchmark working-directory: ${{ env.OV_INSTALL_DIR }} + + - name: Upload Wheels + if: ${{ always() }} + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + with: + name: genai_wheels + path: ${{ env.INSTALL_DIR }} + if-no-files-found: 'error' + + genai_build_genai_wheel: + name: Build GenAI Wheel - Python ${{ matrix.python-version }} + needs: [ openvino_download ] + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + python-version: ['3.10', '3.11', '3.12', '3.13'] + defaults: + run: + shell: bash + runs-on: aks-linux-8-cores-16gb + container: + image: openvinogithubactions.azurecr.io/ov_build/ubuntu_22_04_x64:${{ needs.openvino_download.outputs.docker_tag }} + volumes: + - /mount:/mount + - ${{ github.workspace }}:${{ github.workspace }} + options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING + env: + CMAKE_GENERATOR: Ninja + OV_INSTALL_DIR: ${{ github.workspace }}/ov + INSTALL_DIR: ${{ github.workspace }}/install + WHEELS_DIR: ${{ github.workspace }}/install/wheels + SRC_DIR: ${{ github.workspace }}/src + OpenVINODeveloperPackage_DIR: ${{ github.workspace }}/ov/developer_package/cmake + steps: + - name: Clone openvino.genai + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + with: + path: ${{ env.SRC_DIR }} + submodules: recursive + + - name: Download OpenVINO package + uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 + with: + name: ${{ needs.openvino_download.outputs.ov_artifact_name }} + path: ${{ env.OV_INSTALL_DIR }} + merge-multiple: true + + - name: Set CI environment + id: create_manifest + uses: openvinotoolkit/openvino/.github/actions/create_manifest@master + with: + repos: ${{ env.SRC_DIR }} + product_type: ${{ env.BASE_PRODUCT_TYPE }}_Release + target_arch: 'x86_64' + build_type: Release + save_to: ${{ github.workspace }} + - name: Clean sccache stats + run: ${SCCACHE_PATH} --zero-stats + - name: Build GenAI Wheel run: | - for py_version in "3.10" "3.11" "3.12" "3.13" - do - python_exec_path=$(python$py_version -c "import sys; print(sys.executable)") - $python_exec_path -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} \ - --config-settings=override=cross.arch="manylinux_2_31_x86_64" \ - ${{ needs.openvino_download.outputs.ov_wheel_source }} \ - ${{ env.SRC_DIR }} - done + python_exec_path=$(python${{ matrix.python-version }} -c "import sys; print(sys.executable)") + $python_exec_path -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} \ + --config-settings=override=cross.arch="manylinux_2_31_x86_64" \ + --config-settings=cmake.args="-DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache" \ + ${{ needs.openvino_download.outputs.ov_wheel_source }} \ + ${{ env.SRC_DIR }} working-directory: ${{ env.OV_INSTALL_DIR }} - - name: Upload Wheels + - name: Show sccache stats + run: ${SCCACHE_PATH} --show-stats + + - name: Upload GenAI Wheel if: ${{ always() }} uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: - name: ${{ env.GENAI_WHEELS_ARTIFACT_NAME }} + name: genai_wheel_python_${{ matrix.python-version }} path: ${{ env.INSTALL_DIR }} if-no-files-found: 'error' @@ -324,7 +379,7 @@ jobs: strategy: matrix: build-type: [Release] - needs: [openvino_download, genai_build_wheel, genai_build_cmake] + needs: [openvino_download, genai_build_wheels, genai_build_genai_wheel, genai_build_cmake] timeout-minutes: 10 defaults: run: @@ -355,7 +410,7 @@ jobs: - name: Download manifest and wheels uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 with: - pattern: '{${{ env.GENAI_WHEELS_ARTIFACT_NAME }},manifest_${{ matrix.build-type }}}' + pattern: '{genai_wheels,genai_wheel_python_*,manifest_${{ matrix.build-type }}}' path: ${{ github.workspace }} merge-multiple: true @@ -427,7 +482,10 @@ jobs: if: ${{ 'Release' != matrix.build-type }} run: | source ${{ env.OV_INSTALL_DIR }}/setupvars.sh - cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ${{ env.OV_INSTALL_DIR }}/samples/cpp/ -B ${{ env.BUILD_DIR }} + cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ + -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \ + -DCMAKE_C_COMPILER_LAUNCHER=sccache \ + -S ${{ env.OV_INSTALL_DIR }}/samples/cpp/ -B ${{ env.BUILD_DIR }} cmake --build ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --parallel $(nproc) cmake --install ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --component samples_bin --prefix ${{ env.INSTALL_DIR }} @@ -486,6 +544,8 @@ jobs: run: | source ${{ env.OV_INSTALL_DIR }}/setupvars.sh cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ + -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \ + -DCMAKE_C_COMPILER_LAUNCHER=sccache \ -DENABLE_JS=ON -DCPACK_GENERATOR=NPM \ -DENABLE_PYTHON=OFF -DENABLE_WHEEL=OFF \ -S ${{ env.SRC_DIR }} -B ${{ env.BUILD_DIR }} @@ -502,7 +562,7 @@ jobs: genai_tests_wheel: name: Python (${{ matrix.test.name}}) Tests (wheel) - needs: [ smart_ci, openvino_download, genai_build_wheel ] + needs: [ smart_ci, openvino_download, genai_build_wheels, genai_build_genai_wheel ] timeout-minutes: ${{ matrix.test.timeout }} strategy: fail-fast: false @@ -579,7 +639,7 @@ jobs: if: ${{ matrix.test.run_condition }} uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 with: - pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_wheels}" + pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_wheels,genai_wheel_python_*}" path: ${{ env.INSTALL_DIR }} merge-multiple: true @@ -598,7 +658,7 @@ jobs: genai_samples_tests: name: Samples ${{ matrix.test.name }} (${{ matrix.build-type }}) - needs: [ smart_ci, openvino_download, genai_build_cmake, genai_build_wheel, genai_build_samples, genai_build_nodejs ] + needs: [ smart_ci, openvino_download, genai_build_cmake, genai_build_wheels, genai_build_genai_wheel, genai_build_samples, genai_build_nodejs ] strategy: fail-fast: false matrix: @@ -671,7 +731,7 @@ jobs: if: ${{ matrix.test.run_condition }} uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 with: - pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_archive_${{ matrix.build-type }},genai_samples_${{ matrix.build-type }},genai_wheels}" + pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_archive_${{ matrix.build-type }},genai_samples_${{ matrix.build-type }},genai_wheels,genai_wheel_python_*}" path: ${{ env.INSTALL_DIR }} merge-multiple: true @@ -735,7 +795,7 @@ jobs: fail-fast: false matrix: build-type: [Release] - needs: [ smart_ci, openvino_download, genai_build_cmake, genai_build_wheel ] + needs: [ smart_ci, openvino_download, genai_build_cmake, genai_build_wheels, genai_build_genai_wheel ] if: ${{ fromJSON(needs.smart_ci.outputs.affected_components).llm_bench || fromJSON(needs.smart_ci.outputs.affected_components).continuous_batching }} timeout-minutes: 90 defaults: @@ -764,7 +824,7 @@ jobs: - name: Download Build Artifacts uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 with: - pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_archive_${{ matrix.build-type }},genai_tools_${{ matrix.build-type }},genai_tests_${{ matrix.build-type }},genai_wheels}" + pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_archive_${{ matrix.build-type }},genai_tools_${{ matrix.build-type }},genai_tests_${{ matrix.build-type }},genai_wheels,genai_wheel_python_*}" path: ${{ env.INSTALL_DIR }} merge-multiple: true @@ -875,7 +935,7 @@ jobs: genai_xgrammar_off_tests: name: Build & Test when ENABLE_XGRAMMAR=OFF - needs: [smart_ci, openvino_download, genai_build_wheel] + needs: [smart_ci, openvino_download, genai_build_wheels] timeout-minutes: 45 defaults: run: @@ -915,6 +975,8 @@ jobs: -DENABLE_XGRAMMAR=OFF \ -BUILD_TOKENIZERS=OFF \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \ + -DCMAKE_C_COMPILER_LAUNCHER=sccache \ -S ${{ env.SRC_DIR}} \ -B ${{ env.BUILD_DIR }} cmake --build ${{ env.BUILD_DIR}} --config Release --parallel $(nproc) --target py_openvino_genai --verbose @@ -935,7 +997,7 @@ jobs: Overall_Status: name: ci/gha_overall_status_linux - needs: [smart_ci, openvino_download, genai_build_cmake, genai_build_wheel, genai_build_samples, genai_build_nodejs, genai_tests_wheel, genai_samples_tests, genai_tools_tests, genai_nodejs_tests, genai_xgrammar_off_tests] + needs: [smart_ci, openvino_download, genai_build_cmake, genai_build_wheels, genai_build_genai_wheel, genai_build_samples, genai_build_nodejs, genai_tests_wheel, genai_samples_tests, genai_tools_tests, genai_nodejs_tests, genai_xgrammar_off_tests] if: ${{ always() }} runs-on: ubuntu-latest steps: diff --git a/.github/workflows/manylinux_2_28.yml b/.github/workflows/manylinux_2_28.yml index 1be636623b..6725cacd6b 100644 --- a/.github/workflows/manylinux_2_28.yml +++ b/.github/workflows/manylinux_2_28.yml @@ -231,10 +231,10 @@ jobs: path: ${{ env.MANIFEST_PATH }} if-no-files-found: 'error' - genai_build_wheel: - name: Build Wheel + genai_build_wheels: + name: Build Tokenizers & WWB Wheels needs: [ openvino_download ] - timeout-minutes: 90 + timeout-minutes: 30 defaults: run: shell: bash @@ -246,7 +246,66 @@ jobs: - ${{ github.workspace }}:${{ github.workspace }} options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING env: - CMAKE_GENERATOR: Unix Makefiles + CMAKE_GENERATOR: Ninja + OV_INSTALL_DIR: ${{ github.workspace }}/ov + INSTALL_DIR: ${{ github.workspace }}/install + WHEELS_DIR: ${{ github.workspace }}/install/wheels + SRC_DIR: ${{ github.workspace }}/src + + steps: + - name: Clone openvino.genai + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + with: + path: ${{ env.SRC_DIR }} + submodules: recursive + + - name: Download OpenVINO package + uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 + with: + name: ${{ needs.openvino_download.outputs.ov_artifact_name }} + path: ${{ env.OV_INSTALL_DIR }} + merge-multiple: true + + - name: Build Tokenizers Wheel + run: | + python -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} \ + --config-settings='override=wheel.build_tag="${{ github.run_number }}"' \ + ${{ needs.openvino_download.outputs.ov_wheel_source }} \ + ${{ env.SRC_DIR }}/thirdparty/openvino_tokenizers + working-directory: ${{ env.OV_INSTALL_DIR }} + + - name: Build WWB Wheel + run: python -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} ${{ env.SRC_DIR }}/tools/who_what_benchmark + working-directory: ${{ env.OV_INSTALL_DIR }} + + - name: Upload Wheels + if: ${{ always() }} + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + with: + name: genai_wheels + path: ${{ env.INSTALL_DIR }} + if-no-files-found: 'error' + + genai_build_genai_wheel: + name: Build GenAI Wheel - Python ${{ matrix.python-version }} + needs: [ openvino_download ] + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + python-version: ['3.10', '3.11', '3.12', '3.13'] + defaults: + run: + shell: bash + runs-on: aks-linux-8-cores-16gb + container: + image: openvinogithubactions.azurecr.io/ov_build/manylinux_2_28:${{ needs.openvino_download.outputs.docker_tag }} + volumes: + - /mount:/mount + - ${{ github.workspace }}:${{ github.workspace }} + options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING + env: + CMAKE_GENERATOR: Ninja OV_INSTALL_DIR: ${{ github.workspace }}/ov INSTALL_DIR: ${{ github.workspace }}/install WHEELS_DIR: ${{ github.workspace }}/install/wheels @@ -277,34 +336,19 @@ jobs: build_type: Release save_to: ${{ github.workspace }} - - name: Build Tokenizers Wheel - run: | - python -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} \ - --config-settings='override=wheel.build_tag="${{ github.run_number }}"' \ - ${{ needs.openvino_download.outputs.ov_wheel_source }} \ - ${{ env.SRC_DIR }}/thirdparty/openvino_tokenizers - working-directory: ${{ env.OV_INSTALL_DIR }} - - name: Build GenAI Wheel run: | - for py_version in "3.10" "3.11" "3.12" "3.13" - do - python_exec_path=$(python$py_version -c "import sys; print(sys.executable)") - $python_exec_path -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} \ - ${{ needs.openvino_download.outputs.ov_wheel_source }} \ - ${{ env.SRC_DIR }} - done - working-directory: ${{ env.OV_INSTALL_DIR }} - - - name: Build WWB Wheel - run: python -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} ${{ env.SRC_DIR }}/tools/who_what_benchmark + python_exec_path=$(python${{ matrix.python-version }} -c "import sys; print(sys.executable)") + $python_exec_path -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} \ + ${{ needs.openvino_download.outputs.ov_wheel_source }} \ + ${{ env.SRC_DIR }} working-directory: ${{ env.OV_INSTALL_DIR }} - - name: Upload Wheels + - name: Upload GenAI Wheel if: ${{ always() }} uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: - name: ${{ env.GENAI_WHEELS_ARTIFACT_NAME }} + name: genai_wheel_python_${{ matrix.python-version }} path: ${{ env.INSTALL_DIR }} if-no-files-found: 'error' @@ -377,7 +421,7 @@ jobs: strategy: matrix: build-type: [Release] - needs: [openvino_download, genai_build_wheel, genai_build_cmake, genai_build_nodejs] + needs: [openvino_download, genai_build_wheels, genai_build_genai_wheel, genai_build_cmake, genai_build_nodejs] timeout-minutes: 10 defaults: run: @@ -410,7 +454,7 @@ jobs: - name: Download manifest and wheels uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 with: - pattern: '{${{ env.GENAI_WHEELS_ARTIFACT_NAME }},manifest_${{ matrix.build-type }}}' + pattern: '{genai_wheels,genai_wheel_python_*,manifest_${{ matrix.build-type }}}' path: ${{ github.workspace }} merge-multiple: true @@ -440,7 +484,7 @@ jobs: genai_tests_wheel: name: Python (${{ matrix.test.name}}) Tests (wheel) - needs: [ smart_ci, openvino_download, genai_build_wheel ] + needs: [ smart_ci, openvino_download, genai_build_wheels, genai_build_genai_wheel ] timeout-minutes: ${{ matrix.test.timeout }} strategy: fail-fast: false @@ -517,7 +561,7 @@ jobs: if: ${{ matrix.test.run_condition }} uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 with: - pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_wheels}" + pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_wheels,genai_wheel_python_*}" path: ${{ env.INSTALL_DIR }} merge-multiple: true @@ -602,7 +646,7 @@ jobs: Overall_Status: name: ci/gha_overall_status_manylinux_2_28 - needs: [smart_ci, openvino_download, genai_build_cmake, genai_build_wheel, genai_build_nodejs, genai_tests_wheel, genai_nodejs_tests] + needs: [smart_ci, openvino_download, genai_build_cmake, genai_build_wheels, genai_build_genai_wheel, genai_build_nodejs, genai_tests_wheel, genai_nodejs_tests] if: ${{ always() }} runs-on: ubuntu-latest steps: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 93a03be433..ffa7d6ff17 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -283,22 +283,22 @@ jobs: path: ${{ env.MANIFEST_PATH }} if-no-files-found: 'error' - genai_build_wheel: - name: genai wheel + genai_build_wheels: + name: Build Tokenizers & WWB Wheels needs: [ openvino_download ] - timeout-minutes: 90 + timeout-minutes: 30 defaults: run: shell: pwsh runs-on: aks-win-8-cores-16gb env: + CMAKE_GENERATOR: Ninja OV_INSTALL_DIR: ${{ github.workspace }}\ov SRC_DIR: ${{ github.workspace }}\src BUILD_DIR: ${{ github.workspace }}\build INSTALL_DIR: ${{ github.workspace }}\genai WHEELS_DIR: ${{ github.workspace }}\genai\wheels CCACHE_DIR: ${{ github.workspace }}\ccache - OpenVINODeveloperPackage_DIR: ${{ github.workspace }}\install\ov\developer_package\cmake steps: - name: Clone openvino.genai @@ -338,24 +338,11 @@ jobs: id: ccache-restore uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: - key: ${{ runner.os }}-${{ runner.arch }}-ccache-${{ env.TARGET_BRANCH }}-Release-wheel-${{ github.sha }} + key: ${{ runner.os }}-${{ runner.arch }}-ccache-${{ env.TARGET_BRANCH }}-Release-wheels-${{ github.sha }} restore-keys: | - ${{ runner.os }}-${{ runner.arch }}-ccache-${{ env.TARGET_BRANCH }}-Release-wheel + ${{ runner.os }}-${{ runner.arch }}-ccache-${{ env.TARGET_BRANCH }}-Release-wheels path: ${{ env.CCACHE_DIR }} - - name: Set CI environment - id: create_manifest - uses: openvinotoolkit/openvino/.github/actions/create_manifest@master - with: - repos: ${{ env.SRC_DIR }} - product_type: ${{ env.BASE_PRODUCT_TYPE }}_Release - target_arch: 'x86_64' - build_type: Release - save_to: ${{ github.workspace }} - - # - # Build - # - name: Clean ccache stats run: ccache --zero-stats --show-config @@ -376,48 +363,124 @@ jobs: - name: Build WWB Wheel run: python -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} ${{ env.SRC_DIR }}/tools/who_what_benchmark working-directory: ${{ env.OV_INSTALL_DIR }} - - - name: Setup Python 3.10 - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 + + - name: Show ccache stats + run: ccache --show-stats + + - name: Save ccache + if: always() && steps.ccache-restore.outputs.cache-hit != 'true' && github.event_name == 'push' + uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: - python-version: '3.10' - cache: 'pip' - - - name: Setup Python 3.12 - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 + key: ${{ steps.ccache-restore.outputs.cache-primary-key }} + path: ${{ env.CCACHE_DIR }} + + - name: Upload wheels + if: ${{ always() }} + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: - python-version: '3.12' - cache: 'pip' + name: genai_wheels + path: ${{ env.INSTALL_DIR }} + if-no-files-found: 'error' + + genai_build_genai_wheel: + name: Build GenAI Wheel - Python ${{ matrix.python-version }} + needs: [ openvino_download ] + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + python-version: ['3.10', '3.11', '3.12', '3.13'] + defaults: + run: + shell: pwsh + runs-on: aks-win-8-cores-16gb + env: + CMAKE_GENERATOR: Ninja + OV_INSTALL_DIR: ${{ github.workspace }}\ov + SRC_DIR: ${{ github.workspace }}\src + BUILD_DIR: ${{ github.workspace }}\build + INSTALL_DIR: ${{ github.workspace }}\genai + WHEELS_DIR: ${{ github.workspace }}\genai\wheels + CCACHE_DIR: ${{ github.workspace }}\ccache + OpenVINODeveloperPackage_DIR: ${{ github.workspace }}\install\ov\developer_package\cmake + + steps: + - name: Clone openvino.genai + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + with: + submodules: recursive + path: ${{ env.SRC_DIR }} - - name: Setup Python 3.13 + - name: Setup Python ${{ matrix.python-version }} uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 with: - python-version: '3.13' + python-version: ${{ matrix.python-version }} cache: 'pip' + + - name: Download OpenVINO package + uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 + with: + name: ${{ needs.openvino_download.outputs.ov_artifact_name }} + path: ${{ env.OV_INSTALL_DIR }} + merge-multiple: true + + - name: Download and install ninja + run: | + Invoke-WebRequest https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip -OutFile ninja-win.zip -MaximumRetryCount 10 + Expand-Archive -Force ninja-win.zip + # Add it to the GitHub Path so it would be available in the subsequent steps + Add-Content -Path $env:GITHUB_PATH -Value "${{ github.workspace }}/ninja-win" + + - name: Download and install ccache + run: | + Invoke-WebRequest -Uri 'https://github.com/ccache/ccache/releases/download/v4.9.1/ccache-4.9.1-windows-x86_64.zip' -OutFile 'ccache.zip' + Expand-Archive -Path 'ccache.zip' -DestinationPath 'C:\temp\ccache' + Move-Item -Path 'C:\temp\ccache\*' -Destination 'C:\ccache' + Add-Content -Path $env:GITHUB_PATH -Value "C:\ccache" + + - name: Setup ccache + id: ccache-restore + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + with: + key: ${{ runner.os }}-${{ runner.arch }}-ccache-${{ env.TARGET_BRANCH }}-Release-genai-wheel-${{ matrix.python-version }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-${{ runner.arch }}-ccache-${{ env.TARGET_BRANCH }}-Release-genai-wheel-${{ matrix.python-version }} + path: ${{ env.CCACHE_DIR }} + + - name: Set CI environment + id: create_manifest + uses: openvinotoolkit/openvino/.github/actions/create_manifest@master + with: + repos: ${{ env.SRC_DIR }} + product_type: ${{ env.BASE_PRODUCT_TYPE }}_Release + target_arch: 'x86_64' + build_type: Release + save_to: ${{ github.workspace }} + + - name: Clean ccache stats + run: ccache --zero-stats --show-config + + - name: Configure Developer Command Prompt for Microsoft Visual C++ + uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 + with: + toolset: 14.42 # v2022 - name: Build genai wheel run: | - $pyVersions = '3.10', '3.11', '3.12', '3.13' - foreach ($pyVersion in $pyVersions) { - $pythonCommand = "py -$pyVersion -c `"import sys; print(f'{sys.executable}')`"" - $pythonExecutablePath = & cmd /c $pythonCommand - - & $pythonExecutablePath -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} ` - --config-settings=override=cmake.generator='Ninja' ` - --config-settings=override=cmake.build_path='${{ env.BUILD_DIR }}/genai' ` - --config-settings='override=wheel.build_tag="${{ github.run_number }}"' ` - ${{ needs.openvino_download.outputs.ov_wheel_source }} ` - ${{ env.SRC_DIR }} - } + $pythonCommand = "py -${{ matrix.python-version }} -c `"import sys; print(f'{sys.executable}')`"" + $pythonExecutablePath = & cmd /c $pythonCommand + + & $pythonExecutablePath -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} ` + --config-settings=override=cmake.generator='Ninja' ` + --config-settings=override=cmake.build_path='${{ env.BUILD_DIR }}/genai' ` + --config-settings='override=wheel.build_tag="${{ github.run_number }}"' ` + ${{ needs.openvino_download.outputs.ov_wheel_source }} ` + ${{ env.SRC_DIR }} working-directory: ${{ env.OV_INSTALL_DIR }} - name: Show ccache stats run: ccache --show-stats - # - # Upload build artifacts - # - - name: Save ccache if: always() && steps.ccache-restore.outputs.cache-hit != 'true' && github.event_name == 'push' uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 @@ -425,11 +488,11 @@ jobs: key: ${{ steps.ccache-restore.outputs.cache-primary-key }} path: ${{ env.CCACHE_DIR }} - - name: Upload wheels + - name: Upload GenAI wheel if: ${{ always() }} uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: - name: genai_wheels + name: genai_wheel_python_${{ matrix.python-version }} path: ${{ env.INSTALL_DIR }} if-no-files-found: 'error' @@ -438,7 +501,7 @@ jobs: strategy: matrix: build-type: [Release] - needs: [openvino_download, genai_build_wheel, genai_build_cpack] + needs: [openvino_download, genai_build_wheels, genai_build_genai_wheel, genai_build_cpack] timeout-minutes: 10 defaults: run: @@ -463,7 +526,7 @@ jobs: - name: Download manifest and wheels uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 with: - pattern: '{${{ env.GENAI_WHEELS_ARTIFACT_NAME }},manifest_${{ matrix.build-type }}}' + pattern: '{genai_wheels,genai_wheel_python_*,manifest_${{ matrix.build-type }}}' path: ${{ github.workspace }} merge-multiple: true @@ -591,7 +654,7 @@ jobs: genai_tests_wheel: name: Python (${{ matrix.test.name}}) Tests (wheel) - needs: [ smart_ci, openvino_download, genai_build_wheel ] + needs: [ smart_ci, openvino_download, genai_build_wheels, genai_build_genai_wheel ] timeout-minutes: ${{ matrix.test.timeout }} strategy: fail-fast: false @@ -661,7 +724,7 @@ jobs: if: ${{ matrix.test.run_condition }} uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 with: - pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_wheels}" + pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_wheels,genai_wheel_python_*}" path: ${{ env.INSTALL_DIR }} merge-multiple: true @@ -723,7 +786,7 @@ jobs: runner: 'aks-win-4-cores-8gb' run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).Speech_generation_samples.test }} - needs: [ smart_ci, openvino_download, genai_build_cpack, genai_build_wheel, genai_build_samples, genai_build_nodejs ] + needs: [ smart_ci, openvino_download, genai_build_cpack, genai_build_wheels, genai_build_genai_wheel, genai_build_samples, genai_build_nodejs ] timeout-minutes: 120 defaults: run: @@ -748,7 +811,7 @@ jobs: if: ${{ matrix.test.run_condition }} uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 with: - pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_cpack_${{ matrix.build-type }},genai_samples_${{ matrix.build-type }},genai_wheels}" + pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_cpack_${{ matrix.build-type }},genai_samples_${{ matrix.build-type }},genai_wheels,genai_wheel_python_*}" path: ${{ env.INSTALL_DIR }} merge-multiple: true @@ -816,7 +879,7 @@ jobs: fail-fast: false matrix: build-type: [Release] - needs: [ smart_ci, openvino_download, genai_build_cpack, genai_build_wheel ] + needs: [ smart_ci, openvino_download, genai_build_cpack, genai_build_wheels, genai_build_genai_wheel ] if: ${{ fromJSON(needs.smart_ci.outputs.affected_components).continuous_batching }} timeout-minutes: 90 defaults: @@ -837,7 +900,7 @@ jobs: - name: Download Build Artifacts uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 with: - pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_cpack_${{ matrix.build-type }},genai_tools_${{ matrix.build-type }},genai_tests_${{ matrix.build-type }},genai_wheels}" + pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_cpack_${{ matrix.build-type }},genai_tools_${{ matrix.build-type }},genai_tests_${{ matrix.build-type }},genai_wheels,genai_wheel_python_*}" path: ${{ env.INSTALL_DIR }} merge-multiple: true @@ -927,7 +990,7 @@ jobs: Overall_Status: name: ci/gha_overall_status_windows - needs: [smart_ci, openvino_download, genai_build_cpack, genai_build_wheel, genai_build_samples, genai_tests_wheel, genai_tools_tests, genai_samples_tests, genai_build_nodejs, genai_nodejs_tests] + needs: [smart_ci, openvino_download, genai_build_cpack, genai_build_wheels, genai_build_genai_wheel, genai_build_samples, genai_tests_wheel, genai_tools_tests, genai_samples_tests, genai_build_nodejs, genai_nodejs_tests] if: ${{ always() }} runs-on: ubuntu-latest steps: