Add perf metrics for CB VLM (#1897) #18
This file contains 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: macOS (13, Python 3.10) | |
on: | |
workflow_dispatch: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- master | |
- 'releases/**' | |
permissions: read-all # Required by https://github.com/ossf/scorecard/blob/e23b8ad91fd6a64a0a971ca4fc0a4d1650725615/docs/checks.md#token-permissions | |
concurrency: | |
# github.ref is not unique in post-commit | |
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-mac | |
cancel-in-progress: true | |
env: | |
MACOSX_DEPLOYMENT_TARGET: '11.0' | |
PYTHON_VERSION: '3.10' | |
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref || github.ref }} | |
CCACHE_MAXSIZE: 500Mi | |
jobs: | |
openvino_download: | |
name: Download OpenVINO | |
outputs: | |
status: ${{ steps.openvino_download.outcome }} | |
ov_artifact_name: ${{ steps.openvino_download.outputs.ov_artifact_name }} | |
ov_wheel_source: ${{ steps.openvino_download.outputs.ov_wheel_source }} | |
ov_version: ${{ steps.openvino_download.outputs.ov_version }} | |
ov_latest_artifact_name: ${{ steps.openvino_latest_download.outputs.ov_artifact_name }} | |
timeout-minutes: 10 | |
defaults: | |
run: | |
shell: bash | |
runs-on: aks-linux-medium | |
container: | |
image: 'openvinogithubactions.azurecr.io/openvino_provider:0.1.0' | |
volumes: | |
- /mount:/mount | |
- ${{ github.workspace }}:${{ github.workspace }} | |
steps: | |
- uses: openvinotoolkit/openvino/.github/actions/openvino_provider@master | |
id: openvino_download | |
with: | |
platform: macos_12_6 | |
commit_packages_to_provide: wheels | |
revision: latest_nightly | |
- uses: openvinotoolkit/openvino/.github/actions/openvino_provider@master | |
id: openvino_latest_download | |
with: | |
platform: macos_12_6 | |
commit_packages_to_provide: openvino_js_package.tar.gz | |
revision: latest_available_commit | |
genai_build_cmake: | |
name: Build cpack - ${{ matrix.build-type }} | |
strategy: | |
fail-fast: false | |
matrix: | |
build-type: [Release] | |
needs: [ openvino_download ] | |
timeout-minutes: 20 | |
defaults: | |
run: | |
shell: bash | |
runs-on: macos-13 | |
env: | |
CMAKE_GENERATOR: Ninja | |
CMAKE_CXX_COMPILER_LAUNCHER: ccache | |
CMAKE_C_COMPILER_LAUNCHER: ccache | |
CCACHE_DIR: ${{ github.workspace }}/ccache | |
OV_INSTALL_DIR: ${{ github.workspace }}/ov | |
INSTALL_DIR: ${{ github.workspace }}/install | |
INSTALL_TOOLS_DIR: ${{ github.workspace }}/tools | |
INSTALL_TESTS_DIR: ${{ github.workspace }}/tests | |
BUILD_DIR: ${{ github.workspace }}/build | |
SRC_DIR: ${{ github.workspace }}/src | |
steps: | |
- name: Clone openvino.genai | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
path: ${{ env.SRC_DIR }} | |
submodules: recursive | |
- name: Download OpenVINO package | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
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@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: 'pip' | |
- name: Install build dependencies | |
run: brew install coreutils ninja ccache | |
- name: Setup ccache | |
id: ccache-restore | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | |
with: | |
key: ${{ runner.os }}-${{ runner.arch }}-ccache-${{ env.TARGET_BRANCH }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-${{ runner.arch }}-ccache-${{ env.TARGET_BRANCH }} | |
path: ${{ env.CCACHE_DIR }} | |
- name: Clean ccache stats | |
run: ccache --zero-stats --show-config | |
- name: CMake Build | |
run: | | |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh | |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ${{ env.SRC_DIR}} -B ${{ env.BUILD_DIR }} | |
cmake --build ${{ env.BUILD_DIR}} --config ${{ matrix.build-type }} --parallel $(nproc) --verbose | |
cmake --install ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --prefix ${{ env.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 | |
- 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@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | |
with: | |
key: ${{ steps.ccache-restore.outputs.cache-primary-key }} | |
path: ${{ env.CCACHE_DIR }} | |
- name: Upload Archive Distribution Package | |
if: always() | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: genai_cpack_${{ matrix.build-type }} | |
path: ${{ env.INSTALL_DIR }} | |
if-no-files-found: 'error' | |
- name: Upload Tools | |
if: always() | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: genai_tests_${{ matrix.build-type }} | |
path: ${{ env.INSTALL_TESTS_DIR }} | |
if-no-files-found: 'error' | |
genai_build_wheel: | |
name: Build Wheel | |
needs: [ openvino_download ] | |
timeout-minutes: 20 | |
defaults: | |
run: | |
shell: bash | |
runs-on: macos-13 | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/ccache | |
CMAKE_CXX_COMPILER_LAUNCHER: ccache | |
CMAKE_C_COMPILER_LAUNCHER: ccache | |
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
path: ${{ env.SRC_DIR }} | |
submodules: recursive | |
- name: Download OpenVINO package | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
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@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: 'pip' | |
- name: Install build dependencies | |
run: brew install coreutils ccache | |
- name: Setup ccache | |
id: ccache-restore | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | |
with: | |
key: ${{ runner.os }}-${{ runner.arch }}-ccache-${{ env.TARGET_BRANCH }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-${{ runner.arch }}-ccache-${{ env.TARGET_BRANCH }} | |
path: ${{ env.CCACHE_DIR }} | |
- name: Clean ccache stats | |
run: ccache --zero-stats --show-config | |
- name: Build Tokenizers Wheel | |
run: | | |
python -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} \ | |
${{ 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 }} \ | |
${{ 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: Save ccache | |
if: always() && steps.ccache-restore.outputs.cache-hit != 'true' && github.event_name == 'push' | |
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | |
with: | |
key: ${{ steps.ccache-restore.outputs.cache-primary-key }} | |
path: ${{ env.CCACHE_DIR }} | |
- name: Upload Wheels | |
if: always() | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
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] | |
needs: [ openvino_download, genai_build_cmake ] | |
timeout-minutes: 10 | |
defaults: | |
run: | |
shell: bash | |
runs-on: macos-13 | |
env: | |
OV_INSTALL_DIR: ${{ github.workspace }}/ov | |
INSTALL_DIR: ${{ github.workspace }}/install | |
BUILD_DIR: ${{ github.workspace }}/build | |
SRC_DIR: ${{ github.workspace }}/src | |
steps: | |
- name: Clone openvino.genai | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
path: ${{ env.SRC_DIR }} | |
submodules: recursive | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_cpack_${{ matrix.build-type }}}" | |
path: ${{ env.OV_INSTALL_DIR }} | |
merge-multiple: true | |
- name: Build Samples (Release) | |
if: ${{ 'Release' == matrix.build-type }} | |
run: | | |
chmod +x ${{ env.OV_INSTALL_DIR }}/samples/cpp/build_samples.sh | |
${{ env.OV_INSTALL_DIR }}/samples/cpp/build_samples.sh -i ${{ env.INSTALL_DIR }} | |
chmod +x ${{ env.OV_INSTALL_DIR }}/samples/c/build_samples.sh | |
${{ env.OV_INSTALL_DIR }}/samples/c/build_samples.sh -i ${{ env.INSTALL_DIR }} | |
- name: Build Samples (${{ matrix.build-type }}) | |
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 --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 }} | |
- name: Upload Samples Build Package | |
if: ${{ always() }} | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: genai_samples_${{ matrix.build-type }} | |
path: ${{ env.INSTALL_DIR }} | |
if-no-files-found: 'error' | |
genai_build_nodejs: | |
name: Build Node.js bindings | |
strategy: | |
fail-fast: false | |
matrix: | |
build-type: [Release] | |
needs: [ openvino_download ] | |
timeout-minutes: 30 | |
defaults: | |
run: | |
shell: bash | |
runs-on: macos-13 | |
env: | |
SRC_DIR: ${{ github.workspace }}/openvino.genai | |
BUILD_DIR: ${{ github.workspace }}/build | |
INSTALL_DIR: ${{ github.workspace }}/openvino.genai/src/js/bin | |
OV_INSTALL_DIR: ${{ github.workspace }}/ov | |
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@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: ${{ needs.openvino_download.outputs.ov_latest_artifact_name }} | |
path: ${{ env.OV_INSTALL_DIR }} | |
merge-multiple: true | |
- name: Install build dependencies | |
run: brew install coreutils | |
- name: Build GenAI Node.js bindings | |
run: | | |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh | |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ | |
-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 ${{ matrix.build-type }} --parallel --verbose | |
cmake --install ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --prefix ${{ env.INSTALL_DIR }} | |
- name: Upload Node.js bindings Build Package | |
if: always() | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
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: [ openvino_download, genai_build_wheel ] | |
timeout-minutes: ${{ matrix.test.timeout }} | |
strategy: | |
fail-fast: false | |
matrix: | |
test: | |
- name: 'Whisper' | |
cmd: 'tests/python_tests/test_whisper_pipeline.py' | |
timeout: 45 | |
- name: 'Cacheopt E2E' | |
cmd: 'tests/python_tests/test_kv_cache_eviction.py' | |
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' | |
timeout: 60 | |
- name: 'Tokenizer tests' | |
cmd: 'tests/python_tests/test_tokenizer.py' | |
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' | |
timeout: 60 | |
defaults: | |
run: | |
shell: bash | |
runs-on: macos-13 | |
env: | |
INSTALL_DIR: ${{ github.workspace }}/install | |
SRC_DIR: ${{ github.workspace }}/src | |
BUILD_DIR: ${{ github.workspace }}/build | |
HF_HOME: ${{ github.workspace }}/hf_cache | |
steps: | |
- name: Clone openvino.genai | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
path: ${{ env.SRC_DIR }} | |
submodules: recursive | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_wheels}" | |
path: ${{ env.INSTALL_DIR }} | |
merge-multiple: true | |
- name: Setup Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: 'pip' | |
- name: Install OpenVINO wheel | |
run: | | |
python3 -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;whowhatbench" | |
requirements_files: "${{ env.SRC_DIR }}/tests/python_tests/requirements.txt" | |
local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels | |
- name: Tests | |
run: python -m pytest -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' | |
- name: 'Whisper' | |
marker: 'whisper' | |
cmd: 'tests/python_tests/samples' | |
needs: [ openvino_download, genai_build_cmake, genai_build_wheel, genai_build_samples ] | |
timeout-minutes: 45 | |
defaults: | |
run: | |
shell: bash | |
runs-on: macos-13 | |
env: | |
INSTALL_DIR: ${{ github.workspace }}/ov | |
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 }} | |
submodules: recursive | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
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: Setup Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: 'pip' | |
- name: Install OpenVINO wheel | |
run: | | |
python3 -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: Fix C++ samples permissions | |
run: chmod +x ${{ env.INSTALL_DIR }}/samples_bin/* | |
- name: Test Samples (Python and C++) | |
run: | | |
source ${{ env.INSTALL_DIR }}/setupvars.sh | |
python -m pytest -vs ${{ env.SRC_DIR }}/${{ matrix.test.cmd }} -m "${{ matrix.test.marker }}" | |
env: | |
SAMPLES_PY_DIR: "${{ env.INSTALL_DIR }}/samples/python" | |
SAMPLES_CPP_DIR: "${{ env.INSTALL_DIR }}/samples_bin" | |
SAMPLES_C_DIR: "${{ env.INSTALL_DIR }}/samples_bin" | |
genai_tools_tests: | |
name: Tools ${{ matrix.build-type }} | |
strategy: | |
fail-fast: false | |
matrix: | |
build-type: [Release] | |
needs: [ openvino_download, genai_build_cmake, genai_build_wheel ] | |
timeout-minutes: 60 | |
defaults: | |
run: | |
shell: bash | |
runs-on: macos-13 | |
env: | |
INSTALL_DIR: ${{ github.workspace }}/ov | |
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 }} | |
submodules: recursive | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
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: Fix C++ samples permissions | |
run: chmod +x ${{ env.INSTALL_DIR }}/samples_bin/* | |
- name: Setup Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: 'pip' | |
- name: Install OpenVINO wheel | |
run: | | |
python3 -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 | |
run: | | |
source ${{ env.INSTALL_DIR }}/setupvars.sh | |
chmod +x ${{ env.INSTALL_DIR }}/tests/tests_continuous_batching | |
${{ env.INSTALL_DIR }}/tests/tests_continuous_batching | |
- name: Test C++ Tools | |
run: | | |
source ${{ env.INSTALL_DIR }}/setupvars.sh | |
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: [ openvino_download, genai_build_nodejs ] | |
timeout-minutes: 20 | |
defaults: | |
run: | |
shell: bash | |
runs-on: macos-13 | |
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@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: ${{ needs.openvino_download.outputs.ov_latest_artifact_name }} | |
path: ${{ env.INSTALL_DIR }} | |
merge-multiple: true | |
- name: Download GenAI JS Bildings Artifacts | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
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@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.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 --verbose | |
rm -rf node_modules/openvino-node/bin | |
cp -R ${{ env.INSTALL_DIR }}/openvino_js_package node_modules/openvino-node/bin | |
- name: Run npm package tests | |
working-directory: ${{ env.SRC_DIR }}/src/js | |
run: npm test | |
- name: Install openvino-genai-node samples dependencies | |
working-directory: ${{ env.SRC_DIR }}/samples/js/text_generation | |
run: | | |
npm install --verbose | |
rm -rf node_modules/openvino-node/bin | |
cp -R ${{ env.INSTALL_DIR }}/openvino_js_package node_modules/openvino-node/bin | |
- name: Run samples tests | |
working-directory: ${{ env.SRC_DIR }}/samples/js/text_generation | |
run: npm test | |
env: | |
MODEL_PATH: ${{ env.SRC_DIR }}/src/js/tests/models/Llama-3.1-8B-Instruct-FastDraft-150M-int8-ov | |
Overall_Status: | |
name: ci/gha_overall_status_macos | |
needs: [openvino_download, genai_build_cmake, genai_build_wheel, genai_build_samples, genai_tests_wheel, genai_samples_tests, genai_tools_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 |