OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[GHA] Don't run pipelines by default for draft but allow manual restart (#31996)
Alina Kladieva5161b6cdc85d
diff --git a/.github/workflows/android.yml b/.github/workflows/android.ymlindex 494eab22387..a323867186e 100644--- a/.github/workflows/android.yml+++ b/.github/workflows/android.yml@@ -7,6 +7,11 @@ on:type: stringrequired: falsepull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewmerge_group:push:branches:@@ -23,6 +28,7 @@ permissions: read-alljobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.ymlindex 61fbb9d4982..5856d11aa7c 100644--- a/.github/workflows/build_doc.yml+++ b/.github/workflows/build_doc.yml@@ -1,6 +1,11 @@name: Documentationon:pull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewmerge_group:concurrency:@@ -12,6 +17,7 @@ permissions: read-alljobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/clang_tidy.yml b/.github/workflows/clang_tidy.ymlindex a0f832a27a6..36392f8e8ee 100644--- a/.github/workflows/clang_tidy.yml+++ b/.github/workflows/clang_tidy.yml@@ -2,6 +2,11 @@ name: Clang-tidy static analysis (Ubuntu 24.04, Python 3.12, Clang-18, Clang-tidon:workflow_dispatch:pull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewmerge_group:push:branches:@@ -21,6 +26,7 @@ env:jobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.ymlindex 1b0eb507d7d..0dda4641018 100644--- a/.github/workflows/code_style.yml+++ b/.github/workflows/code_style.yml@@ -1,5 +1,12 @@name: Code Style-on: [pull_request, merge_group]+on:+ pull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_review+ merge_group:concurrency:group: ${{ github.workflow }}-${{ github.ref }}@@ -10,6 +17,7 @@ permissions: read-alljobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.ymlindex 4a68a7245e4..e7f083f9b9f 100644--- a/.github/workflows/coverity.yml+++ b/.github/workflows/coverity.yml@@ -15,6 +15,12 @@ on:schedule:# run daily at 00:00- cron: '0 0 * * *'+ # pull_request:+ # types:+ # - opened+ # - synchronize+ # - reopened+ # - ready_for_reviewconcurrency:# github.ref is not unique in post-commit@@ -32,6 +38,7 @@ jobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/debian_10_arm.yml b/.github/workflows/debian_10_arm.ymlindex c29ffb000dd..420d64d7b38 100644--- a/.github/workflows/debian_10_arm.yml+++ b/.github/workflows/debian_10_arm.yml@@ -7,6 +7,11 @@ on:type: stringrequired: falsepull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewmerge_group:push:branches:@@ -23,6 +28,7 @@ permissions: read-alljobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/dev_cpu_linux_snippets_libxsmm.yml b/.github/workflows/dev_cpu_linux_snippets_libxsmm.ymlindex d2c2db9b49d..dcc7e730992 100644--- a/.github/workflows/dev_cpu_linux_snippets_libxsmm.yml+++ b/.github/workflows/dev_cpu_linux_snippets_libxsmm.yml@@ -2,6 +2,11 @@ name: Linux CPU Plugin Snippets with LIBXSMM (Ubuntu 22.04)on:workflow_dispatch:pull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewpaths:- '.github/workflows/dev_cpu_linux_snippets_libxsmm.yml'- 'src/common/snippets/**'@@ -26,6 +31,7 @@ env:jobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/fedora_29.yml b/.github/workflows/fedora_29.ymlindex 49ec87ab48d..d1694a82f8b 100644--- a/.github/workflows/fedora_29.yml+++ b/.github/workflows/fedora_29.yml@@ -7,6 +7,11 @@ on:type: stringrequired: falsepull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewmerge_group:push:branches:@@ -23,6 +28,7 @@ permissions: read-alljobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/linux_arm64.yml b/.github/workflows/linux_arm64.ymlindex 790c140d268..c1d4a78eaf7 100644--- a/.github/workflows/linux_arm64.yml+++ b/.github/workflows/linux_arm64.yml@@ -7,6 +7,11 @@ on:type: stringrequired: falsepull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewmerge_group:push:branches:@@ -27,6 +32,7 @@ env:jobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/linux_conditional_compilation.yml b/.github/workflows/linux_conditional_compilation.ymlindex 84f5f8065d5..9ce7588b8ee 100644--- a/.github/workflows/linux_conditional_compilation.yml+++ b/.github/workflows/linux_conditional_compilation.yml@@ -7,6 +7,11 @@ on:type: stringrequired: falsepull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewmerge_group:push:branches:@@ -28,6 +33,7 @@ env:jobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/linux_riscv.yml b/.github/workflows/linux_riscv.ymlindex 3d9cec45389..83b03a2fe56 100644--- a/.github/workflows/linux_riscv.yml+++ b/.github/workflows/linux_riscv.yml@@ -7,6 +7,11 @@ on:type: stringrequired: falsepull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewmerge_group:push:branches:@@ -26,6 +31,7 @@ env:jobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/linux_riscv_xuantie_dev_cpu.yml b/.github/workflows/linux_riscv_xuantie_dev_cpu.ymlindex 3edfaec5eaf..48960ddbfd7 100644--- a/.github/workflows/linux_riscv_xuantie_dev_cpu.yml+++ b/.github/workflows/linux_riscv_xuantie_dev_cpu.yml@@ -11,6 +11,11 @@ on:required: truedefault: 'CONCISE'pull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewpaths:- '.github/workflows/linux_riscv_xuantie_dev_cpu.yml'- 'src/plugins/intel_cpu/src/emitters/plugin/aarch64/**'@@ -45,6 +50,7 @@ env:jobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/linux_sanitizers.yml b/.github/workflows/linux_sanitizers.ymlindex f0d75455533..1e4491bfdfb 100644--- a/.github/workflows/linux_sanitizers.yml+++ b/.github/workflows/linux_sanitizers.yml@@ -19,6 +19,11 @@ on:type: stringrequired: falsepull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewpaths:- '.github/workflows/linux_sanitizers.yml'@@ -43,6 +48,7 @@ env:jobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.ymlindex aeb775efad8..da5615768d6 100644--- a/.github/workflows/mac.yml+++ b/.github/workflows/mac.yml@@ -46,6 +46,7 @@ jobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/mac_arm64.yml b/.github/workflows/mac_arm64.ymlindex 0151007e93a..0841a275720 100644--- a/.github/workflows/mac_arm64.yml+++ b/.github/workflows/mac_arm64.yml@@ -46,6 +46,7 @@ env:jobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"diff --git a/.github/workflows/manylinux_2014.yml b/.github/workflows/manylinux_2014.ymlindex 2739617c173..f2c13dfa41b 100644--- a/.github/workflows/manylinux_2014.yml+++ b/.github/workflows/manylinux_2014.yml@@ -7,6 +7,11 @@ on:type: stringrequired: falsepull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewmerge_group:push:branches:@@ -26,6 +31,7 @@ env:jobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/manylinux_2_28.yml b/.github/workflows/manylinux_2_28.ymlindex d9b64a4a123..4cd633a59db 100644--- a/.github/workflows/manylinux_2_28.yml+++ b/.github/workflows/manylinux_2_28.yml@@ -7,6 +7,11 @@ on:type: stringrequired: falsepull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewmerge_group:push:branches:@@ -26,6 +31,7 @@ env:jobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/ovc.yml b/.github/workflows/ovc.ymlindex 25093b0302d..0571328dbab 100644--- a/.github/workflows/ovc.yml+++ b/.github/workflows/ovc.yml@@ -12,6 +12,11 @@ on:- 'master'- 'releases/**'pull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewconcurrency:group: ${{ github.workflow }}-${{ github.ref }}diff --git a/.github/workflows/py_checks.yml b/.github/workflows/py_checks.ymlindex bb427dd459b..c2b592d4f66 100644--- a/.github/workflows/py_checks.yml+++ b/.github/workflows/py_checks.yml@@ -11,6 +11,11 @@ on:- 'master'- 'releases/**'pull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewpaths:- 'src/bindings/python/**'- 'samples/python/**'diff --git a/.github/workflows/ubuntu_22.yml b/.github/workflows/ubuntu_22.ymlindex c381f3c267a..a9a18b73761 100644--- a/.github/workflows/ubuntu_22.yml+++ b/.github/workflows/ubuntu_22.yml@@ -10,6 +10,11 @@ on:type: stringrequired: falsepull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewmerge_group:push:branches:@@ -31,6 +36,7 @@ env:jobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/ubuntu_22_arm64_cross_compilation.yml b/.github/workflows/ubuntu_22_arm64_cross_compilation.ymlindex 113d409484c..3150e2d87ed 100644--- a/.github/workflows/ubuntu_22_arm64_cross_compilation.yml+++ b/.github/workflows/ubuntu_22_arm64_cross_compilation.yml@@ -7,6 +7,11 @@ on:type: stringrequired: falsepull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewmerge_group:push:branches:@@ -28,6 +33,7 @@ env:jobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/ubuntu_22_dpcpp.yml b/.github/workflows/ubuntu_22_dpcpp.ymlindex 6ca1649630f..eea04eb2dff 100644--- a/.github/workflows/ubuntu_22_dpcpp.yml+++ b/.github/workflows/ubuntu_22_dpcpp.yml@@ -19,6 +19,7 @@ permissions: read-alljobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/ubuntu_24.yml b/.github/workflows/ubuntu_24.ymlindex f2654e967c9..96c6c172c9b 100644--- a/.github/workflows/ubuntu_24.yml+++ b/.github/workflows/ubuntu_24.yml@@ -7,6 +7,11 @@ on:type: stringrequired: falsepull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewmerge_group:push:branches:@@ -26,6 +31,7 @@ env:jobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/webassembly.yml b/.github/workflows/webassembly.ymlindex c9726f578d0..d52fbfadd4f 100644--- a/.github/workflows/webassembly.yml+++ b/.github/workflows/webassembly.yml@@ -7,6 +7,11 @@ on:type: stringrequired: falsepull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewmerge_group:push:branches:@@ -23,6 +28,7 @@ permissions: read-alljobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"changed_components: "${{ steps.smart_ci.outputs.changed_components }}"diff --git a/.github/workflows/windows_conditional_compilation.yml b/.github/workflows/windows_conditional_compilation.ymlindex 88423661698..4e88db1badb 100644--- a/.github/workflows/windows_conditional_compilation.yml+++ b/.github/workflows/windows_conditional_compilation.yml@@ -10,6 +10,11 @@ on:# run daily at 00:00- cron: '0 0 * * *'pull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewmerge_group:push:branches:@@ -30,6 +35,7 @@ env:jobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"diff --git a/.github/workflows/windows_vs2022_debug.yml b/.github/workflows/windows_vs2022_debug.ymlindex c1b5ed70616..464f62b2e3e 100644--- a/.github/workflows/windows_vs2022_debug.yml+++ b/.github/workflows/windows_vs2022_debug.yml@@ -8,6 +8,11 @@ on:required: falsemerge_group:pull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewpush:branches:- master@@ -25,6 +30,7 @@ env:jobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"diff --git a/.github/workflows/windows_vs2022_release.yml b/.github/workflows/windows_vs2022_release.ymlindex c7c24fb15dc..e259499ad90 100644--- a/.github/workflows/windows_vs2022_release.yml+++ b/.github/workflows/windows_vs2022_release.yml@@ -7,6 +7,11 @@ on:type: stringrequired: falsepull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_reviewmerge_group:push:branches:@@ -27,6 +32,7 @@ permissions: read-alljobs:Smart_CI:runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1outputs:affected_components: "${{ steps.smart_ci.outputs.affected_components }}"skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"@@ -506,6 +512,7 @@ jobs:name: Pytorch Layer Testsneeds: [ Build, Smart_CI ]uses: ./.github/workflows/job_pytorch_layer_tests.yml+ if: ${{ fromJSON(needs.smart_ci.outputs.affected_components).PyTorch_FE.test }}with:runner: 'aks-win-8-cores-16gb-test'affected-components: ${{ needs.smart_ci.outputs.affected_components }}@@ -515,6 +522,7 @@ jobs:name: Pytorch FX Layer Testsneeds: [ Build, Smart_CI ]uses: ./.github/workflows/job_pytorch_fx_layer_tests.yml+ if: ${{ fromJSON(needs.smart_ci.outputs.affected_components).PyTorch_FE.test }}with:runner: 'aks-win-8-cores-16gb-test'affected-components: ${{ needs.smart_ci.outputs.affected_components }}@@ -524,6 +532,7 @@ jobs:name: JAX Layer Testsneeds: [ Build, Smart_CI ]uses: ./.github/workflows/job_jax_layer_tests.yml+ if: ${{ fromJSON(needs.smart_ci.outputs.affected_components).JAX_FE.test }}with:runner: 'aks-win-8-cores-16gb-test'affected-components: ${{ needs.smart_ci.outputs.affected_components }}diff --git a/docs/dev/ci/github_actions/smart_ci.md b/docs/dev/ci/github_actions/smart_ci.mdindex 8a9c2264d3d..c8737649bda 100644--- a/docs/dev/ci/github_actions/smart_ci.md+++ b/docs/dev/ci/github_actions/smart_ci.md@@ -357,4 +357,33 @@ with OpenVINO. Provide it with an "if" condition: `if: fromJSON(needs.smart_ci.oas described in step 3 of [Adding a New component](#adding-a-new-component) instruction.This ensures that integration validation for this external component starts only on changes-made to the selected components in the OpenVINO repository.\ No newline at end of file+made to the selected components in the OpenVINO repository.++### Disabling Workflow Run in Draft PRs++To reduce the number of unnecessary workflow runs in PRs not yet ready for review, we strongly recommend including the following "if" condition to the Smart CI job:+```yaml+jobs:+ Smart_CI:+ runs-on: ubuntu-latest+ if: github.event.pull_request.draft == false || github.run_attempt > 1+ ...+```+This will ensure that the workflow won't be executed automatically for PRs in draft status. You will still be able to execute selected workflows for draft PRs manually by re-running the corresponding Smart CI job. The easiest way to do this is as follows:++From the main page of the draft PR, go to the "Checks" tab -> in the left menu choose the workflow that you'd like to execute -> press the "Re-run all jobs" button.+Detailed instruction: [Re-running all the jobs in a workflow](https://docs.github.com/en/actions/how-tos/manage-workflow-runs/re-run-workflows-and-jobs#re-running-all-the-jobs-in-a-workflow)++>**NOTE**: If you add the condition above, make sure to update the triggers section of the workflow as follows, to ensure that all checks will be re-executed once the PR is converted from draft to "ready for review":++```yaml+on:+...+ pull_request:+ types:+ - opened+ - synchronize+ - reopened+ - ready_for_review+...+```\ No newline at end of file