Skip to content

Commit f4eec73

Browse files
authored
Merge branch 'master' into gha/cache_fixes
2 parents f318226 + 2659786 commit f4eec73

Some content is hidden

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

53 files changed

+370
-133
lines changed

.github/actions/smart-ci/action.yml

+5
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ inputs:
4343
description: "Comma-separated list of patterns (fnmatch-style). If PR has only matching files changed,
4444
return indicator that CI can be skipped"
4545
required: false
46+
enable_for_org:
47+
description: "Enables running workflows for a given organization; triggers from other orgs are skipped"
48+
required: false
49+
default: "openvinotoolkit"
4650

4751
outputs:
4852
all_components:
@@ -99,6 +103,7 @@ runs:
99103
-c "${{ inputs.components_config }}" \
100104
-m "${{ inputs.components_config_schema }}" \
101105
-l "${{ inputs.labeler_config }}" \
106+
--enable_for_org "${{ inputs.enable_for_org }}" \
102107
--skip-when-only-listed-labels-set "${{ inputs.skip_when_only_listed_labels_set }}" \
103108
--skip-when-only-listed-files-changed "${{ inputs.skip_when_only_listed_files_changed }}"
104109
shell: bash

.github/actions/smart-ci/smart_ci.py

+11
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import os
55
import re
66
import argparse
7+
import sys
8+
79
import yaml
810
import json
911
import jsonschema
@@ -146,6 +148,8 @@ def parse_args():
146148
parser.add_argument('--skip-when-only-listed-files-changed',
147149
help="Comma-separated list of patterns (fnmatch-style). If PR has only matching files changed, "
148150
"return indicator that CI can be skipped")
151+
parser.add_argument('--enable_for_org', default='openvinotoolkit',
152+
help='Enable running workflows for a given organization; triggers from other orgs are skipped')
149153
args = parser.parse_args()
150154
return args
151155

@@ -176,6 +180,13 @@ def main():
176180
components_config = yaml.safe_load(config)
177181

178182
owner, repository = args.repo.split('/')
183+
184+
if owner != args.enable_for_org:
185+
logger.info(f"Running workflows is enabled only for repos in {args.enable_for_org} organization. "
186+
f"The current workflow was initiated from other org: {owner}, skipping")
187+
set_github_output("skip_workflow", "True")
188+
sys.exit(0)
189+
179190
gh_api = GhApi(owner=owner, repo=repository, token=os.getenv("GITHUB_TOKEN"))
180191
pr = gh_api.pulls.get(args.pr) if args.pr else None
181192

.github/workflows/android_arm64.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343

4444
Docker:
4545
needs: Smart_CI
46+
if: "!needs.smart_ci.outputs.skip_workflow"
4647
runs-on: aks-linux-4-cores-16gb-docker-build
4748
container:
4849
image: openvinogithubactions.azurecr.io/docker_build:0.2
@@ -95,7 +96,6 @@ jobs:
9596
VCPKG_DEFAULT_BINARY_CACHE: '/mount/caches/ccache/android_arm64/vcpkg_cache'
9697
VCPKG_FORCE_SYSTEM_BINARIES: '1'
9798
SCCACHE_AZURE_KEY_PREFIX: android_arm64
98-
if: "!needs.smart_ci.outputs.skip_workflow"
9999
steps:
100100
- name: Clone OpenVINO
101101
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

.github/workflows/android_x64.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646

4747
Docker:
4848
needs: Smart_CI
49+
if: "!needs.smart_ci.outputs.skip_workflow"
4950
runs-on: aks-linux-4-cores-16gb-docker-build
5051
container:
5152
image: openvinogithubactions.azurecr.io/docker_build:0.2
@@ -94,7 +95,6 @@ jobs:
9495
ANDROID_SDK_VERSION: 29
9596
ANDROID_ABI_CONFIG: x86_64
9697
SCCACHE_AZURE_KEY_PREFIX: android_x64
97-
if: "!needs.smart_ci.outputs.skip_workflow"
9898
steps:
9999
- name: Clone OpenVINO
100100
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

.github/workflows/assign_issue.yml

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
permissions:
1616
issues: write
1717
timeout-minutes: 10
18+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
1819
steps:
1920
- name: take an issue
2021
uses: bdougie/take-action@1439165ac45a7461c2d89a59952cd7d941964b87 # v1.6.1

.github/workflows/build_doc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ permissions: read-all
1515
jobs:
1616
Build_Doc:
1717
runs-on: ubuntu-20.04
18+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
1819
steps:
1920
- name: Clone OpenVINO
2021
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

.github/workflows/check_pr_commits.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ permissions: read-all
66
jobs:
77
Checks:
88
runs-on: ubuntu-22.04
9+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
910
steps:
1011
- name: Clone OpenVINO
1112
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

.github/workflows/cleanup_caches.yml

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
Cleanup_PIP:
1313
name: Cleanup PIP cache
1414
runs-on: aks-linux-2-cores-8gb
15+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
1516
container:
1617
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
1718
volumes:
@@ -38,6 +39,7 @@ jobs:
3839
Cleanup_ccache_lin:
3940
name: Cleanup Linux ccache
4041
runs-on: aks-linux-2-cores-8gb
42+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
4143
container:
4244
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
4345
volumes:

.github/workflows/code_snippets.yml

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
matrix:
2626
os: ['ubuntu-22.04', 'macos-latest', 'windows-latest']
2727
runs-on: ${{ matrix.os }}
28+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
2829
steps:
2930
- name: Clone OpenVINO
3031
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

.github/workflows/code_style.yml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
runs-on: ubuntu-22.04
1313
permissions:
1414
pull-requests: write
15+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
1516
steps:
1617
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
1718
with:

.github/workflows/coverity.yml

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
run:
3232
shell: bash
3333
runs-on: aks-linux-16-cores-32gb
34+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
3435
container:
3536
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
3637
env:

.github/workflows/debian_10_arm.yml

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848

4949
Docker:
5050
needs: Smart_CI
51+
if: "!needs.smart_ci.outputs.skip_workflow"
5152
runs-on: aks-linux-16-cores-arm-docker-build
5253
container:
5354
image: openvinogithubactions.azurecr.io/docker_build:0.2

.github/workflows/dependency_review.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ permissions: read-all
66
jobs:
77
dependency-review:
88
runs-on: ubuntu-latest
9+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
910
steps:
1011
- name: Clone OpenVINO
1112
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

.github/workflows/fedora_29.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848

4949
Docker:
5050
needs: Smart_CI
51+
if: "!needs.smart_ci.outputs.skip_workflow"
5152
runs-on: aks-linux-4-cores-16gb-docker-build
5253
container:
5354
image: openvinogithubactions.azurecr.io/docker_build:0.2
@@ -71,7 +72,6 @@ jobs:
7172

7273
Build:
7374
needs: [Docker, Smart_CI]
74-
if: "!needs.smart_ci.outputs.skip_workflow"
7575
uses: ./.github/workflows/job_build_linux.yml
7676
with:
7777
runner: 'aks-linux-16-cores-32gb'

.github/workflows/files_size.yml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permissions: read-all
1010
jobs:
1111
Check_Files_Size:
1212
runs-on: ubuntu-22.04
13+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
1314
steps:
1415
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
1516

.github/workflows/linux_arm64.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252

5353
Docker:
5454
needs: Smart_CI
55+
if: "!needs.smart_ci.outputs.skip_workflow"
5556
runs-on: aks-linux-16-cores-arm-docker-build
5657
container:
5758
image: openvinogithubactions.azurecr.io/docker_build:0.2
@@ -75,7 +76,6 @@ jobs:
7576

7677
Build:
7778
needs: [ Docker, Smart_CI ]
78-
if: "!needs.smart_ci.outputs.skip_workflow"
7979
uses: ./.github/workflows/job_build_linux.yml
8080
with:
8181
runner: 'aks-linux-16-cores-arm'

.github/workflows/linux_conditional_compilation.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ jobs:
5353

5454
Docker:
5555
needs: Smart_CI
56+
if: "!needs.smart_ci.outputs.skip_workflow"
5657
runs-on: aks-linux-4-cores-16gb-docker-build
5758
container:
5859
image: openvinogithubactions.azurecr.io/docker_build:0.2
@@ -104,7 +105,7 @@ jobs:
104105
SELECTIVE_BUILD_STAT_DIR: /__w/openvino/openvino/selective_build_stat
105106
MODELS_PATH: /__w/openvino/openvino/testdata
106107
SCCACHE_AZURE_KEY_PREFIX: ubuntu22_x86_64_itt_clang_Release_faster_build
107-
if: ${{ !needs.smart_ci.outputs.skip_workflow && github.event_name != 'merge_group' }}
108+
if: ${{ github.event_name != 'merge_group' }}
108109

109110
steps:
110111
- name: Clone OpenVINO

.github/workflows/linux_riscv.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
Docker:
4545
needs: Smart_CI
4646
runs-on: aks-linux-4-cores-16gb-docker-build
47+
if: "!needs.smart_ci.outputs.skip_workflow"
4748
container:
4849
image: openvinogithubactions.azurecr.io/docker_build:0.2
4950
volumes:
@@ -88,7 +89,7 @@ jobs:
8889
CCACHE_TEMPDIR: /__w/openvino/openvino/ccache_temp
8990
CCACHE_MAXSIZE: 2G
9091

91-
if: ${{ !needs.smart_ci.outputs.skip_workflow && github.event_name != 'merge_group' }}
92+
if: ${{ github.event_name != 'merge_group' }}
9293
steps:
9394
- name: Clone OpenVINO
9495
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

.github/workflows/linux_sanitizers.yml

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
run:
2626
shell: bash
2727
runs-on: aks-linux-16-cores-32gb
28+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
2829
container:
2930
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
3031
volumes:

.github/workflows/mac.yml

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ jobs:
7878
INSTALL_DIR_JS: ${{ github.workspace }}/openvino_install/js
7979
INSTALL_TEST_DIR: ${{ github.workspace }}/tests_install
8080
BUILD_DIR: ${{ github.workspace }}/build
81+
if: "!needs.smart_ci.outputs.skip_workflow"
8182
steps:
8283
- name: Clone OpenVINO
8384
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

.github/workflows/mac_arm64.yml

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ jobs:
7878
INSTALL_DIR_JS: ${{ github.workspace }}/openvino_install/js
7979
INSTALL_TEST_DIR: ${{ github.workspace }}/tests_install
8080
BUILD_DIR: ${{ github.workspace }}/build
81+
if: "!needs.smart_ci.outputs.skip_workflow"
8182
steps:
8283
- name: Clone OpenVINO
8384
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

.github/workflows/mo.yml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ permissions: read-all
2121
jobs:
2222
Pylint-UT:
2323
runs-on: ubuntu-22.04
24+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
2425
steps:
2526
- name: Clone OpenVINO
2627
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

.github/workflows/ovc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ permissions: read-all
1616
jobs:
1717
Pylint-UT:
1818
runs-on: ubuntu-22.04
19+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
1920
steps:
2021
- name: Clone OpenVINO
2122
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

.github/workflows/py_checks.yml

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ permissions: read-all
2525
jobs:
2626
linters:
2727
runs-on: ubuntu-20.04
28+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
2829
steps:
2930
- name: Clone OpenVINO
3031
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

.github/workflows/send_workflows_to_opentelemetry.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
otel-export-trace:
3838
name: Export finished workflow metrics
3939
runs-on: aks-linux-2-cores-8gb
40-
if: github.repository == 'openvinotoolkit/openvino'
40+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
4141

4242
steps:
4343
- name: Checkout

.github/workflows/stale_prs_and_issues.yml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
issues: write
1313
pull-requests: write
1414
runs-on: ubuntu-latest
15+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
1516
steps:
1617
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
1718
with:

.github/workflows/ubuntu_20.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454

5555
Docker:
5656
needs: Smart_CI
57+
if: "!needs.smart_ci.outputs.skip_workflow"
5758
runs-on: aks-linux-4-cores-16gb-docker-build
5859
container:
5960
image: openvinogithubactions.azurecr.io/docker_build:0.2
@@ -77,7 +78,6 @@ jobs:
7778

7879
Build:
7980
needs: [Docker, Smart_CI]
80-
if: "!needs.smart_ci.outputs.skip_workflow"
8181
uses: ./.github/workflows/job_build_linux.yml
8282
with:
8383
runner: 'aks-linux-16-cores-32gb'

.github/workflows/ubuntu_22.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656

5757
Docker:
5858
needs: Smart_CI
59+
if: "!needs.smart_ci.outputs.skip_workflow"
5960
runs-on: aks-linux-4-cores-16gb-docker-build
6061
container:
6162
image: openvinogithubactions.azurecr.io/docker_build:0.2
@@ -80,7 +81,6 @@ jobs:
8081

8182
Build:
8283
needs: [Docker, Smart_CI]
83-
if: "!needs.smart_ci.outputs.skip_workflow"
8484
uses: ./.github/workflows/job_build_linux.yml
8585
with:
8686
runner: 'aks-linux-16-cores-32gb'

.github/workflows/ubuntu_22_dpcpp.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444

4545
Docker:
4646
needs: Smart_CI
47+
if: "!needs.smart_ci.outputs.skip_workflow"
4748
runs-on: aks-linux-4-cores-16gb-docker-build
4849
container:
4950
image: openvinogithubactions.azurecr.io/docker_build:0.2
@@ -66,7 +67,6 @@ jobs:
6667

6768
Build:
6869
needs: [Docker, Smart_CI]
69-
if: "!needs.smart_ci.outputs.skip_workflow"
7070
uses: ./.github/workflows/job_build_linux.yml
7171
with:
7272
runner: 'aks-linux-16-cores-32gb'

.github/workflows/ubuntu_24.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151

5252
Docker:
5353
needs: Smart_CI
54+
if: "!needs.smart_ci.outputs.skip_workflow"
5455
runs-on: aks-linux-4-cores-16gb-docker-build
5556
container:
5657
image: openvinogithubactions.azurecr.io/docker_build:0.2
@@ -74,7 +75,6 @@ jobs:
7475

7576
Build:
7677
needs: [Docker, Smart_CI]
77-
if: "!needs.smart_ci.outputs.skip_workflow"
7878
uses: ./.github/workflows/job_build_linux.yml
7979
with:
8080
runner: 'aks-linux-16-cores-32gb'

.github/workflows/webassembly.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848

4949
Docker:
5050
needs: Smart_CI
51+
if: "!needs.smart_ci.outputs.skip_workflow"
5152
runs-on: aks-linux-4-cores-16gb-docker-build
5253
container:
5354
image: openvinogithubactions.azurecr.io/docker_build:0.2
@@ -88,7 +89,6 @@ jobs:
8889
OPENVINO_REPO: /__w/openvino/openvino/openvino
8990
OPENVINO_BUILD_DIR: /__w/openvino/openvino/openvino_build
9091
SCCACHE_AZURE_KEY_PREFIX: webassembly_Release
91-
if: "!needs.smart_ci.outputs.skip_workflow"
9292
steps:
9393
- name: Clone OpenVINO
9494
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

.github/workflows/workflow_rerunner.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ permissions: read-all
2121
jobs:
2222
rerun:
2323
name: Rerun Workflow
24-
if: ${{ github.event.workflow_run.conclusion == 'failure' }} # Run only for the failed workflows
24+
# Run only for the failed workflows in openvinotoolkit org
25+
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.repository_owner == 'openvinotoolkit' }}
2526
runs-on: aks-linux-2-cores-8gb
2627
permissions:
2728
actions: write

0 commit comments

Comments
 (0)