diff --git a/.github/Dockerfile b/.github/Dockerfile index 198bf3a732d..8c1fcca3528 100644 --- a/.github/Dockerfile +++ b/.github/Dockerfile @@ -1,7 +1,5 @@ -# docker build -t oneapi-gcc13 . -# docker run -ti --rm oneapi-gcc13 FROM intel/oneapi:latest -RUN apt update +RUN apt update --allow-insecure-repositories RUN add-apt-repository ppa:ubuntu-toolchain-r/test RUN apt install -y g++-13 RUN apt install -y libgtest-dev @@ -13,4 +11,4 @@ RUN tar -xzvf cmake-3.29.2.tar.gz && cd cmake-3.29.2 && ./bootstrap && make -j12 RUN apt install -y libfmt-dev -CMD /bin/bash \ No newline at end of file +CMD /bin/bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml old mode 100644 new mode 100755 index 62a5496b1b4..e9e1afe451c --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -220,13 +220,29 @@ jobs: -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DONEDPL_BACKEND=${{ matrix.backend }} -DONEDPL_DEVICE_TYPE=${{ matrix.device_type }} .. make VERBOSE=1 -j${BUILD_CONCURRENCY} ${make_targets} ctest --timeout ${TEST_TIMEOUT} --output-on-failure ${ctest_flags} - - name: Distributed Ranges testing + + dr-testing: + name: Run DR shp-tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build docker image + run: docker build . -t dr-test -f .github/Dockerfile + - name: Run tests run: | - cd .. - docker build . -t dr-test -f .github/Dockerfile - docker run --name dr-test -d -v $(pwd):/repo dr-test sh -c "cd repo & cmake --build build --target run-dr-tests" + set -e + docker run --name dr-test -d -v $(pwd):/repo dr-test sh -c " + cd repo && + mkdir build && + cd build && + cmake -DCMAKE_CXX_STANDARD=23 -DCMAKE_CXX_COMPILER=icpx -DONEDPL_BACKEND=dpcpp -DCMAKE_BUILD_TYPE=Release .. && + cmake --build . --target shp-all-tests -j${nproc} && + ctest --test-dir . -L SHP -j 4" docker logs -f dr-test - + docker wait dr-test + exit_code=$(docker inspect dr-test --format='{{.State.ExitCode}}') + docker rm -f dr-test + exit $exit_code linux-pstl-offload-testing: name: PSTL offload ${{ matrix.device_type }},bknd=dpcpp,cmplr=${{ matrix.cxx_compiler }},${{ matrix.os }},std=с++${{ matrix.std }},cfg=${{ matrix.build_type }} diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 06c230f7687..44945bdc206 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -69,12 +69,9 @@ endif() add_custom_target(build-onedpl-tests COMMENT "Build all oneDPL tests") -if (ONEDPL_USE_DR) - # shp-tests and shp-tests-3 are built in docker - removed from here for now - set(run-onedpl-tests-depends build-onedpl-tests) -else() - set(run-onedpl-tests-depends build-onedpl-tests) -endif() +set(run-onedpl-tests-depends build-onedpl-tests) + +option(DR_DOCKER "Build shp DR tests with Docker" OFF) add_custom_target(run-onedpl-tests COMMAND "${CMAKE_CTEST_COMMAND}" --output-on-failure @@ -254,7 +251,7 @@ foreach (_file IN LISTS UNIT_TESTS) endforeach() -if (ONEDPL_USE_DR) +if (ONEDPL_USE_DR AND DR_DOCKER) add_custom_target(build-dr-tests COMMENT "Build dr tests" DEPENDS shp-tests shp-tests-3) # run in docker add_custom_target(run-dr-tests COMMENT "Run dr tests" DEPENDS build-dr-tests COMMAND ./distributed-ranges/shp/shp-tests ./distributed-ranges/shp/shp-tests-3)