Skip to content

Commit 2e2b4ef

Browse files
author
Alexander Batashev
authored
[CI] Add build configuration with clang to post-commit CI (#3040)
1 parent 2ffafb9 commit 2e2b4ef

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/workflows/linux_post_commit.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ jobs:
2626
export ARGS=""
2727
;;
2828
SharedLibs)
29+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
30+
sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main"
31+
sudo apt-get update
32+
sudo apt-get install -y clang-12
2933
export ARGS="--shared-libs"
34+
export CC="clang-12"
35+
export CXX="clang++-12"
3036
;;
3137
NoAssertions)
3238
export ARGS="--no-assertions"

sycl/cmake/modules/AddSYCLUnitTest.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ macro(add_sycl_unittest test_dirname link_variant)
3636
${SYCL_SOURCE_DIR}/source/
3737
${SYCL_SOURCE_DIR}/unittests/
3838
)
39+
if (UNIX)
40+
# These warnings are coming from Google Test code.
41+
target_compile_options(${test_dirname} PRIVATE
42+
-Wno-unused-parameter
43+
-Wno-inconsistent-missing-override
44+
)
45+
endif()
3946
# LLVM gtest uses LLVM utilities that require C++-14
4047
# CXX_STANDARD_REQUIRED makes CXX_STANDARD a hard requirement.
4148
set_target_properties(${test_dirname}

0 commit comments

Comments
 (0)