Skip to content

Commit db48f7f

Browse files
Extend CI testing with more C++20 configurations and more SYCL tests (#2498)
Co-authored-by: Dmitriy Sobolev <[email protected]>
1 parent d825b51 commit db48f7f

File tree

5 files changed

+52
-13
lines changed

5 files changed

+52
-13
lines changed

.github/workflows/ci-testing.yml

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ env:
2828
WINDOWS_ICPX_DOWNLOAD_LINK: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/dc2bc071-6e5c-4b48-8fdd-a39d20c25e5a/intel-dpcpp-cpp-compiler-2025.2.0.528_offline.exe
2929
WINDOWS_ONEAPI_PATH: C:\Program Files (x86)\Intel\oneAPI
3030
LINUX_ONEAPI_PATH: /opt/intel/oneapi
31+
VS2022_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise
3132

3233
concurrency:
3334
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -146,6 +147,12 @@ jobs:
146147
build_type: RelWithAsserts
147148
backend: omp
148149
device_type: HOST
150+
- os: ubuntu-latest
151+
cxx_compiler: g++
152+
std: 20
153+
build_type: RelWithAsserts
154+
backend: serial
155+
device_type: HOST
149156
steps:
150157
- uses: actions/checkout@v4
151158
- name: Set up Intel APT repository
@@ -203,9 +210,14 @@ jobs:
203210
ctest --timeout ${TEST_TIMEOUT} --output-on-failure |& tee ctest.log
204211
done
205212
206-
#set targets to just sycl iterator for dpcpp tests
207-
make_targets="build-onedpl-sycl_iterator-tests build-onedpl-ranges-tests build-onedpl-implementation_details-tests"
208-
ctest_flags="-R (sycl_iterator_.*)|(std_ranges_.*)|(device_copyable)\.pass"
213+
# set targets for dpcpp tests
214+
make_targets="build-onedpl-general-tests build-onedpl-sycl_iterator-tests build-onedpl-implementation_details-tests"
215+
tests_regex="(sycl_iterator_.*)|(device_copyable)|(dpl_namespace)|(test_policies)|(lambda_naming)"
216+
if [[ "${{ matrix.device_type }}" != "FPGA_EMU" ]]; then
217+
make_targets+=" build-onedpl-ranges-tests"
218+
tests_regex+="|(std_ranges_.*)"
219+
fi
220+
ctest_flags="-R ${tests_regex}\.pass"
209221
else
210222
make_targets="build-onedpl-tests"
211223
fi
@@ -268,6 +280,24 @@ jobs:
268280
build_type: release
269281
backend: dpcpp
270282
device_type: CPU
283+
- os: windows-latest
284+
cxx_compiler: cl
285+
std: 20
286+
build_type: RelWithAsserts
287+
backend: serial
288+
device_type: HOST
289+
- os: windows-latest
290+
cxx_compiler: icx-cl
291+
std: 20
292+
build_type: RelWithAsserts
293+
backend: tbb
294+
device_type: HOST
295+
- os: windows-latest
296+
cxx_compiler: icx
297+
std: 20
298+
build_type: RelWithAsserts
299+
backend: dpcpp
300+
device_type: CPU
271301
steps:
272302
- uses: actions/checkout@v4
273303
- name: Install Intel® oneAPI Threading Building Blocks
@@ -291,6 +321,12 @@ jobs:
291321
run: |
292322
if exist "%WINDOWS_ONEAPI_PATH%\setvars.bat" (
293323
call "%WINDOWS_ONEAPI_PATH%\setvars.bat"
324+
) else (
325+
if exist "%VS2022_PATH%\VC\Auxiliary\Build\vcvarsall.bat" (
326+
call "%VS2022_PATH%\VC\Auxiliary\Build\vcvarsall.bat" amd64
327+
) else (
328+
echo "Warning: Neither %WINDOWS_ONEAPI_PATH%\setvars.bat nor %VS2022_PATH%\VC\Auxiliary\Build\vcvarsall.bat were found."
329+
)
294330
)
295331
296332
:: Set enable delayed expansion to allow proper resolution of errors in if statements and loops
@@ -325,8 +361,8 @@ jobs:
325361
cd %BASE_DIR%
326362
)
327363
328-
set ninja_targets=build-onedpl-sycl_iterator-tests build-onedpl-implementation_details-tests
329-
set ctest_flags=-R "(sycl_iterator_.*)|(device_copyable)\.pass"
364+
set ninja_targets=build-onedpl-general-tests build-onedpl-sycl_iterator-tests build-onedpl-implementation_details-tests build-onedpl-ranges-tests
365+
set ctest_flags=-R "(sycl_iterator_.*)|(std_ranges_.*)|(device_copyable)|(dpl_namespace)|(test_policies)|(lambda_naming)\.pass"
330366
) else (
331367
set ninja_targets=build-onedpl-tests
332368
)
@@ -336,7 +372,7 @@ jobs:
336372
337373
:: TODO: fix or justify the excluded warnings
338374
if "${{ matrix.cxx_compiler }}" == "cl" (
339-
set warning_flags=/W4 /WX /wd4018 /wd4100 /wd4146 /wd4244 /wd4245 /wd4267 /wd4310 /wd4389 /wd4805 /wd4996
375+
set warning_flags=/W4 /WX /wd4018 /wd4100 /wd4146 /wd4244 /wd4245 /wd4267 /wd4310 /wd4389 /wd4700 /wd4805 /wd4996
340376
) else (
341377
set warning_flags=-Wall -Werror -Wno-error=sign-compare -Wno-error=pass-failed
342378
)

test/general/header_inclusion_order_async_0.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "support/test_config.h"
1111

1212
#include _PSTL_TEST_HEADER(execution)
13-
#if TEST_DPCPP_BACKEND_PRESENT
13+
#if TEST_DPCPP_BACKEND_PRESENT && !ONEDPL_FPGA_DEVICE
1414
# include _PSTL_TEST_HEADER(async)
1515
#endif // TEST_DPCPP_BACKEND_PRESENT
1616

@@ -21,7 +21,7 @@
2121
int
2222
main()
2323
{
24-
#if TEST_DPCPP_BACKEND_PRESENT
24+
#if TEST_DPCPP_BACKEND_PRESENT && !ONEDPL_FPGA_DEVICE
2525

2626
auto policy = TestUtils::get_dpcpp_test_policy();
2727
sycl::queue q = policy.queue();

test/general/header_inclusion_order_async_1.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include "support/test_config.h"
1111

12-
#if TEST_DPCPP_BACKEND_PRESENT
12+
#if TEST_DPCPP_BACKEND_PRESENT && !ONEDPL_FPGA_DEVICE
1313
# include _PSTL_TEST_HEADER(async)
1414
#endif // TEST_DPCPP_BACKEND_PRESENT
1515
#include _PSTL_TEST_HEADER(execution)
@@ -21,7 +21,7 @@
2121
int
2222
main()
2323
{
24-
#if TEST_DPCPP_BACKEND_PRESENT
24+
#if TEST_DPCPP_BACKEND_PRESENT && !ONEDPL_FPGA_DEVICE
2525

2626
auto policy = TestUtils::get_dpcpp_test_policy();
2727
sycl::queue q = policy.queue();

test/parallel_api/ranges/std_ranges_mismatch_unsized.pass.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ main()
6565
}
6666

6767
{
68-
auto [ex_res1, ex_res2] = std::ranges::mismatch(view2, view1, binary_pred, proj, proj);
68+
auto [ex_1, ex_2] = std::ranges::mismatch(view2, view1, binary_pred, proj, proj);
6969
auto [res1, res2] = dpl_ranges::mismatch(oneapi::dpl::execution::par_unseq, view2, view1, binary_pred, proj, proj);
70-
EXPECT_TRUE(ex_res1 == res1, err_msg);
71-
EXPECT_TRUE(ex_res2 == res2, err_msg);
70+
EXPECT_TRUE(ex_1 == res1, err_msg);
71+
EXPECT_TRUE(ex_2 == res2, err_msg);
7272
}
7373

7474
#if TEST_DPCPP_BACKEND_PRESENT

test/xpu_api/language.support/support.limits/limits/infinity.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ ONEDPL_TEST_NUM_MAIN
6969
test<__int128_t>(0);
7070
test<__uint128_t>(0);
7171
#endif
72+
TEST_DIAGNOSTIC_PUSH
73+
TEST_MSVC_DIAGNOSTIC_IGNORED(4723) // division by zero is a part of the test
7274
float zero = 0;
7375
test<float>(1.f/zero);
7476
if constexpr (HasDoubleSupportInRuntime{})
@@ -82,6 +84,7 @@ ONEDPL_TEST_NUM_MAIN
8284
auto fnc = [&zero] { test<long double>(1. / zero); };
8385
fnc();
8486
}
87+
TEST_DIAGNOSTIC_POP
8588

8689
return 0;
8790
}

0 commit comments

Comments
 (0)