Our workflow #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Windows (VS 2022, Python 3.11) | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| merge_group: | |
| push: | |
| branches: | |
| - master | |
| - "releases/**" | |
| permissions: read-all | |
| concurrency: | |
| # github.ref is not unique in post-commit | |
| group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-windows | |
| cancel-in-progress: true | |
| env: | |
| PYTHON_VERSION: "3.11" | |
| TARGET_BRANCH: "master" | |
| PYTHONIOENCODING: utf8 | |
| CMAKE_CXX_COMPILER_LAUNCHER: ccache | |
| CMAKE_C_COMPILER_LAUNCHER: ccache | |
| CCACHE_MAXSIZE: 500Mi | |
| HF_HOME: C:/Users/runneradmin/.cache/huggingface | |
| OV_CACHE: C:/Users/runneradmin/.cache/ov_cache | |
| BASE_PRODUCT_TYPE: public_windows_vs2022 | |
| GENAI_WHEELS_ARTIFACT_NAME: "genai_wheels" | |
| GENAI_ARCHIVE_ARTIFACT_BASE_NAME: "genai_cpack" | |
| jobs: | |
| smart_ci: | |
| name: Smart CI | |
| runs-on: ubuntu-latest | |
| outputs: | |
| skip_workflow: "false" | |
| affected_components: '{"continuous_batching": {"test": true}, "LLM": {"test": true}, "visual_language": {"test": true}, "whisper": {"test": true}, "tokenizers": {"test": true}, "sampling": {"test": true}, "text_streamer": {"test": true}, "RAG": {"test": true}, "LLM_samples": {"test": true}, "Whisper_samples": {"test": true}, "Image_generation_samples": {"test": true}, "RAG_samples": {"test": true}, "Speech_generation_samples": {"test": true}, "JS_API": true}' | |
| steps: | |
| - name: checkout action | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| timeout-minutes: 15 | |
| - name: Show affected components | |
| run: echo "Running all tests on forked repository" | |
| shell: bash | |
| openvino_download: | |
| needs: smart_ci | |
| name: Download prebuilt OpenVINO | |
| outputs: | |
| status: ${{ steps.openvino_download.outcome }} | |
| ov_artifact_name: "openvino_package" | |
| ov_wheel_source: "openvino==${{ steps.openvino_download.outputs.ov_version }}" | |
| ov_version: ${{ steps.openvino_download.outputs.ov_version }} | |
| timeout-minutes: 10 | |
| defaults: | |
| run: | |
| shell: bash | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download OpenVINO Developer Package | |
| id: openvino_download | |
| run: | | |
| # Get latest nightly version info | |
| echo "Getting latest nightly OpenVINO version..." | |
| # Get version from filetree.json API | |
| NIGHTLY_VERSION=$(curl -s https://storage.openvinotoolkit.org/filetree.json | jq -r '.children[] | select(.name == "repositories") | .children[] | select(.name == "openvino") | .children[] | select(.name == "packages") | .children[] | select(.name == "nightly") | .children[] | select(.type == "directory") | .name' | sort -V | tail -1) | |
| if [ -z "$NIGHTLY_VERSION" ]; then | |
| echo "Error: Could not determine nightly version" | |
| exit 1 | |
| fi | |
| echo "Using nightly version: $NIGHTLY_VERSION" | |
| echo "ov_version=$NIGHTLY_VERSION" >> $GITHUB_OUTPUT | |
| # Get Windows package list for this version | |
| WINDOWS_PACKAGES=$(curl -s https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/$NIGHTLY_VERSION/windows/) | |
| # Find the Windows x86_64 zip file | |
| WINDOWS_ZIP=$(echo "$WINDOWS_PACKAGES" | grep -oE 'w_openvino_toolkit_windows_[^"]+_x86_64\.zip' | head -1) | |
| if [ -z "$WINDOWS_ZIP" ]; then | |
| echo "Error: Could not find Windows x86_64 package for version $NIGHTLY_VERSION" | |
| exit 1 | |
| fi | |
| echo "Found Windows package: $WINDOWS_ZIP" | |
| # Download OpenVINO developer package for Windows | |
| DOWNLOAD_URL="https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/$NIGHTLY_VERSION/windows/$WINDOWS_ZIP" | |
| echo "Downloading from: $DOWNLOAD_URL" | |
| wget -q "$DOWNLOAD_URL" -O openvino_dev.zip | |
| # Create directory structure | |
| mkdir -p openvino_package | |
| unzip -q openvino_dev.zip -d openvino_package | |
| # Move files to root level (extract the directory name from the zip filename) | |
| EXTRACTED_DIR=$(basename "$WINDOWS_ZIP" .zip) | |
| mv openvino_package/$EXTRACTED_DIR/* openvino_package/ | |
| rmdir openvino_package/$EXTRACTED_DIR/ | |
| # Download Node.js package (simplified) | |
| mkdir -p openvino_package/openvino_node_npm_package | |
| echo "Node.js package placeholder" > openvino_package/openvino_node_npm_package/placeholder.txt | |
| echo "outcome=success" >> $GITHUB_OUTPUT | |
| - name: Upload OpenVINO Package | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: openvino_package | |
| path: openvino_package/ | |
| if-no-files-found: "error" | |
| genai_build_cpack: | |
| name: genai cpack (${{ matrix.build-type }}) | |
| strategy: | |
| matrix: | |
| build-type: [Release, Debug] | |
| needs: [openvino_download] | |
| timeout-minutes: 45 | |
| defaults: | |
| run: | |
| shell: pwsh | |
| runs-on: windows-2022 | |
| env: | |
| CMAKE_GENERATOR: "Ninja" # Ninja is the only Windows native generator supported by ccache | |
| OV_INSTALL_DIR: ${{ github.workspace }}\install\ov | |
| GENAI_INSTALL_DIR: ${{ github.workspace }}\install\genai | |
| INSTALL_TOOLS_DIR: ${{ github.workspace }}\tools | |
| INSTALL_TESTS_DIR: ${{ github.workspace }}\tests | |
| SRC_DIR: ${{ github.workspace }}\src\genai | |
| BUILD_DIR: ${{ github.workspace }}\build\genai | |
| CCACHE_DIR: ${{ github.workspace }}\ccache | |
| MANIFEST_PATH: ${{ github.workspace }}\manifest.yml | |
| steps: | |
| - name: Clone genai | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: recursive | |
| path: ${{ env.SRC_DIR }} | |
| - name: Setup Python ${{ env.PYTHON_VERSION }} | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Download OpenVINO package | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| name: ${{ needs.openvino_download.outputs.ov_artifact_name }} | |
| path: ${{ env.OV_INSTALL_DIR }} | |
| merge-multiple: true | |
| # | |
| # Build | |
| # | |
| - 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@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 | |
| with: | |
| key: ${{ runner.os }}-${{ runner.arch }}-ccache-${{ env.TARGET_BRANCH }}-${{ matrix.build-type }}-cpack-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ runner.arch }}-ccache-${{ env.TARGET_BRANCH }}-${{ matrix.build-type }}-cpack | |
| path: ${{ env.CCACHE_DIR }} | |
| - name: Generate product manifest | |
| run: | | |
| echo "product_type: ${{ env.BASE_PRODUCT_TYPE }}_${{ matrix.build-type }}" > ${{ env.MANIFEST_PATH }} | |
| echo "target_arch: x86_64" >> ${{ env.MANIFEST_PATH }} | |
| echo "build_type: ${{ matrix.build-type }}" >> ${{ env.MANIFEST_PATH }} | |
| - 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: CMake Build | |
| shell: pwsh | |
| run: | | |
| ${{ env.OV_INSTALL_DIR }}/setupvars.ps1 | |
| cmake -DOpenVINODeveloperPackage_DIR=${{ env.OV_INSTALL_DIR }}/developer_package/cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ${{ env.SRC_DIR }} -B ${{ env.BUILD_DIR }} | |
| cmake --build ${{ env.BUILD_DIR }} --parallel $ENV:NUMBER_OF_PROCESSORS --config ${{ matrix.build-type }} --verbose | |
| cmake --install ${{ env.BUILD_DIR }} --config=${{ matrix.build-type }} --prefix=${{ env.GENAI_INSTALL_DIR }} | |
| cmake --install ${{ env.BUILD_DIR }} --config=${{ matrix.build-type }} --prefix=${{ env.INSTALL_TOOLS_DIR }} --component tools_bin | |
| cmake --install ${{ env.BUILD_DIR }} --config=${{ matrix.build-type }} --prefix=${{ env.INSTALL_TESTS_DIR }} --component tests | |
| env: | |
| CMAKE_TLS_VERIFY: 0 | |
| - name: Show ccache stats | |
| run: ccache --show-stats | |
| # | |
| # Upload build artifacts | |
| # | |
| - name: Pack Artifacts | |
| run: | | |
| $file=Get-ChildItem -Path "${{ env.GENAI_INSTALL_DIR }}" | |
| $compress = @{ | |
| Path = $file | |
| CompressionLevel = "Optimal" | |
| DestinationPath = "${{ env.BUILD_DIR }}/${{ env.GENAI_ARCHIVE_ARTIFACT_BASE_NAME }}.zip" | |
| } | |
| Compress-Archive @compress | |
| - name: Save ccache | |
| if: always() && steps.ccache-restore.outputs.cache-hit != 'true' && github.event_name == 'push' | |
| uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 | |
| with: | |
| key: ${{ steps.ccache-restore.outputs.cache-primary-key }} | |
| path: ${{ env.CCACHE_DIR }} | |
| - name: Upload cpack package | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: genai_cpack_${{ matrix.build-type }} | |
| path: ${{ env.BUILD_DIR }}/*.zip | |
| if-no-files-found: "error" | |
| - name: Upload Tools | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: genai_tools_${{ matrix.build-type }} | |
| path: ${{ env.INSTALL_TOOLS_DIR }} | |
| if-no-files-found: "error" | |
| - name: Upload Tests | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: genai_tests_${{ matrix.build-type }} | |
| path: ${{ env.INSTALL_TESTS_DIR }} | |
| if-no-files-found: "error" | |
| - name: Upload manifest | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: manifest_${{ matrix.build-type }} | |
| path: ${{ env.MANIFEST_PATH }} | |
| if-no-files-found: "error" | |
| genai_build_wheel: | |
| name: genai wheel | |
| needs: [openvino_download] | |
| timeout-minutes: 45 | |
| defaults: | |
| run: | |
| shell: pwsh | |
| runs-on: windows-2022 | |
| 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: recursive | |
| path: ${{ env.SRC_DIR }} | |
| - name: Setup Python ${{ env.PYTHON_VERSION }} | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| cache: "pip" | |
| - name: Download OpenVINO package | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| 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@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 | |
| with: | |
| key: ${{ runner.os }}-${{ runner.arch }}-ccache-${{ env.TARGET_BRANCH }}-Release-wheel-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ runner.arch }}-ccache-${{ env.TARGET_BRANCH }}-Release-wheel | |
| path: ${{ env.CCACHE_DIR }} | |
| - name: Set CI environment | |
| run: | | |
| echo "Setting up environment for wheel build" | |
| # | |
| # Build | |
| # | |
| - 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 Tokenizers Wheel | |
| run: | | |
| python -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 }}/tokenizers' ` | |
| ${{ needs.openvino_download.outputs.ov_wheel_source }} ` | |
| ${{ env.SRC_DIR }}/thirdparty/openvino_tokenizers | |
| working-directory: ${{ env.OV_INSTALL_DIR }} | |
| - name: Build genai wheel | |
| run: | | |
| python -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: 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: 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@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 | |
| with: | |
| key: ${{ steps.ccache-restore.outputs.cache-primary-key }} | |
| path: ${{ env.CCACHE_DIR }} | |
| - name: Upload wheels | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: genai_wheels | |
| path: ${{ env.INSTALL_DIR }} | |
| if-no-files-found: "error" | |
| genai_build_samples: | |
| name: Build Samples - ${{ matrix.build-type }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build-type: [Release, Debug] | |
| needs: [openvino_download, genai_build_cpack] | |
| timeout-minutes: 10 | |
| defaults: | |
| run: | |
| shell: pwsh | |
| runs-on: windows-2022 | |
| env: | |
| OV_INSTALL_DIR: ${{ github.workspace }}/install/ov | |
| SRC_DIR: ${{ github.workspace }}/src | |
| BUILD_DIR: ${{ github.workspace }}/build | |
| INSTALL_DIR: ${{ github.workspace }}/install/genai | |
| steps: | |
| - name: Clone openvino.genai | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| path: ${{ env.SRC_DIR }} | |
| - name: Download Build Artifacts | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_cpack_${{ matrix.build-type }}}" | |
| path: ${{ env.OV_INSTALL_DIR }} | |
| merge-multiple: true | |
| - name: Extract Artifacts | |
| run: Expand-Archive -Path ${{ env.OV_INSTALL_DIR }}/${{ env.GENAI_ARCHIVE_ARTIFACT_BASE_NAME }}.zip -DestinationPath ${{ env.OV_INSTALL_DIR }} | |
| - name: Build Samples (Release) | |
| if: ${{ 'Release' == matrix.build-type }} | |
| run: | | |
| & ${{ env.OV_INSTALL_DIR }}/samples/cpp/build_samples.ps1 -i ${{ env.INSTALL_DIR }} | |
| & ${{ env.OV_INSTALL_DIR }}/samples/c/build_samples.ps1 -i ${{ env.INSTALL_DIR }} | |
| - name: Build Samples (Debug) | |
| if: ${{ 'Release' != matrix.build-type }} | |
| run: | | |
| . "${{ env.OV_INSTALL_DIR }}/setupvars.ps1" | |
| cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ${{ env.OV_INSTALL_DIR }}/samples/cpp -B ${{ env.BUILD_DIR }} | |
| cmake --build ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --parallel $ENV:NUMBER_OF_PROCESSORS | |
| cmake --install ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --component samples_bin --prefix ${{ env.INSTALL_DIR }} | |
| - name: Upload Samples Build Package | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: genai_samples_${{ matrix.build-type }} | |
| path: ${{ env.INSTALL_DIR }} | |
| if-no-files-found: "error" | |
| genai_build_nodejs: | |
| name: Build Node.js bindings | |
| needs: [openvino_download] | |
| timeout-minutes: 90 | |
| defaults: | |
| run: | |
| shell: pwsh | |
| runs-on: windows-2022 | |
| env: | |
| OV_INSTALL_DIR: ${{ github.workspace }}/ov | |
| SRC_DIR: ${{ github.workspace }}/openvino.genai | |
| INSTALL_DIR: ${{ github.workspace }}/openvino.genai/src/js/bin | |
| BUILD_DIR: ${{ github.workspace }}/build | |
| steps: | |
| - name: Clone openvino.genai | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: recursive | |
| path: ${{ env.SRC_DIR }} | |
| - name: Download OpenVINO package | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| name: ${{ needs.openvino_download.outputs.ov_artifact_name }} | |
| path: ${{ env.OV_INSTALL_DIR }} | |
| merge-multiple: true | |
| - name: Setup Python ${{ env.PYTHON_VERSION }} | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| cache: "pip" | |
| - name: Build GenAI Node.js bindings | |
| run: | | |
| . "${{ env.OV_INSTALL_DIR }}/setupvars.ps1" | |
| cmake -DCMAKE_BUILD_TYPE=Release ` | |
| -DENABLE_JS=ON -DCPACK_GENERATOR=NPM ` | |
| -DENABLE_PYTHON=OFF -DENABLE_WHEEL=OFF ` | |
| -S ${{ env.SRC_DIR }} -B ${{ env.BUILD_DIR }} | |
| cmake --build ${{ env.BUILD_DIR }} --config Release --parallel --verbose | |
| cmake --install ${{ env.BUILD_DIR }} --config Release --prefix ${{ env.INSTALL_DIR }} | |
| - name: Upload Node.js bindings Build Package | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: genai_nodejs_bindings | |
| path: ${{ env.INSTALL_DIR }} | |
| if-no-files-found: "error" | |
| genai_tests_wheel: | |
| name: Python (${{ matrix.test.name}}) Tests (wheel) | |
| needs: [smart_ci, openvino_download, genai_build_wheel] | |
| timeout-minutes: ${{ matrix.test.timeout }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test: | |
| - name: "Whisper" | |
| # TODO: skip some tests temporary untill https://github.com/huggingface/datasets/issues/7647 dataset is fixed | |
| cmd: 'tests/python_tests/test_whisper_pipeline.py tests/python_tests/test_whisper_pipeline_static.py -k "not test_smoke[sample_from_dataset0 and not test_whisper_constructors[sample_from_dataset0 and not test_max_new_tokens[sample_from_dataset0 and not test_language_mode[language and not test_task_mode[sample_from_dataset0 and not test_language_autodetect[sample_from_dataset0 and not test_whisper_config_constructor and not test_language_autodetect[sample_from_dataset1 and not test_language_autodetect[sample_from_dataset2 and not test_initial_prompt_hotwords[sample_from_dataset0 and not test_random_sampling[sample_from_dataset0"' | |
| run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).whisper.test }} | |
| timeout: 45 | |
| - name: "Cacheopt E2E" | |
| cmd: "tests/python_tests/test_kv_cache_eviction.py" | |
| run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).continuous_batching.test }} | |
| timeout: 60 | |
| - name: "LLM & VLM" | |
| cmd: "tests/python_tests/test_llm_pipeline.py tests/python_tests/test_llm_pipeline_static.py tests/python_tests/test_vlm_pipeline.py tests/python_tests/test_structured_output.py" | |
| run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).visual_language.test || fromJSON(needs.smart_ci.outputs.affected_components).LLM.test }} | |
| timeout: 120 | |
| - name: "Tokenizer tests" | |
| cmd: "tests/python_tests/test_tokenizer.py" | |
| run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).tokenizers.test }} | |
| timeout: 60 | |
| - name: "API tests" | |
| cmd: "tests/python_tests/test_continuous_batching.py tests/python_tests/test_generation_config.py tests/python_tests/test_sampling.py tests/python_tests/test_text_streamer.py" | |
| run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).continuous_batching.test || fromJSON(needs.smart_ci.outputs.affected_components).sampling.test || fromJSON(needs.smart_ci.outputs.affected_components).text_streamer.test }} | |
| timeout: 60 | |
| - name: "Rag tests" | |
| cmd: "tests/python_tests/test_rag.py" | |
| run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).RAG.test }} | |
| timeout: 30 | |
| defaults: | |
| run: | |
| shell: pwsh | |
| runs-on: windows-2022 | |
| env: | |
| INSTALL_DIR: ${{ github.workspace }}/install | |
| SRC_DIR: ${{ github.workspace }}/src | |
| BUILD_DIR: ${{ github.workspace }}/build | |
| steps: | |
| - name: Clone openvino.genai | |
| if: ${{ matrix.test.run_condition }} | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| path: ${{ env.SRC_DIR }} | |
| submodules: recursive | |
| - name: Download Build Artifacts | |
| if: ${{ matrix.test.run_condition }} | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_wheels}" | |
| path: ${{ env.INSTALL_DIR }} | |
| merge-multiple: true | |
| - name: Setup Python ${{ env.PYTHON_VERSION }} | |
| if: ${{ matrix.test.run_condition }} | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| cache: "pip" | |
| - name: Install OpenVINO wheel | |
| if: ${{ matrix.test.run_condition }} | |
| run: python -m pip install openvino==${{ needs.openvino_download.outputs.ov_version }} ${{ needs.openvino_download.outputs.ov_wheel_source }} | |
| working-directory: ${{ env.INSTALL_DIR }} | |
| - name: Install GenAI Wheels | |
| if: ${{ matrix.test.run_condition }} | |
| uses: ./src/.github/actions/install_wheel | |
| with: | |
| packages: "openvino_tokenizers[transformers];openvino_genai;whowhatbench" | |
| requirements_files: "${{ env.SRC_DIR }}/tests/python_tests/requirements.txt" | |
| local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels | |
| - name: Tests | |
| if: ${{ matrix.test.run_condition }} | |
| run: python -m pytest -s -v ${{ matrix.test.cmd }} | |
| working-directory: ${{ env.SRC_DIR }} | |
| genai_samples_tests: | |
| name: Samples ${{ matrix.test.name }} (${{ matrix.build-type }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build-type: [Release] | |
| test: | |
| - name: "LLM" | |
| marker: "llm" | |
| cmd: "tests/python_tests/samples" | |
| run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).LLM_samples.test }} | |
| - name: "Whisper" | |
| marker: "whisper" | |
| cmd: "tests/python_tests/samples" | |
| run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).Whisper_samples.test }} | |
| - name: "Image generation" | |
| marker: "image_generation" | |
| cmd: "tests/python_tests/samples" | |
| run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).Image_generation_samples.test }} | |
| - name: "Rag" | |
| marker: "rag" | |
| cmd: "tests/python_tests/samples" | |
| run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).RAG_samples.test }} | |
| - name: "Speech generation" | |
| marker: "speech_generation" | |
| cmd: "tests/python_tests/samples" | |
| 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, | |
| ] | |
| timeout-minutes: 120 | |
| defaults: | |
| run: | |
| shell: pwsh | |
| runs-on: windows-2022 | |
| env: | |
| INSTALL_DIR: ${{ github.workspace }}/install | |
| SRC_DIR: ${{ github.workspace }}/src | |
| BUILD_DIR: ${{ github.workspace }}/build | |
| steps: | |
| - name: Clone openvino.genai | |
| if: ${{ matrix.test.run_condition }} | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| path: ${{ env.SRC_DIR }} | |
| - name: Download Build Artifacts | |
| if: ${{ matrix.test.run_condition }} | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_cpack_${{ matrix.build-type }},genai_samples_${{ matrix.build-type }},genai_wheels}" | |
| path: ${{ env.INSTALL_DIR }} | |
| merge-multiple: true | |
| - name: Extract Artifacts | |
| if: ${{ matrix.test.run_condition }} | |
| run: Expand-Archive -Path ${{ env.INSTALL_DIR }}/${{ env.GENAI_ARCHIVE_ARTIFACT_BASE_NAME }}.zip -DestinationPath ${{ env.INSTALL_DIR }} | |
| - name: Download GenAI JS Bildings Artifacts | |
| if: ${{ matrix.test.run_condition }} | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| name: genai_nodejs_bindings | |
| path: ${{ env.SRC_DIR }}/src/js/bin | |
| merge-multiple: true | |
| - name: Setup Python ${{ env.PYTHON_VERSION }} | |
| if: ${{ matrix.test.run_condition }} | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| cache: "pip" | |
| - name: Install OpenVINO wheel | |
| if: ${{ matrix.test.run_condition }} | |
| run: python -m pip install openvino==${{ needs.openvino_download.outputs.ov_version }} ${{ needs.openvino_download.outputs.ov_wheel_source }} | |
| working-directory: ${{ env.INSTALL_DIR }} | |
| - name: Install GenAI wheels | |
| if: ${{ matrix.test.run_condition }} | |
| uses: ./src/.github/actions/install_wheel | |
| with: | |
| packages: "openvino_tokenizers[transformers];openvino_genai[testing]" | |
| requirements_files: "${{ env.SRC_DIR }}/samples/requirements.txt" | |
| local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels | |
| - name: Setup NodeJS | |
| if: ${{ matrix.test.run_condition }} | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: 21 | |
| - name: Install GenAI NPM package | |
| if: ${{ matrix.test.run_condition }} | |
| working-directory: ${{ env.SRC_DIR }}/src/js | |
| run: | | |
| npm install $(Resolve-Path -Path "${{ env.INSTALL_DIR }}/openvino_node_npm_package/openvino-node-*") --ignore-scripts | |
| Copy-Item -Recurse ${{ env.INSTALL_DIR }}/openvino_node_npm_package/bin node_modules/openvino-node/bin | |
| npm install --verbose | |
| - name: Install NPM dependencies for samples | |
| if: ${{ matrix.test.run_condition }} | |
| working-directory: ${{ env.SRC_DIR }}/samples/js/text_generation | |
| run: | | |
| npm install ${{ env.SRC_DIR }}/src/js | |
| npm install --verbose | |
| - name: Test Samples (Python and C++) | |
| if: ${{ matrix.test.run_condition }} | |
| run: python -m pytest -vs ${{ env.SRC_DIR }}/${{ matrix.test.cmd }} -m "${{ matrix.test.marker }}" | |
| env: | |
| PATH: "${{ env.INSTALL_DIR }}/runtime/bin/intel64/${{ matrix.build-type }};${{ env.INSTALL_DIR }}/runtime/3rdparty/tbb/bin;%PATH%" # Required for C++ samples | |
| SAMPLES_PY_DIR: "${{ env.INSTALL_DIR }}/samples/python" | |
| SAMPLES_JS_DIR: "${{ env.SRC_DIR }}/samples/js" | |
| SAMPLES_CPP_DIR: "${{ env.INSTALL_DIR }}/samples_bin" | |
| SAMPLES_C_DIR: "${{ env.INSTALL_DIR }}/samples_bin" | |
| genai_tools_tests: | |
| name: Tools tests (${{ matrix.build-type }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build-type: [Release] | |
| needs: [smart_ci, openvino_download, genai_build_cpack, genai_build_wheel] | |
| if: ${{ fromJSON(needs.smart_ci.outputs.affected_components).continuous_batching }} | |
| timeout-minutes: 90 | |
| defaults: | |
| run: | |
| shell: pwsh | |
| runs-on: windows-2022 | |
| env: | |
| INSTALL_DIR: ${{ github.workspace }}/install | |
| SRC_DIR: ${{ github.workspace }}/src | |
| BUILD_DIR: ${{ github.workspace }}/build | |
| steps: | |
| - name: Clone openvino.genai | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| path: ${{ env.SRC_DIR }} | |
| - name: Download Build Artifacts | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| 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}" | |
| path: ${{ env.INSTALL_DIR }} | |
| merge-multiple: true | |
| - name: Extract Artifacts | |
| run: Expand-Archive -Path ${{ env.INSTALL_DIR }}/${{ env.GENAI_ARCHIVE_ARTIFACT_BASE_NAME }}.zip -DestinationPath ${{ env.INSTALL_DIR }} | |
| - name: Setup Python ${{ env.PYTHON_VERSION }} | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| cache: "pip" | |
| - name: Install OpenVINO wheel | |
| run: python -m pip install openvino==${{ needs.openvino_download.outputs.ov_version }} ${{ needs.openvino_download.outputs.ov_wheel_source }} | |
| working-directory: ${{ env.INSTALL_DIR }} | |
| - name: Install GenAI wheels | |
| uses: ./src/.github/actions/install_wheel | |
| with: | |
| packages: "openvino_tokenizers[transformers];openvino_genai[testing]" | |
| requirements_files: "${{ env.SRC_DIR }}/samples/requirements.txt" | |
| local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels | |
| - name: gtests unit tests | |
| run: | | |
| . "${{ env.INSTALL_DIR }}/setupvars.ps1" | |
| & "${{ env.INSTALL_DIR }}/tests/tests_continuous_batching.exe" | |
| - name: Test C++ Tools | |
| run: | | |
| . "${{ env.INSTALL_DIR }}/setupvars.ps1" | |
| python -m pytest -vs ${{ env.SRC_DIR }}/tests/python_tests/samples/test_continuous_batching_tools.py -m "samples" | |
| env: | |
| SAMPLES_CPP_DIR: "${{ env.INSTALL_DIR }}/samples_bin" | |
| genai_nodejs_tests: | |
| name: Node.js bindings tests | |
| needs: [smart_ci, openvino_download, genai_build_nodejs] | |
| if: ${{ fromJSON(needs.smart_ci.outputs.affected_components).JS_API }} | |
| timeout-minutes: 20 | |
| defaults: | |
| run: | |
| shell: pwsh | |
| runs-on: windows-2022 | |
| env: | |
| SRC_DIR: ${{ github.workspace }}/openvino.genai | |
| INSTALL_DIR: ${{ github.workspace }}/install | |
| NODE_VERSION: 21 | |
| steps: | |
| - name: Clone openvino.genai | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| path: ${{ env.SRC_DIR }} | |
| submodules: recursive | |
| - name: Download OpenVINO Artifacts | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| name: ${{ needs.openvino_download.outputs.ov_artifact_name }} | |
| path: ${{ env.INSTALL_DIR }} | |
| merge-multiple: true | |
| - name: Download GenAI JS Bildings Artifacts | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| name: genai_nodejs_bindings | |
| path: ${{ env.SRC_DIR }}/src/js/bin | |
| merge-multiple: true | |
| - name: Setup Node ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| # JS pacakges uses the OpenVINO and OpenVINO GenAI libraries from the bin directory. | |
| # Here we emulate the installation of the openvino-node package from NPM. The latest | |
| # release of the openvino-node package is installed, and we need to update the binaries | |
| # in the node_modules/openvino-node/bin directory to work correctly with GenAI | |
| - name: Install npm package tests dependencies | |
| working-directory: ${{ env.SRC_DIR }}/src/js | |
| run: | | |
| npm install $(Resolve-Path -Path "${{ env.INSTALL_DIR }}/openvino_node_npm_package/openvino-node-*") --ignore-scripts | |
| Copy-Item -Recurse ${{ env.INSTALL_DIR }}/openvino_node_npm_package/bin node_modules/openvino-node/bin | |
| npm install --verbose | |
| - name: Check lint | |
| working-directory: ${{ env.SRC_DIR }}/src/js | |
| run: npm run lint | |
| - name: Run npm package tests | |
| working-directory: ${{ env.SRC_DIR }}/src/js | |
| run: npm test | |
| 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, | |
| ] | |
| if: ${{ always() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check status of all jobs | |
| if: >- | |
| ${{ | |
| contains(needs.*.result, 'failure') || | |
| contains(needs.*.result, 'cancelled') | |
| }} | |
| run: exit 1 |