Skip to content

Use storage holder in scan-based algorithms #8365

Use storage holder in scan-based algorithms

Use storage holder in scan-based algorithms #8365

Workflow file for this run

name: oneDPL CI Testing
on:
push:
branches: [main]
pull_request:
branches:
- main
- 'release/**'
paths:
- '.github/**/*'
- 'cmake/**/*'
- 'include/**/*'
- 'test/**/*'
- 'CMakeLists.txt'
- '.clang-format'
- 'examples/**/*'
permissions: read-all
env:
BUILD_CONCURRENCY: 4
MACOS_BUILD_CONCURRENCY: 3
TEST_TIMEOUT: 360
WINDOWS_TBB_DOWNLOAD_LINK: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/e45876b2-24fc-48cb-9d42-a1431747dd03/intel-onetbb-2023.0.0.718_offline.exe
WINDOWS_ICPX_DOWNLOAD_LINK: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/baec913e-84a0-439d-becc-6fb62f2d0c83/intel-dpcpp-cpp-compiler-2026.0.0.560_offline.exe
WINDOWS_ONEAPI_PATH: C:\Program Files (x86)\Intel\oneAPI
LINUX_ONEAPI_PATH: /opt/intel/oneapi
VS2022_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ !contains(github.ref, 'refs/heads/main') }}
jobs:
clang-format:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Get clang-format
run: sudo apt-get install -yqq clang-format
- name: Applying clang-format for changed files
run: .github/scripts/clang-format-diff.sh ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }}
- name: Creating diff
run: git diff > clang-format.diff
- name: Checking if diff is empty
run: if [ -s clang-format.diff ]; then cat clang-format.diff; exit 1; fi
- if: failure()
name: Save artifacts
uses: actions/upload-artifact@v7
with:
name: clang-format-diff
path: clang-format.diff
retention-days: 3
linux-testing:
name: ${{ matrix.device_type }},bknd=${{ matrix.backend }},cmplr=${{ matrix.cxx_compiler }},${{ matrix.os }},std=c++${{ matrix.std }},cfg=${{ matrix.build_type }}
runs-on: ['${{ matrix.os }}']
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
cxx_compiler: icpx
std: 17
build_type: release
backend: dpcpp
device_type: cpu
- os: ubuntu-latest
cxx_compiler: icpx
std: 17
build_type: release
backend: dpcpp
device_type: fpga # FPGA emulator
- os: ubuntu-latest
cxx_compiler: icpx
std: 17
build_type: release
backend: tbb
device_type: HOST
- os: ubuntu-latest
cxx_compiler: icpx
std: 17
build_type: release
backend: omp
device_type: HOST
- os: ubuntu-latest
cxx_compiler: g++
std: 17
build_type: release
backend: omp
device_type: HOST
- os: ubuntu-latest
cxx_compiler: g++
std: 17
build_type: release
backend: tbb
device_type: HOST
- os: ubuntu-latest
cxx_compiler: clang++
std: 17
build_type: release
backend: tbb
device_type: HOST
- os: ubuntu-latest
cxx_compiler: clang++
std: 17
build_type: release
backend: omp
device_type: HOST
- os: ubuntu-latest
cxx_compiler: g++
std: 17
build_type: release
backend: serial
device_type: HOST
- os: ubuntu-latest
cxx_compiler: icpx
std: 20
build_type: RelWithAsserts
backend: dpcpp
device_type: cpu
- os: ubuntu-latest
cxx_compiler: icpx
std: 20
build_type: RelWithAsserts
backend: tbb
device_type: HOST
- os: ubuntu-latest
cxx_compiler: icpx
std: 20
build_type: RelWithAsserts
backend: omp
device_type: HOST
- os: ubuntu-latest
cxx_compiler: g++
std: 20
build_type: RelWithAsserts
backend: serial
device_type: HOST
steps:
- uses: actions/checkout@v6
- name: Set up Intel® oneAPI
uses: ./.github/actions/setup-linux-oneapi
with:
tbb: ${{ (matrix.backend == 'tbb' || matrix.backend == 'dpcpp') && matrix.device_type != 'fpga' }}
compiler: ${{ matrix.device_type != 'fpga' && matrix.cxx_compiler == 'icpx' }}
fpga: ${{ matrix.device_type == 'fpga' }} # it will install compatible icpx and tbb on its own
- name: Install OpenMP dependencies
if: (matrix.os == 'ubuntu-latest' && matrix.cxx_compiler == 'clang++' && matrix.backend == 'omp')
run: |
sudo apt-get install libomp5 libomp-dev -y
- name: Run testing
shell: bash
env:
BACKEND: ${{ matrix.backend }}
DEVICE_TYPE: ${{ matrix.device_type }}
STD: ${{ matrix.std }}
BUILD_TYPE: ${{ matrix.build_type }}
CXX_COMPILER: ${{ matrix.cxx_compiler }}
run: .github/scripts/run-linux-tests.sh
windows-testing:
name: ${{ matrix.device_type }},bknd=${{ matrix.backend }},cmplr=${{ matrix.cxx_compiler }},${{ matrix.os }},std=c++${{ matrix.std }},cfg=${{ matrix.build_type }}
runs-on: ['${{ matrix.os }}']
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
cxx_compiler: icx-cl
std: 17
build_type: release
backend: tbb
device_type: HOST
- os: windows-latest
cxx_compiler: cl
std: 17
build_type: release
backend: tbb
device_type: HOST
- os: windows-latest
cxx_compiler: icx
std: 17
build_type: release
backend: dpcpp
device_type: cpu
- os: windows-latest
cxx_compiler: cl
std: 20
build_type: RelWithAsserts
backend: serial
device_type: HOST
- os: windows-latest
cxx_compiler: icx-cl
std: 20
build_type: RelWithAsserts
backend: tbb
device_type: HOST
- os: windows-latest
cxx_compiler: icx
std: 20
build_type: RelWithAsserts
backend: dpcpp
device_type: cpu
steps:
- uses: actions/checkout@v6
- name: Set up Intel® oneAPI
uses: ./.github/actions/setup-windows-oneapi
with:
tbb: ${{ matrix.backend == 'tbb' || matrix.backend == 'dpcpp' }}
compiler: ${{ matrix.cxx_compiler == 'icx-cl' || matrix.cxx_compiler == 'icx' }}
- name: Run testing
shell: cmd
env:
BACKEND: ${{ matrix.backend }}
DEVICE_TYPE: ${{ matrix.device_type }}
STD: ${{ matrix.std }}
BUILD_TYPE: ${{ matrix.build_type }}
CXX_COMPILER: ${{ matrix.cxx_compiler }}
run: |
call .github\scripts\run-windows-tests.cmd
exit /b %errorlevel%
linux-examples-testing:
name: examples,cmplr=icpx,ubuntu-latest,std=c++17,cfg=release
runs-on: ubuntu-latest
timeout-minutes: 60
env:
CXX_COMPILER: icpx
STD: 17
BUILD_TYPE: release
steps:
- uses: actions/checkout@v6
- name: Set up Intel® oneAPI
uses: ./.github/actions/setup-linux-oneapi
with:
tbb: true
compiler: true
- name: Build and run examples
shell: bash
run: .github/scripts/build-run-examples.sh
windows-examples-testing:
name: examples,cmplr=icx,windows-latest,std=c++17,cfg=release
runs-on: windows-latest
timeout-minutes: 60
env:
CXX_COMPILER: icx
STD: 17
BUILD_TYPE: release
steps:
- uses: actions/checkout@v6
- name: Set up Intel® oneAPI
uses: ./.github/actions/setup-windows-oneapi
with:
tbb: true
compiler: true
- name: Build and run examples
shell: cmd
run: |
call .github\scripts\build-run-examples.cmd
exit /b %errorlevel%
macos-testing:
name: HOST,bknd=${{ matrix.backend }},cmplr=${{ matrix.cxx_compiler }},${{ matrix.os }},std=c++${{ matrix.std }},cfg=${{ matrix.build_type }}
runs-on: ['${{ matrix.os }}']
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
cxx_compiler: clang++
std: 17
build_type: release
backend: omp
steps:
- uses: actions/checkout@v6
- name: Install OpenMP for Clang++
run: |
brew install libomp
- name: Run testing
shell: bash
run: |
set -x
sysctl -a | grep machdep.cpu
# workaround for CMake not being able to find OpenMP: see https://discourse.cmake.org/t/how-to-find-openmp-with-clang-on-macos/8860
# -DCMAKE_POLICY_DEFAULT_CMP0074=NEW below is forced to make sure CMake uses <PackageName>_ROOT variables.
export OpenMP_ROOT=$(brew --prefix)/opt/libomp
mkdir build && cd build
# TODO: fix or justify the excluded warnings
warning_flags="-Wall -Werror -Wno-error=sign-compare -Wno-error=pass-failed"
cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DONEDPL_BACKEND=${{ matrix.backend }} -DCMAKE_POLICY_DEFAULT_CMP0074=NEW -DCMAKE_CXX_FLAGS="${warning_flags}" ..
make VERBOSE=1 build-onedpl-tests -j${MACOS_BUILD_CONCURRENCY} 2>&1 | tee build.log
ctest --timeout ${TEST_TIMEOUT} --output-on-failure -E "${EXCLUDE_FROM_TESTING}" 2>&1 | tee ctest.log
python ${GITHUB_WORKSPACE}/.github/scripts/job_summary.py --build-log build.log --ctest-log ctest.log \
--output-file summary.md --compiler ${{ matrix.cxx_compiler }}