From 57d3e7e71b39429ff06ad73bdc0fbbfd796d0925 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 18 Nov 2025 12:27:36 +0100 Subject: [PATCH 01/10] use sccache --- .github/workflows/linux.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 7ec5890f3c..c9e67e0b96 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" @@ -291,6 +295,7 @@ jobs: 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 }} @@ -306,6 +311,7 @@ jobs: 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" \ + --config-settings=cmake.args="-DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache" \ ${{ needs.openvino_download.outputs.ov_wheel_source }} \ ${{ env.SRC_DIR }} done @@ -427,7 +433,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 +495,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 }} @@ -915,6 +926,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 From 933df05d8729aa924a905c24345b48dc66f1dba9 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 18 Nov 2025 14:20:52 +0100 Subject: [PATCH 02/10] use parallel --- .github/workflows/linux.yml | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index c9e67e0b96..8c8e4930fa 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -306,15 +306,39 @@ jobs: - name: Build GenAI Wheel run: | + # Build wheels in parallel for all Python versions + pids=() 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" \ - --config-settings=cmake.args="-DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache" \ - ${{ needs.openvino_download.outputs.ov_wheel_source }} \ - ${{ env.SRC_DIR }} + ( + echo "Starting build for Python $py_version" + $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 }} 2>&1 | tee ${{ env.WHEELS_DIR }}/build_py${py_version}.log + echo "Completed build for Python $py_version" + ) & + pids+=($!) done + + # Wait for all builds to complete and check exit codes + failed=0 + for i in "${!pids[@]}"; do + pid=${pids[$i]} + if wait $pid; then + echo "Build $i (PID $pid) succeeded" + else + echo "Build $i (PID $pid) failed" + failed=1 + fi + done + + if [ $failed -eq 1 ]; then + echo "One or more builds failed" + exit 1 + fi working-directory: ${{ env.OV_INSTALL_DIR }} - name: Upload Wheels From 151574f9b8174ffbe87248f56cc2df69975f813c Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Wed, 19 Nov 2025 12:40:53 +0100 Subject: [PATCH 03/10] Revert "use parallel" This reverts commit 933df05d8729aa924a905c24345b48dc66f1dba9. --- .github/workflows/linux.yml | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 8c8e4930fa..c9e67e0b96 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -306,39 +306,15 @@ jobs: - name: Build GenAI Wheel run: | - # Build wheels in parallel for all Python versions - pids=() 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)") - ( - echo "Starting build for Python $py_version" - $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 }} 2>&1 | tee ${{ env.WHEELS_DIR }}/build_py${py_version}.log - echo "Completed build for Python $py_version" - ) & - pids+=($!) + $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 }} done - - # Wait for all builds to complete and check exit codes - failed=0 - for i in "${!pids[@]}"; do - pid=${pids[$i]} - if wait $pid; then - echo "Build $i (PID $pid) succeeded" - else - echo "Build $i (PID $pid) failed" - failed=1 - fi - done - - if [ $failed -eq 1 ]; then - echo "One or more builds failed" - exit 1 - fi working-directory: ${{ env.OV_INSTALL_DIR }} - name: Upload Wheels From d4ca5db017c0f5b81bd7b0c8df113552af1f96a4 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Wed, 19 Nov 2025 12:42:55 +0100 Subject: [PATCH 04/10] use ninja --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 482bc00b50..907f68e8d3 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -259,7 +259,7 @@ jobs: - ${{ github.workspace }}:${{ github.workspace }} options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING env: - CMAKE_GENERATOR: Unix Makefiles + CMAKE_GENERATOR: Ninja Multi-Config OV_INSTALL_DIR: ${{ github.workspace }}/ov INSTALL_DIR: ${{ github.workspace }}/install WHEELS_DIR: ${{ github.workspace }}/install/wheels From 81a319cf9b4c2961f62c40cef5119d29aa6248fd Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 21 Nov 2025 09:04:55 +0100 Subject: [PATCH 05/10] check sccache stats --- .github/workflows/linux.yml | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 907f68e8d3..83581d2a46 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -290,20 +290,23 @@ 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 }}"' \ - --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 }} - - - 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: 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 }} + + # - 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: 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" @@ -317,6 +320,9 @@ jobs: done working-directory: ${{ env.OV_INSTALL_DIR }} + - name: Show sccache stats + run: ${SCCACHE_PATH} --show-stats + - name: Upload Wheels if: ${{ always() }} uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 From fd3defe4a1d3ea2a9f6ab0cd12300c8ef4fe90cb Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 21 Nov 2025 10:30:18 +0100 Subject: [PATCH 06/10] use matrix --- .github/workflows/linux.yml | 169 +++++++++++++++++++++++++++--------- 1 file changed, 129 insertions(+), 40 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 83581d2a46..148a5a578c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -244,10 +244,111 @@ jobs: path: ${{ env.MANIFEST_PATH }} if-no-files-found: 'error' - genai_build_wheel: - name: Build Wheel + genai_build_tokenizers_wheel: + name: Build Tokenizers Wheel needs: [ openvino_download ] - timeout-minutes: 90 + timeout-minutes: 30 + defaults: + run: + shell: bash + runs-on: aks-linux-4-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: + 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 }}"' \ + --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 }} + + - name: Upload Tokenizers Wheel + if: ${{ always() }} + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + with: + name: genai_tokenizers_wheel + path: ${{ env.INSTALL_DIR }} + if-no-files-found: 'error' + + genai_build_wwb_wheel: + name: Build WWB Wheel + needs: [ openvino_download ] + timeout-minutes: 10 + defaults: + run: + shell: bash + runs-on: aks-linux-4-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 }} + env: + 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 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 WWB Wheel + if: ${{ always() }} + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + with: + name: genai_wwb_wheel + 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 @@ -265,7 +366,6 @@ jobs: 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 @@ -289,45 +389,28 @@ jobs: 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 }} - - # - 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: 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" \ - --config-settings=cmake.args="-DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache" \ - ${{ 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: Show sccache stats run: ${SCCACHE_PATH} --show-stats - - 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' @@ -336,7 +419,7 @@ jobs: strategy: matrix: build-type: [Release] - needs: [openvino_download, genai_build_wheel, genai_build_cmake] + needs: [openvino_download, genai_build_tokenizers_wheel, genai_build_wwb_wheel, genai_build_genai_wheel, genai_build_cmake] timeout-minutes: 10 defaults: run: @@ -367,10 +450,16 @@ jobs: - name: Download manifest and wheels uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 with: - pattern: '{${{ env.GENAI_WHEELS_ARTIFACT_NAME }},manifest_${{ matrix.build-type }}}' + pattern: '{genai_tokenizers_wheel,genai_wwb_wheel,genai_wheel_python_*,manifest_${{ matrix.build-type }}}' path: ${{ github.workspace }} merge-multiple: true + - name: Check directories + run: | + ls -laR ${{ github.workspace }} + echo "123" + ls -laR ${{ env.WHEEL_PACKAGE }} + - name: Store ${{ matrix.build_type }} artifacts to a shared drive id: store_artifacts if: ${{ always() }} @@ -519,7 +608,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_tokenizers_wheel, genai_build_wwb_wheel, genai_build_genai_wheel ] timeout-minutes: ${{ matrix.test.timeout }} strategy: fail-fast: false @@ -596,7 +685,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_tokenizers_wheel,genai_wwb_wheel,genai_wheel_python_*}" path: ${{ env.INSTALL_DIR }} merge-multiple: true @@ -615,7 +704,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_tokenizers_wheel, genai_build_wwb_wheel, genai_build_genai_wheel, genai_build_samples, genai_build_nodejs ] strategy: fail-fast: false matrix: @@ -688,7 +777,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_tokenizers_wheel,genai_wwb_wheel,genai_wheel_python_*}" path: ${{ env.INSTALL_DIR }} merge-multiple: true @@ -752,7 +841,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_tokenizers_wheel, genai_build_wwb_wheel, 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: @@ -781,7 +870,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_tokenizers_wheel,genai_wwb_wheel,genai_wheel_python_*}" path: ${{ env.INSTALL_DIR }} merge-multiple: true @@ -892,7 +981,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_tokenizers_wheel] timeout-minutes: 45 defaults: run: @@ -920,7 +1009,7 @@ jobs: - name: Download Build Artifacts 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_tokenizers_wheel}" path: ${{ env.INSTALL_DIR }} merge-multiple: true @@ -954,7 +1043,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_tokenizers_wheel, genai_build_wwb_wheel, 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: From 7fedb354078cb1e916d2c9bfbd5d63d1dd84a982 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 21 Nov 2025 11:01:47 +0100 Subject: [PATCH 07/10] combine tokenizer and wwb wheel --- .github/workflows/linux.yml | 77 ++++++++----------------------------- 1 file changed, 15 insertions(+), 62 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 148a5a578c..3314f3fbf0 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -244,8 +244,8 @@ jobs: path: ${{ env.MANIFEST_PATH }} if-no-files-found: 'error' - genai_build_tokenizers_wheel: - name: Build Tokenizers Wheel + genai_build_wheels: + name: Build Tokenizers & WWB Wheels needs: [ openvino_download ] timeout-minutes: 30 defaults: @@ -288,56 +288,15 @@ jobs: ${{ env.SRC_DIR }}/thirdparty/openvino_tokenizers working-directory: ${{ env.OV_INSTALL_DIR }} - - name: Upload Tokenizers Wheel - if: ${{ always() }} - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - with: - name: genai_tokenizers_wheel - path: ${{ env.INSTALL_DIR }} - if-no-files-found: 'error' - - genai_build_wwb_wheel: - name: Build WWB Wheel - needs: [ openvino_download ] - timeout-minutes: 10 - defaults: - run: - shell: bash - runs-on: aks-linux-4-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 }} - env: - 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 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 WWB Wheel + - name: Upload Wheels if: ${{ always() }} uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: - name: genai_wwb_wheel + name: genai_wheels path: ${{ env.INSTALL_DIR }} if-no-files-found: 'error' @@ -419,7 +378,7 @@ jobs: strategy: matrix: build-type: [Release] - needs: [openvino_download, genai_build_tokenizers_wheel, genai_build_wwb_wheel, genai_build_genai_wheel, genai_build_cmake] + needs: [openvino_download, genai_build_wheels, genai_build_genai_wheel, genai_build_cmake] timeout-minutes: 10 defaults: run: @@ -450,16 +409,10 @@ jobs: - name: Download manifest and wheels uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 with: - pattern: '{genai_tokenizers_wheel,genai_wwb_wheel,genai_wheel_python_*,manifest_${{ matrix.build-type }}}' + pattern: '{genai_wheels,genai_wheel_python_*,manifest_${{ matrix.build-type }}}' path: ${{ github.workspace }} merge-multiple: true - - name: Check directories - run: | - ls -laR ${{ github.workspace }} - echo "123" - ls -laR ${{ env.WHEEL_PACKAGE }} - - name: Store ${{ matrix.build_type }} artifacts to a shared drive id: store_artifacts if: ${{ always() }} @@ -608,7 +561,7 @@ jobs: genai_tests_wheel: name: Python (${{ matrix.test.name}}) Tests (wheel) - needs: [ smart_ci, openvino_download, genai_build_tokenizers_wheel, genai_build_wwb_wheel, genai_build_genai_wheel ] + needs: [ smart_ci, openvino_download, genai_build_wheels, genai_build_genai_wheel ] timeout-minutes: ${{ matrix.test.timeout }} strategy: fail-fast: false @@ -685,7 +638,7 @@ jobs: if: ${{ matrix.test.run_condition }} uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 with: - pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_tokenizers_wheel,genai_wwb_wheel,genai_wheel_python_*}" + pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_wheels,genai_wheel_python_*}" path: ${{ env.INSTALL_DIR }} merge-multiple: true @@ -704,7 +657,7 @@ jobs: genai_samples_tests: name: Samples ${{ matrix.test.name }} (${{ matrix.build-type }}) - needs: [ smart_ci, openvino_download, genai_build_cmake, genai_build_tokenizers_wheel, genai_build_wwb_wheel, genai_build_genai_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: @@ -777,7 +730,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_tokenizers_wheel,genai_wwb_wheel,genai_wheel_python_*}" + 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 @@ -841,7 +794,7 @@ jobs: fail-fast: false matrix: build-type: [Release] - needs: [ smart_ci, openvino_download, genai_build_cmake, genai_build_tokenizers_wheel, genai_build_wwb_wheel, genai_build_genai_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: @@ -870,7 +823,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_tokenizers_wheel,genai_wwb_wheel,genai_wheel_python_*}" + 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 @@ -981,7 +934,7 @@ jobs: genai_xgrammar_off_tests: name: Build & Test when ENABLE_XGRAMMAR=OFF - needs: [smart_ci, openvino_download, genai_build_tokenizers_wheel] + needs: [smart_ci, openvino_download, genai_build_wheels] timeout-minutes: 45 defaults: run: @@ -1009,7 +962,7 @@ jobs: - name: Download Build Artifacts uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 with: - pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_tokenizers_wheel}" + pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_wheels}" path: ${{ env.INSTALL_DIR }} merge-multiple: true @@ -1043,7 +996,7 @@ jobs: Overall_Status: name: ci/gha_overall_status_linux - needs: [smart_ci, openvino_download, genai_build_cmake, genai_build_tokenizers_wheel, genai_build_wwb_wheel, 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] + 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: From 66ce9ac788e2db4d601b914ea82e509e14a57254 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 21 Nov 2025 14:50:33 +0100 Subject: [PATCH 08/10] use 8 core, use the same approach in manylinux --- .github/workflows/linux.yml | 2 +- .github/workflows/manylinux_2_28.yml | 101 +++++++++++++++++++-------- 2 files changed, 73 insertions(+), 30 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3314f3fbf0..e69d444d7e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -311,7 +311,7 @@ jobs: defaults: run: shell: bash - runs-on: aks-linux-4-cores-16gb + 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: diff --git a/.github/workflows/manylinux_2_28.yml b/.github/workflows/manylinux_2_28.yml index 1be636623b..002f717968 100644 --- a/.github/workflows/manylinux_2_28.yml +++ b/.github/workflows/manylinux_2_28.yml @@ -231,14 +231,72 @@ 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 runs-on: aks-linux-4-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: + 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: @@ -277,34 +335,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 +420,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 +453,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 +483,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 +560,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 +645,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: From 4671b36fcea29e9e2f0080e119c02ff724693066 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 21 Nov 2025 15:14:18 +0100 Subject: [PATCH 09/10] use approach in win --- .github/workflows/windows.yml | 177 +++++++++++++++++++++++----------- 1 file changed, 119 insertions(+), 58 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 93a03be433..57ce286c01 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -283,10 +283,10 @@ 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 @@ -298,7 +298,6 @@ jobs: 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 +337,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 +362,123 @@ 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: + 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 +486,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 +499,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 +524,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 +652,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 +722,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 +784,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 +809,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 +877,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 +898,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 +988,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: From e231ae08a48ed5fe01d9016b2656681a162ba887 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Wed, 26 Nov 2025 09:25:42 +0100 Subject: [PATCH 10/10] use ninja for building wheels --- .github/workflows/linux.yml | 3 ++- .github/workflows/manylinux_2_28.yml | 3 ++- .github/workflows/windows.yml | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index e69d444d7e..9fad4198e9 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -259,6 +259,7 @@ jobs: - ${{ 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 @@ -319,7 +320,7 @@ jobs: - ${{ github.workspace }}:${{ github.workspace }} options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING env: - CMAKE_GENERATOR: Ninja Multi-Config + CMAKE_GENERATOR: Ninja OV_INSTALL_DIR: ${{ github.workspace }}/ov INSTALL_DIR: ${{ github.workspace }}/install WHEELS_DIR: ${{ github.workspace }}/install/wheels diff --git a/.github/workflows/manylinux_2_28.yml b/.github/workflows/manylinux_2_28.yml index 002f717968..6725cacd6b 100644 --- a/.github/workflows/manylinux_2_28.yml +++ b/.github/workflows/manylinux_2_28.yml @@ -246,6 +246,7 @@ jobs: - ${{ 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 @@ -304,7 +305,7 @@ 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 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 57ce286c01..ffa7d6ff17 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -292,6 +292,7 @@ jobs: 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 @@ -394,6 +395,7 @@ jobs: 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