[CI] [GHA] Build Samples in the Build jobs, and add them to the openvino_package - #37221
[CI] [GHA] Build Samples in the Build jobs, and add them to the openvino_package#37221akashchi wants to merge 7 commits into
Build jobs, and add them to the openvino_package#37221Conversation
Build jobs, and add them into the openvino_packageBuild jobs, and add them to the openvino_package
mryzhov
left a comment
There was a problem hiding this comment.
I would suggest enabling the samples building in the build job by cmake option: ENABLE_SAMPLES in pipelines where we need to build all of them, for benchmark_app we can use build_samples.sh -i ${INSTALL_DIR} -b ${BUILD_DIR}/cpp_samples/benchmark_app.
At this approach we will not upload all the samples (just a benchmark_app)
There was a problem hiding this comment.
Pull request overview
This PR updates OpenVINO’s GitHub Actions CI so that C++/C samples are built during the main Build reusable workflows and their binaries are included in the produced openvino_package artifacts, reducing duplicated work in downstream test jobs.
Changes:
- Add a
build-samplesworkflow_call input tojob_build_linux.ymlandjob_build_windows.yml, and build/install sample binaries into${INSTALL_DIR}/samples_binwhen enabled. - Enable
build-samples: truein key platform pipelines (Ubuntu 22/24, Linux arm64, Windows VS2022 Release, Level Zero GPU dev flow). - Remove redundant sample build steps from
job_samples_tests.ymlandjob_gpu_tests.yml(keeping only a Linux Clang rebuild check for C++ samples), and add a samples build step tomac_arm64.ymlbefore packing artifacts.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/windows_vs2022_release.yml | Enables building samples in the Build job and removes redundant per-job PS sample builds. |
| .github/workflows/ubuntu_24.yml | Enables build-samples in the Linux build reusable workflow call. |
| .github/workflows/ubuntu_22.yml | Enables build-samples in the Linux build reusable workflow call. |
| .github/workflows/mac_arm64.yml | Builds and installs C++/C samples before packing openvino_package on macOS arm64. |
| .github/workflows/linux_arm64.yml | Enables build-samples in the Linux arm64 build reusable workflow call. |
| .github/workflows/job_samples_tests.yml | Removes GCC sample rebuilds; keeps a Linux Clang rebuild check and relies on samples_bin from openvino_package. |
| .github/workflows/job_gpu_tests.yml | Stops rebuilding samples in GPU tests; relies on sample binaries provided by openvino_package. |
| .github/workflows/job_build_windows.yml | Adds build-samples input and conditionally builds/installs C++/C samples into the package. |
| .github/workflows/job_build_linux.yml | Adds build-samples input and conditionally builds/installs C++/C samples into the package. |
| .github/workflows/dev_gpu_linux_level_zero.yml | Enables build-samples so GPU tests can run sample executables from the packaged artifacts. |
| build-additional-python-packages: true | ||
| build-variant: 'levelzero' | ||
| store_artifacts: false | ||
| build-samples: true |
There was a problem hiding this comment.
That can be a bit confusing. If we set build-samples: true, why do we need to set it explicitly in the CMake options as well?
There was a problem hiding this comment.
maybe it would be better to use one of them only? build-samples: true for example, and set cmake option in the build job
There was a problem hiding this comment.
Remove the cmake option, now solely controlled by build-samples.
Tickets:
AI Assistance:
build_samplesscripts