From 4ab58ad4ce658c89d229816842e5d602e28c88e9 Mon Sep 17 00:00:00 2001 From: "Kornev, Nikita" Date: Fri, 30 Jan 2026 18:31:06 +0100 Subject: [PATCH 1/3] [CI] Build clang-tidy binary in nightly To have clang-tidy as part of nightly container --- .github/workflows/sycl-linux-build.yml | 3 +++ .github/workflows/sycl-nightly.yml | 2 +- sycl/CMakeLists.txt | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index 7fe6f9fbff281..8ede0cb4b0415 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -289,6 +289,9 @@ jobs: if: ${{ !cancelled() && steps.build.conclusion == 'success' }} run: | cmake --build $GITHUB_WORKSPACE/build --target install-sycl-test-utilities + - name: Install clang-tidy + if: ${{ !cancelled() && steps.build.conclusion == 'success' && contains(inputs.build_configure_extra_args, '-DSYCL_BUILD_CLANG_TIDY=ON') }} + run: cmake --build $GITHUB_WORKSPACE/build --target install-clang-tidy - name: Additional Install for "--shared-libs" build if: ${{ !cancelled() && steps.build.conclusion == 'success' && contains(inputs.build_configure_extra_args, '--shared-libs') }} diff --git a/.github/workflows/sycl-nightly.yml b/.github/workflows/sycl-nightly.yml index 9f2b04ec91d43..52570f9c97bb9 100644 --- a/.github/workflows/sycl-nightly.yml +++ b/.github/workflows/sycl-nightly.yml @@ -40,7 +40,7 @@ jobs: secrets: inherit with: build_cache_root: "/__w/" - build_configure_extra_args: '--hip --cuda -DSYCL_BUILD_INFO="Nightly ${{ needs.get_date.outputs.date }}"' + build_configure_extra_args: '--hip --cuda -DSYCL_BUILD_INFO="Nightly ${{ needs.get_date.outputs.date }}" -DSYCL_BUILD_CLANG_TIDY=ON' build_image: ghcr.io/intel/llvm/ubuntu2204_build:latest retention-days: 90 diff --git a/sycl/CMakeLists.txt b/sycl/CMakeLists.txt index 3586a8d725ab2..768615b4c27ef 100644 --- a/sycl/CMakeLists.txt +++ b/sycl/CMakeLists.txt @@ -617,3 +617,9 @@ add_custom_target(install-sycl-test-utilities # sycl/test-e2e/Basic/device_config_file_consistency.cpp. COMMAND ${CMAKE_COMMAND} --install ${CMAKE_BINARY_DIR} --component DeviceConfigFile ) + +if (SYCL_BUILD_CLANG_TIDY) + if (TARGET clang-tidy) + add_dependencies(sycl-toolchain clang-tidy) + endif() +endif() From 91d7d1f4dfe9a8bf486c70273bb0f1eeee86f816 Mon Sep 17 00:00:00 2001 From: "Kornev, Nikita" Date: Thu, 5 Feb 2026 12:17:13 +0100 Subject: [PATCH 2/3] another-approach --- .github/workflows/sycl-linux-build.yml | 7 ++++++- .github/workflows/sycl-nightly.yml | 5 ++++- sycl/CMakeLists.txt | 6 ------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index 8ede0cb4b0415..09dde84134a81 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -44,6 +44,10 @@ on: default: '[llvm, clang, sycl, llvm_spirv, xptifw, libclc]' required: false + build_clang_tidy: + type: boolean + default: false + # Artifacts: retention-days: @@ -289,8 +293,9 @@ jobs: if: ${{ !cancelled() && steps.build.conclusion == 'success' }} run: | cmake --build $GITHUB_WORKSPACE/build --target install-sycl-test-utilities + - name: Install clang-tidy - if: ${{ !cancelled() && steps.build.conclusion == 'success' && contains(inputs.build_configure_extra_args, '-DSYCL_BUILD_CLANG_TIDY=ON') }} + if: ${{ !cancelled() && steps.build.conclusion == 'success' && inputs.build_clang_tidy == 'true' }} run: cmake --build $GITHUB_WORKSPACE/build --target install-clang-tidy - name: Additional Install for "--shared-libs" build diff --git a/.github/workflows/sycl-nightly.yml b/.github/workflows/sycl-nightly.yml index 52570f9c97bb9..56889d1c67fb5 100644 --- a/.github/workflows/sycl-nightly.yml +++ b/.github/workflows/sycl-nightly.yml @@ -40,7 +40,7 @@ jobs: secrets: inherit with: build_cache_root: "/__w/" - build_configure_extra_args: '--hip --cuda -DSYCL_BUILD_INFO="Nightly ${{ needs.get_date.outputs.date }}" -DSYCL_BUILD_CLANG_TIDY=ON' + build_configure_extra_args: '--hip --cuda -DSYCL_BUILD_INFO="Nightly ${{ needs.get_date.outputs.date }}"' build_image: ghcr.io/intel/llvm/ubuntu2204_build:latest retention-days: 90 @@ -49,6 +49,9 @@ jobs: # prefer widespread gzip compression. toolchain_artifact_filename: sycl_linux.tar.gz + build_target: "sycl-toolchain clang-tidy" + build_clang_tidy: true + # Build used for performance testing only: not intended for testing linux_shared_build: if: github.repository == 'intel/llvm' diff --git a/sycl/CMakeLists.txt b/sycl/CMakeLists.txt index 768615b4c27ef..3586a8d725ab2 100644 --- a/sycl/CMakeLists.txt +++ b/sycl/CMakeLists.txt @@ -617,9 +617,3 @@ add_custom_target(install-sycl-test-utilities # sycl/test-e2e/Basic/device_config_file_consistency.cpp. COMMAND ${CMAKE_COMMAND} --install ${CMAKE_BINARY_DIR} --component DeviceConfigFile ) - -if (SYCL_BUILD_CLANG_TIDY) - if (TARGET clang-tidy) - add_dependencies(sycl-toolchain clang-tidy) - endif() -endif() From 65818057eea1bb7f1b1663a5c8ab09108ccfc885 Mon Sep 17 00:00:00 2001 From: "Kornev, Nikita" Date: Thu, 5 Feb 2026 17:00:21 +0100 Subject: [PATCH 3/3] just-build-clang-tidy --- .github/workflows/sycl-linux-build.yml | 9 +-------- .github/workflows/sycl-nightly.yml | 3 --- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index 09dde84134a81..69a16f0d04e5f 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -44,10 +44,6 @@ on: default: '[llvm, clang, sycl, llvm_spirv, xptifw, libclc]' required: false - build_clang_tidy: - type: boolean - default: false - # Artifacts: retention-days: @@ -293,10 +289,7 @@ jobs: if: ${{ !cancelled() && steps.build.conclusion == 'success' }} run: | cmake --build $GITHUB_WORKSPACE/build --target install-sycl-test-utilities - - - name: Install clang-tidy - if: ${{ !cancelled() && steps.build.conclusion == 'success' && inputs.build_clang_tidy == 'true' }} - run: cmake --build $GITHUB_WORKSPACE/build --target install-clang-tidy + cmake --build $GITHUB_WORKSPACE/build --target install-clang-tidy - name: Additional Install for "--shared-libs" build if: ${{ !cancelled() && steps.build.conclusion == 'success' && contains(inputs.build_configure_extra_args, '--shared-libs') }} diff --git a/.github/workflows/sycl-nightly.yml b/.github/workflows/sycl-nightly.yml index 56889d1c67fb5..9f2b04ec91d43 100644 --- a/.github/workflows/sycl-nightly.yml +++ b/.github/workflows/sycl-nightly.yml @@ -49,9 +49,6 @@ jobs: # prefer widespread gzip compression. toolchain_artifact_filename: sycl_linux.tar.gz - build_target: "sycl-toolchain clang-tidy" - build_clang_tidy: true - # Build used for performance testing only: not intended for testing linux_shared_build: if: github.repository == 'intel/llvm'