Skip to content

[CI] [GHA] Build Samples in the Build jobs, and add them to the openvino_package - #37221

Open
akashchi wants to merge 7 commits into
openvinotoolkit:masterfrom
akashchi:ci/gha/mv-samples-to-build-job
Open

[CI] [GHA] Build Samples in the Build jobs, and add them to the openvino_package#37221
akashchi wants to merge 7 commits into
openvinotoolkit:masterfrom
akashchi:ci/gha/mv-samples-to-build-job

Conversation

@akashchi

@akashchi akashchi commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Tickets:

  • 191917

AI Assistance:

  • AI assistance used: yes
    • Bulk move of the build_samples scripts

@akashchi akashchi added this to the 2026.4 milestone Aug 4, 2026
@akashchi
akashchi requested a review from a team as a code owner August 4, 2026 08:19
@akashchi akashchi added the WIP work in progress label Aug 4, 2026
@github-actions github-actions Bot added category: CI OpenVINO public CI github_actions Pull requests that update GitHub Actions code labels Aug 4, 2026
@akashchi
akashchi requested a review from mryzhov August 4, 2026 10:28
@akashchi
akashchi requested a review from akladiev August 4, 2026 10:28
@akashchi akashchi removed the WIP work in progress label Aug 4, 2026
@akashchi akashchi changed the title [CI] [GHA] Build Samples in the Build jobs, and add them into the openvino_package [CI] [GHA] Build Samples in the Build jobs, and add them to the openvino_package Aug 4, 2026
Comment thread .github/workflows/job_build_linux.yml

@mryzhov mryzhov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-samples workflow_call input to job_build_linux.yml and job_build_windows.yml, and build/install sample binaries into ${INSTALL_DIR}/samples_bin when enabled.
  • Enable build-samples: true in 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.yml and job_gpu_tests.yml (keeping only a Linux Clang rebuild check for C++ samples), and add a samples build step to mac_arm64.yml before 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.

@akashchi
akashchi requested a review from mryzhov August 7, 2026 09:12
build-additional-python-packages: true
build-variant: 'levelzero'
store_artifacts: false
build-samples: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it would be better to use one of them only? build-samples: true for example, and set cmake option in the build job

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the cmake option, now solely controlled by build-samples.

@akashchi
akashchi requested a review from mryzhov August 14, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: CI OpenVINO public CI github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants