Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 17 additions & 70 deletions .github/workflows/sycl_post_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
branches:
- sycl
pull_request:
paths:
- '.github/workflows/sycl_post_commit.yml'

jobs:
linux_default:
name: Linux Default
Expand All @@ -23,73 +27,16 @@ jobs:
build_cache_suffix: gcc_no_assertions
build_artifact_suffix: gcc_no_assertions
build_configure_extra_args: --no-assertions
linux_clang_shared_libs:
# TODO use nightly images when Docker containers are available
name: Linux + Clang + Shared libs
runs-on: ubuntu-20.04
if: github.repository == 'intel/llvm'
steps:
- uses: actions/checkout@v2
with:
path: src
- name: Install Ubuntu deps
run: sudo apt install -y ninja-build ccache
- name: Setup Cache
uses: actions/cache@v2
id: cache
with:
path: ${{ github.workspace }}/cache
key: build-linux-shared-libs-${{ github.sha }}
restore-keys: |
build-linux-shared-libs-
- name: Configure
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main"
sudo apt-get update
sudo apt-get install -y clang-13
export CC="clang-13"
export CXX="clang++-13"
mkdir -p $GITHUB_WORKSPACE/build
cd $GITHUB_WORKSPACE/build
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
--ci-defaults --shared-libs --cmake-opt="-DLLVM_CCACHE_BUILD=ON" \
--cmake-opt="-DLLVM_CCACHE_DIR=$GITHUB_WORKSPACE/cache" \
--cmake-opt="-DLLVM_CCACHE_MAXSIZE=2G"
- name: Compile
run: |
python3 $GITHUB_WORKSPACE/src/buildbot/compile.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build
- name: check-llvm
if: always()
run: |
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-llvm
- name: check-clang
if: always()
run: |
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-clang
- name: check-sycl
if: always()
run: |
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-sycl
- name: check-llvm-spirv
if: always()
run: |
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-llvm-spirv
- name: check-xptifw
if: always()
run: |
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-xptifw
- name: Pack
run: tar -czvf llvm_sycl.tar.gz -C $GITHUB_WORKSPACE/build/install .
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: sycl_linux_${{ matrix.config }}
path: llvm_sycl.tar.gz
linux_self_prod:
name: Linux (Self build + shared libraries)
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl
with:
build_runs_on: build
build_cache_root: "/__w/llvm"
build_github_cache: true
build_cache_suffix: sprod_shared
build_artifact_suffix: sprod_shared
build_configure_extra_args: --shared-libs
build_image: "ghcr.io/intel/llvm/sycl_ubuntu2004_nightly:no-drivers"
cc: clang
cxx: clang++
4 changes: 4 additions & 0 deletions sycl/cmake/modules/AddSYCLUnitTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ macro(add_sycl_unittest test_dirname link_variant)
${SYCL_SOURCE_DIR}/source/
${SYCL_SOURCE_DIR}/unittests/
)
check_cxx_compiler_flag(-Wno-ignored-attributes HAS_WNO_IGNORED_ATTRS)
if (HAS_WNO_IGNORED_ATTRS)
target_compile_options(${test_dirname} PRIVATE -Wno-ignored-attributes)
endif()
if (UNIX)
# These warnings are coming from Google Test code.
target_compile_options(${test_dirname}
Expand Down
6 changes: 6 additions & 0 deletions sycl/source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/version.rc
@ONLY)

check_cxx_compiler_flag(-Wno-ignored-attributes HAS_WNO_IGNORED_ATTRS)

if (SYCL_ENABLE_XPTI_TRACING)
if (NOT DEFINED LLVM_EXTERNAL_XPTI_SOURCE_DIR)
message (FATAL_ERROR "Undefined LLVM_EXTERNAL_XPTI_SOURCE_DIR variable: Must be set when XPTI tracing is set to ON")
Expand All @@ -32,6 +34,10 @@ function(add_sycl_rt_library LIB_NAME)
target_compile_options(${LIB_OBJ_NAME} PRIVATE ${ARG_COMPILE_OPTIONS})
endif()

if (HAS_WNO_IGNORED_ATTRS)
target_compile_options(${LIB_OBJ_NAME} PRIVATE -Wno-ignored-attributes)
endif()

add_dependencies(${LIB_OBJ_NAME}
sycl-headers
)
Expand Down