Skip to content

Commit aa4aefc

Browse files
authored
Merge branch 'master' into fix/20210
2 parents 09aa175 + 943c358 commit aa4aefc

File tree

2,470 files changed

+86432
-172804
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,470 files changed

+86432
-172804
lines changed

.github/actions/cache/package-lock.json

+1,547-3,914
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/common/artifact_utils.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ def add_common_args(parser: argparse.ArgumentParser):
1616
default=os.getenv('GITHUB_EVENT_NAME'))
1717
parser.add_argument('--storage_root', help='Root path of the artifacts storage', required=False,
1818
default=os.getenv('ARTIFACTS_SHARE'))
19+
parser.add_argument('-n', '--product_name', required=False, default='dldt',
20+
help='Product name for which artifacts are generated')
1921
group = parser.add_mutually_exclusive_group(required=True)
2022
group.add_argument('-d', '--storage_dir', help='Subdirectory name for artifacts, same as product type',
21-
choices=[platform_key.value for platform_key in ProductType])
22-
group.add_argument('-p', '--platform', type=str,
23+
choices=[product_type.value for product_type in ProductType], type=str.lower)
24+
group.add_argument('-p', '--platform', type=str.lower,
2325
help='Platform for which to restore artifacts. Used if storage_dir is not set',
24-
choices=[product_type.value for product_type in PlatformKey])
26+
choices=[platform_key.value for platform_key in PlatformKey])
2527

2628

2729
def get_event_type(event_name: str = os.getenv('GITHUB_EVENT_NAME')) -> str:

.github/actions/common/constants.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ class EventType(Enum):
1414
'public_linux_ubuntu_22_04_x86_64_release',
1515
'public_linux_ubuntu_22_04_dpcpp_x86_64_release',
1616
'public_linux_ubuntu_24_04_x86_64_release',
17-
'public_windows_vs2019_Release',
18-
'public_windows_vs2019_Debug',
19-
'public_windows_vs2022_Release',
20-
'public_windows_vs2022_Debug',
17+
'public_windows_vs2019_release',
18+
'public_windows_vs2019_debug',
19+
'public_windows_vs2022_release',
20+
'public_windows_vs2022_debug',
2121
'public_manylinux2014_x86_64_release',
22+
'public_macos_x86_64_release',
2223
)
2324
ProductType = Enum('ProductType', {t.upper(): t for t in productTypes})
2425

@@ -44,4 +45,5 @@ class EventType(Enum):
4445
PlatformKey.UBUNTU22_X86_64: ProductType.PUBLIC_LINUX_UBUNTU_22_04_X86_64_RELEASE,
4546
PlatformKey.UBUNTU24_X86_64: ProductType.PUBLIC_LINUX_UBUNTU_24_04_X86_64_RELEASE,
4647
PlatformKey.WINDOWS_X86_64: ProductType.PUBLIC_WINDOWS_VS2022_RELEASE,
48+
PlatformKey.MACOS_12_6_X86_64: ProductType.PUBLIC_MACOS_X86_64_RELEASE,
4749
}

.github/actions/create_manifest/create_manifest.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def parse_ov_version(header_file: str | Path) -> str:
8282

8383
def generate_manifest(repos: list, product_type: str, event_type: str, build_type: str, target_arch: str) -> Manifest:
8484
manifest = Manifest()
85-
component_name = 'dldt' # historical, keep for internal compatibility
85+
component_name = None
8686
repositories = []
8787
ov_version = None
8888
trigger_repo = None
@@ -95,6 +95,7 @@ def generate_manifest(repos: list, product_type: str, event_type: str, build_typ
9595
ov_version = parse_ov_version(version_file)
9696
if repo.trigger:
9797
trigger_repo = repo
98+
component_name = repo.name
9899

99100
custom_branch_name = f'-{trigger_repo.branch}' if trigger_repo.branch != 'master' else ''
100101
run_number_postfix = f'-{os.environ.get("GITHUB_RUN_NUMBER")}' if os.environ.get("GITHUB_RUN_NUMBER") else ''

.github/actions/openvino_provider/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ runs:
141141
run: |
142142
artifacts_path=${{ steps.openvino_commit_download.outputs.artifacts_path }}
143143
cd $artifacts_path
144-
version=$(yq eval '.components.dldt.custom_params.wheel_product_version' manifest.yml)
144+
version=$(yq eval '.components.openvino.custom_params.wheel_product_version // .components.dldt.custom_params.wheel_product_version' manifest.yml)
145145
wheel_path=${{ inputs.install_dir && '$artifacts_path/wheels' || './wheels' }}
146146
default_find_links_cmd="--find-links=$wheel_path"
147147
find_links_cmd=$([[ -n "$PIP_FIND_LINKS" ]] && echo "" || echo "$default_find_links_cmd")

.github/actions/restore_artifacts/action.yml

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ inputs:
1616
branch_name:
1717
description: "Target branch name. If not set - taken from github context"
1818
required: false
19+
product_name:
20+
description: "Product name for which artifacts are generated"
21+
required: false
1922
trigger_repo_sha:
2023
description: "Commit hash of a trigger repo. If not set - taken from github context"
2124
required: false
@@ -50,6 +53,7 @@ runs:
5053
${{ inputs.unpack_archives == 'true' && '--unpack_archives' || '' }}
5154
${{ inputs.branch_name && env.BRANCH_PARAM || '' }}
5255
${{ inputs.event_name && env.EVENT_PARAM || '' }}
56+
${{ inputs.product_name && env.PRODUCT_NAME_PARAM || '' }}
5357
${{ inputs.to_restore && env.TO_RESTORE || '' }}
5458
env:
5559
ACTION_PATH: ${{ runner.os == 'Windows' && '$env:GITHUB_ACTION_PATH' || '$GITHUB_ACTION_PATH' }}
@@ -58,6 +62,7 @@ runs:
5862
PLATFORM_PARAM: "--platform ${{ inputs.platform }}"
5963
BRANCH_PARAM: "-b ${{ inputs.branch_name }}"
6064
EVENT_PARAM: "-e ${{ inputs.event_name }}"
65+
PRODUCT_NAME_PARAM: "-n ${{ inputs.product_name }}"
6166
TO_RESTORE: "-r ${{ inputs.to_restore }}"
6267
DEFAULT_TARGET_DIR: "${{ env.GITHUB_WORKSPACE }}/${{ inputs.storage_dir || inputs.platform }}"
6368
MERGE_QUEUE_BASE_REF: "${{ github.event.merge_group.base_ref }}"

.github/actions/restore_artifacts/restore_artifacts.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ def main():
5050

5151
if args.commit_sha == 'latest_available_commit':
5252
latest_artifacts_link = artifact_utils.get_latest_artifacts_link(storage_dir, args.storage_root,
53-
args.branch_name, args.event_name)
53+
args.branch_name, args.event_name,
54+
args.product_name)
5455
latest_artifacts_path = PureWindowsPath(latest_artifacts_link.read_text())
5556
normalized_path = latest_artifacts_path.as_posix() if os.name == 'posix' else latest_artifacts_path
5657
storage = Path(args.storage_root) / normalized_path
5758
else:
5859
storage = artifact_utils.get_storage_dir(storage_dir, args.commit_sha, args.storage_root, args.branch_name,
59-
args.event_name)
60+
args.event_name, args.product_name)
6061

6162
action_utils.set_github_output("artifacts_storage_path", str(storage))
6263
logger.info(f"Artifacts are taken from here: {storage}")

.github/actions/store_artifacts/action.yml

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ inputs:
1919
branch_name:
2020
description: "Target branch name. If not set - taken from github context"
2121
required: false
22+
product_name:
23+
description: "Product name for which artifacts are generated"
24+
required: false
2225
trigger_repo_sha:
2326
description: "Commit hash of a trigger repo. If not set - taken from github context"
2427
required: false
@@ -54,10 +57,12 @@ runs:
5457
${{ inputs.storage_dir && env.STORAGE_PARAM || env.PLATFORM_PARAM }}
5558
${{ inputs.branch_name && env.BRANCH_PARAM || '' }}
5659
${{ inputs.event_name && env.EVENT_PARAM || '' }}
60+
${{ inputs.product_name && env.PRODUCT_NAME_PARAM || '' }}
5761
env:
5862
ACTION_PATH: ${{ runner.os == 'Windows' && '$env:GITHUB_ACTION_PATH' || '$GITHUB_ACTION_PATH' }}
5963
BRANCH_PARAM: "-b ${{ inputs.branch_name }}"
6064
EVENT_PARAM: "-e ${{ inputs.event_name }}"
6165
STORAGE_PARAM: "--storage_dir ${{ inputs.storage_dir }}"
6266
PLATFORM_PARAM: "--platform ${{ inputs.platform }}"
67+
PRODUCT_NAME_PARAM: "-n ${{ inputs.product_name }}"
6368
MERGE_QUEUE_BASE_REF: ""

.github/actions/store_artifacts/store_artifacts.py

+47-4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from __future__ import annotations
55

66
import argparse
7+
import hashlib
78
import logging
89
import os
910
import sys
@@ -62,6 +63,33 @@ def rotate_dir(directory: Path) -> bool:
6263
return True
6364

6465

66+
def generate_sha256sum(file_path: str | Path) -> str:
67+
"""
68+
Generates the SHA-256 checksum for the given file.
69+
70+
:param file_path: Path to the file
71+
:return: SHA-256 checksum as a hexadecimal string
72+
"""
73+
sha256 = hashlib.sha256()
74+
with open(file_path, 'rb') as file:
75+
for chunk in iter(lambda: file.read(4096), b''):
76+
sha256.update(chunk)
77+
return sha256.hexdigest()
78+
79+
80+
def store_checksums(artifact_path: Path) -> None:
81+
"""
82+
Generates SHA-256 checksums for a given artifact and stores them in separate files.
83+
84+
:param artifact_path: Path to either a single artifact file or the directory with files to generate checksums for
85+
"""
86+
files = [path for path in artifact_path.rglob('*') if path.is_file] if artifact_path.is_dir() else [artifact_path]
87+
for file in files:
88+
hashsum_filepath = file.with_suffix('.sha256')
89+
with open(hashsum_filepath, 'w') as hashsum_file:
90+
hashsum_file.write(generate_sha256sum(file))
91+
92+
6593
def main():
6694
action_utils.init_logger()
6795
logger = logging.getLogger(__name__)
@@ -70,7 +98,7 @@ def main():
7098
storage_root = args.storage_root or os.getenv('ARTIFACTS_SHARE')
7199
storage_dir = args.storage_dir or PlatformMapping[PlatformKey[args.platform.upper()]].value
72100
storage = artifact_utils.get_storage_dir(storage_dir, args.commit_sha, args.storage_root, args.branch_name,
73-
args.event_name)
101+
args.event_name, args.product_name)
74102
action_utils.set_github_output("artifacts_storage_path", str(storage))
75103

76104
logger.info(f"Storing artifacts to {storage}")
@@ -79,6 +107,14 @@ def main():
79107
error_found = False
80108
for artifact in args.artifacts.split():
81109
artifact_path = Path(artifact)
110+
111+
logger.debug(f"Calculating checksum for {artifact_path}")
112+
try:
113+
store_checksums(artifact_path)
114+
except Exception as e:
115+
logger.error(f'Failed to calculate checksum for {artifact}: {e}')
116+
error_found = True
117+
82118
logger.debug(f"Copying {artifact_path} to {storage / artifact_path.name}")
83119
try:
84120
with preserve_stats_context():
@@ -87,6 +123,9 @@ def main():
87123
else:
88124
storage.mkdir(parents=True, exist_ok=True)
89125
shutil.copy2(artifact_path, storage / artifact_path.name)
126+
if artifact_path.with_suffix('.sha256').exists():
127+
shutil.copy2(artifact_path.with_suffix('.sha256'),
128+
storage / artifact_path.with_suffix('.sha256').name)
90129
except Exception as e:
91130
logger.error(f'Failed to copy {artifact}: {e}')
92131
error_found = True
@@ -95,12 +134,16 @@ def main():
95134
if github_server: # If running from GHA context
96135
# TODO: write an exact job link, but it's not trivial to get
97136
workflow_link = f"{github_server}/{os.getenv('GITHUB_REPOSITORY')}/actions/runs/{os.getenv('GITHUB_RUN_ID')}"
98-
with open(storage / 'workflow_link.txt', 'w') as file:
137+
workflow_link_file = storage / 'workflow_link.txt'
138+
with open(workflow_link_file, 'w') as file:
99139
file.write(workflow_link)
140+
store_checksums(workflow_link_file)
100141

101-
if not error_found:
142+
# TODO: remove 'openvinotoolkit/openvino' condition when Tokenizers artifacts are stored in a separate structure
143+
if not error_found and os.getenv('GITHUB_REPOSITORY') == 'openvinotoolkit/openvino':
102144
latest_artifacts_for_branch = artifact_utils.get_latest_artifacts_link(storage_dir, args.storage_root,
103-
args.branch_name, args.event_name)
145+
args.branch_name, args.event_name,
146+
args.product_name)
104147
# Overwrite path to "latest" built artifacts only if a given commit is the head of a given branch
105148
if args.event_name != 'pull_request' and args.commit_sha == os.getenv('GITHUB_SHA'):
106149
# TODO: lock to avoid corruption in case of a parallel build (unlikely event for now, but still)

.github/dependabot.yml

-3
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,11 @@ updates:
1515
timezone: "Poland"
1616
open-pull-requests-limit: 3
1717
assignees:
18-
- "jiwaszki"
1918
- "p-wysocki"
2019
- "akuporos"
2120
- "rkazants"
2221
- "ceciliapeng2011"
2322
- "meiyang-intel"
24-
- "mbencer"
25-
- "tomdol"
2623
- "jane-intel"
2724
versioning-strategy: increase-if-necessary
2825

.github/dockerfiles/docker_tag

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pr-28725
1+
pr-28972

.github/dockerfiles/ov_test/ubuntu_22_04_x64/Dockerfile

+7
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ RUN apt-get update && \
3232
libhdf5-dev \
3333
# For TF Models tests
3434
wget \
35+
# libGL for PyTorch Models tests
36+
ffmpeg \
37+
libsm6 \
38+
libxext6 \
39+
libgl1 \
40+
libgl1-mesa-glx \
41+
libglib2.0-0 \
3542
&& \
3643
rm -rf /var/lib/apt/lists/*
3744

.github/workflows/build_doc.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
packages: graphviz texlive liblua5.2-0 libclang1-9 libclang-cpp9
3131
version: 3.0
3232

33-
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
33+
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
3434
id: cp310
3535
with:
3636
python-version: '3.10'
@@ -64,7 +64,7 @@ jobs:
6464
6565
- name: Cache documentation
6666
id: cache_sphinx_docs
67-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
67+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
6868
with:
6969
path: build/docs/_build/.doctrees
7070
key: sphinx-docs-cache

.github/workflows/cleanup_caches.yml

+31-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions: read-all
1010
jobs:
1111
Cleanup_PIP:
1212
name: Cleanup PIP cache
13-
runs-on: aks-linux-2-cores-8gb
13+
runs-on: aks-linux-small
1414
if: ${{ github.repository_owner == 'openvinotoolkit' }}
1515
container:
1616
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
@@ -35,9 +35,36 @@ jobs:
3535
echo "Cache info: "
3636
du -h -d2 ${PIP_CACHE_PATH}
3737
38+
Cleanup_HF_Cache:
39+
name: Cleanup HuggingFace cache
40+
runs-on: aks-linux-4-cores-16gb
41+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
42+
container:
43+
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
44+
volumes:
45+
- /mount:/mount
46+
env:
47+
HF_CACHE_PATH: /mount/caches/huggingface
48+
49+
steps:
50+
- name: Checkout cache action
51+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
52+
timeout-minutes: 15
53+
with:
54+
sparse-checkout: .github/actions/cache
55+
56+
- name: Cleanup HF cache
57+
uses: ./.github/actions/cache/cleanup
58+
with:
59+
cache-size: 1700
60+
max-cache-size: 2000
61+
cache-path: ${{ env.HF_CACHE_PATH }}
62+
recursive: true
63+
key: '.'
64+
3865
Cleanup_ccache_lin:
3966
name: Cleanup Linux ccache
40-
runs-on: aks-linux-2-cores-8gb
67+
runs-on: aks-linux-small
4168
if: ${{ github.repository_owner == 'openvinotoolkit' }}
4269
container:
4370
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
@@ -47,7 +74,7 @@ jobs:
4774
CCACHE_PATH: /mount/caches/ccache
4875

4976
steps:
50-
- name: Checkout cach action
77+
- name: Checkout cache action
5178
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5279
timeout-minutes: 15
5380
with:
@@ -70,7 +97,7 @@ jobs:
7097
CCACHE_PATH: C:\\mount\\caches\\ccache
7198

7299
steps:
73-
- name: Checkout cach action
100+
- name: Checkout cache action
74101
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
75102
timeout-minutes: 15
76103
with:

.github/workflows/coverage.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ jobs:
2020

2121
steps:
2222
- name: Setup python
23-
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
23+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
2424
with:
2525
python-version: '3.10.10'
2626
architecture: 'x64'
2727

2828

2929
- name: Setup ccache
30-
uses: hendrikmuhs/ccache-action@53911442209d5c18de8a31615e0923161e435875 # v1.2.16
30+
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
3131
with:
3232
max-size: 50G
3333

@@ -63,7 +63,6 @@ jobs:
6363
-DCMAKE_VERBOSE_MAKEFILE=ON
6464
-DENABLE_PYTHON=ON
6565
-DENABLE_ONEDNN_FOR_GPU=ON
66-
-DBUILD_SHARED_LIBS=ON
6766
-DENABLE_TESTS=ON
6867
-DENABLE_OV_ONNX_FRONTEND=ON
6968
-DENABLE_FASTER_BUILD=ON
@@ -130,6 +129,6 @@ jobs:
130129
lcov --capture --directory ${{ github.workspace }}/. --output-file coverage.info
131130
genhtml coverage.info --output-directory coverage-report
132131
- name: Collect coverage
133-
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
132+
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
134133
with:
135134
verbose: true

.github/workflows/debian_10_arm.yml

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ jobs:
122122
runner: 'aks-linux-16-cores-arm'
123123
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.debian_10_arm }}
124124
python-version: '3.7'
125+
scope: ${{ github.event_name == 'workflow_dispatch' && 'nightly' || 'smoke' }}
125126

126127
Overall_Status:
127128
name: ci/gha_overall_status_debian_10_arm

0 commit comments

Comments
 (0)