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..df79a2e0963 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,321 +93,337 @@ jobs: name: onedpl-html-docs-${{ env.GITHUB_SHA_SHORT }} path: html - linux-testing: - name: ${{ matrix.device_type }},bknd=${{ matrix.backend }},cmplr=${{ matrix.cxx_compiler }},${{ matrix.os }},std=с++${{ matrix.std }},cfg=${{ matrix.build_type }} - runs-on: ['${{ matrix.os }}'] - timeout-minutes: 60 - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-20.04 - cxx_compiler: icpx - std: 17 - build_type: release - backend: dpcpp - device_type: CPU - - os: ubuntu-20.04 - cxx_compiler: icpx - std: 17 - build_type: release - backend: dpcpp - device_type: FPGA_EMU - - os: ubuntu-20.04 - cxx_compiler: icpx - std: 17 - build_type: release - backend: tbb - device_type: HOST - - os: ubuntu-20.04 - 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-20.04 - cxx_compiler: g++ - std: 17 - build_type: release - backend: tbb - device_type: HOST - - os: ubuntu-20.04 - cxx_compiler: clang++ - std: 17 - build_type: release - backend: tbb - device_type: HOST - - os: ubuntu-20.04 - cxx_compiler: clang++ - std: 17 - build_type: release - backend: omp - device_type: HOST - - os: ubuntu-latest - cxx_compiler: clang++ - std: 17 - build_type: release - backend: tbb - device_type: HOST - - os: ubuntu-20.04 - cxx_compiler: icpx - std: 17 - build_type: release - backend: tbb - device_type: HOST - - os: ubuntu-20.04 - cxx_compiler: g++ - std: 17 - build_type: release - backend: serial - device_type: HOST - steps: - - uses: actions/checkout@v3 - - name: Set up Intel APT repository - if: (matrix.backend == 'tbb' || matrix.backend == 'dpcpp' || matrix.cxx_compiler == 'icpx' || matrix.cxx_compiler == 'icx' || matrix.cxx_compiler == 'icx-cl' || matrix.cxx_compiler == 'dpcpp' || matrix.cxx_compiler == 'dpcpp-cl') - run: | - # https://www.intel.com/content/www/us/en/docs/oneapi/installation-guide-linux/2024-0/apt.html - wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ - | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null - echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list - sudo apt-get update -y - - name: Install Intel® oneAPI Threading Building Blocks - if: (matrix.backend == 'tbb' || matrix.backend == 'dpcpp') - run: | - sudo apt-get install intel-oneapi-tbb-devel -y - - name: Install Intel® oneAPI DPC++/C++ Compiler - if: (matrix.cxx_compiler == 'icpx' || matrix.cxx_compiler == 'icx' || matrix.cxx_compiler == 'icx-cl' || matrix.cxx_compiler == 'dpcpp' || matrix.cxx_compiler == 'dpcpp-cl') - run: | - sudo apt-get install intel-oneapi-compiler-dpcpp-cpp -y - # Avoid accidental use of a released version, keeping libpstloffload.so - sudo rm -rf ${LINUX_ONEAPI_PATH}/dpl/latest/include - - name: Install Intel® oneAPI DPC++/C++ Compiler SYCL* FPGA Emulator Runtime - if: (matrix.device_type == 'FPGA_EMU') - run: | - sudo apt-get install intel-oneapi-runtime-dpcpp-sycl-fpga-emul -y - - name: Run testing - shell: bash - run: | - set -x - if [[ -f "${LINUX_ONEAPI_PATH}/setvars.sh" ]]; then - source ${LINUX_ONEAPI_PATH}/setvars.sh - fi - echo "::warning::CMake: $(cmake --version)" - echo "::warning::Compiler: $(${{ matrix.cxx_compiler }} --version)" - - if [[ "${{ matrix.backend }}" == "dpcpp" ]]; then - make_targets="build-onedpl-sycl_iterator-tests" - ctest_flags="-R sycl_iterator_.*\.pass" - echo "::warning::dpcpp backend is set. Compile and run only sycl_iterator tests" - else - make_targets="build-onedpl-tests" - fi - mkdir build && cd build - lscpu - cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -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 - 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" - docker logs -f dr-test + # linux-testing: + # name: ${{ matrix.device_type }},bknd=${{ matrix.backend }},cmplr=${{ matrix.cxx_compiler }},${{ matrix.os }},std=с++${{ matrix.std }},cfg=${{ matrix.build_type }} + # runs-on: ['${{ matrix.os }}'] + # timeout-minutes: 60 + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-20.04 + # cxx_compiler: icpx + # std: 17 + # build_type: release + # backend: dpcpp + # device_type: CPU + # - os: ubuntu-20.04 + # cxx_compiler: icpx + # std: 17 + # build_type: release + # backend: dpcpp + # device_type: FPGA_EMU + # - os: ubuntu-20.04 + # cxx_compiler: icpx + # std: 17 + # build_type: release + # backend: tbb + # device_type: HOST + # - os: ubuntu-20.04 + # 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-20.04 + # cxx_compiler: g++ + # std: 17 + # build_type: release + # backend: tbb + # device_type: HOST + # - os: ubuntu-20.04 + # cxx_compiler: clang++ + # std: 17 + # build_type: release + # backend: tbb + # device_type: HOST + # - os: ubuntu-20.04 + # cxx_compiler: clang++ + # std: 17 + # build_type: release + # backend: omp + # device_type: HOST + # - os: ubuntu-latest + # cxx_compiler: clang++ + # std: 17 + # build_type: release + # backend: tbb + # device_type: HOST + # - os: ubuntu-20.04 + # cxx_compiler: icpx + # std: 17 + # build_type: release + # backend: tbb + # device_type: HOST + # - os: ubuntu-20.04 + # cxx_compiler: g++ + # std: 17 + # build_type: release + # backend: serial + # device_type: HOST + # steps: + # - uses: actions/checkout@v3 + # - name: Set up Intel APT repository + # if: (matrix.backend == 'tbb' || matrix.backend == 'dpcpp' || matrix.cxx_compiler == 'icpx' || matrix.cxx_compiler == 'icx' || matrix.cxx_compiler == 'icx-cl' || matrix.cxx_compiler == 'dpcpp' || matrix.cxx_compiler == 'dpcpp-cl') + # run: | + # # https://www.intel.com/content/www/us/en/docs/oneapi/installation-guide-linux/2024-0/apt.html + # wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ + # | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null + # echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list + # sudo apt-get update -y + # - name: Install Intel® oneAPI Threading Building Blocks + # if: (matrix.backend == 'tbb' || matrix.backend == 'dpcpp') + # run: | + # sudo apt-get install intel-oneapi-tbb-devel -y + # - name: Install Intel® oneAPI DPC++/C++ Compiler + # if: (matrix.cxx_compiler == 'icpx' || matrix.cxx_compiler == 'icx' || matrix.cxx_compiler == 'icx-cl' || matrix.cxx_compiler == 'dpcpp' || matrix.cxx_compiler == 'dpcpp-cl') + # run: | + # sudo apt-get install intel-oneapi-compiler-dpcpp-cpp -y + # # Avoid accidental use of a released version, keeping libpstloffload.so + # sudo rm -rf ${LINUX_ONEAPI_PATH}/dpl/latest/include + # - name: Install Intel® oneAPI DPC++/C++ Compiler SYCL* FPGA Emulator Runtime + # if: (matrix.device_type == 'FPGA_EMU') + # run: | + # sudo apt-get install intel-oneapi-runtime-dpcpp-sycl-fpga-emul -y + # - name: Run testing + # shell: bash + # run: | + # set -x + # if [[ -f "${LINUX_ONEAPI_PATH}/setvars.sh" ]]; then + # source ${LINUX_ONEAPI_PATH}/setvars.sh + # fi + # echo "::warning::CMake: $(cmake --version)" + # echo "::warning::Compiler: $(${{ matrix.cxx_compiler }} --version)" + # if [[ "${{ matrix.backend }}" == "dpcpp" ]]; then + # make_targets="build-onedpl-sycl_iterator-tests" + # ctest_flags="-R sycl_iterator_.*\.pass" + # echo "::warning::dpcpp backend is set. Compile and run only sycl_iterator tests" + # else + # make_targets="build-onedpl-tests" + # fi + # mkdir build && cd build + # lscpu + # cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ + # -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} - 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 }} - runs-on: ['${{ matrix.os }}'] - timeout-minutes: 60 - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-22.04 - cxx_compiler: icpx - std: 17 - build_type: release - device_type: cpu + dr-testing: + name: Run DR shp-tests + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up Intel APT repository - run: | - # https://www.intel.com/content/www/us/en/docs/oneapi/installation-guide-linux/2024-0/apt.html - wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ - | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null - echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list - sudo apt-get update -y - - name: Install Intel® oneAPI Threading Building Blocks - run: | - sudo apt-get install intel-oneapi-tbb-devel -y - - name: Install Intel® oneAPI DPC++/C++ Compiler + - name: Build docker image + run: docker build . -t dr-test -f .github/Dockerfile + - name: Run tests run: | - sudo apt-get install intel-oneapi-compiler-dpcpp-cpp -y - # Avoid accidental use of a released version, keeping libpstloffload.so - sudo rm -rf ${LINUX_ONEAPI_PATH}/dpl/latest/include - - name: Run testing - shell: bash - run: | - set -x - source ${LINUX_ONEAPI_PATH}/setvars.sh - echo "::warning::CMake: $(cmake --version)" - echo "::warning::Compiler: $(${{ matrix.cxx_compiler }} --version)" + 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 - make_targets="" - ctest_regex="^(" + # 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 }} + # runs-on: ['${{ matrix.os }}'] + # timeout-minutes: 60 + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-22.04 + # cxx_compiler: icpx + # std: 17 + # build_type: release + # device_type: cpu + # steps: + # - uses: actions/checkout@v3 + # - name: Set up Intel APT repository + # run: | + # # https://www.intel.com/content/www/us/en/docs/oneapi/installation-guide-linux/2024-0/apt.html + # wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ + # | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null + # echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list + # sudo apt-get update -y + # - name: Install Intel® oneAPI Threading Building Blocks + # run: | + # sudo apt-get install intel-oneapi-tbb-devel -y + # - name: Install Intel® oneAPI DPC++/C++ Compiler + # run: | + # sudo apt-get install intel-oneapi-compiler-dpcpp-cpp -y + # # Avoid accidental use of a released version, keeping libpstloffload.so + # sudo rm -rf ${LINUX_ONEAPI_PATH}/dpl/latest/include + # - name: Run testing + # shell: bash + # run: | + # set -x + # source ${LINUX_ONEAPI_PATH}/setvars.sh + # echo "::warning::CMake: $(cmake --version)" + # echo "::warning::Compiler: $(${{ matrix.cxx_compiler }} --version)" - test_list="adjacent_find.pass copy_move.pass merge.pass partial_sort.pass remove_copy.pass \ - transform_reduce.pass transform_reduce.pass.coal transform_scan.pass algorithm.pass \ - execution.pass functional.pass algorithms_redirection.pass usm_memory_replacement.pass" + # make_targets="" + # ctest_regex="^(" - for test in $test_list - do - if [ -n "$make_targets" ] - then - make_targets+=" " - ctest_regex+="|" - fi + # test_list="adjacent_find.pass copy_move.pass merge.pass partial_sort.pass remove_copy.pass \ + # transform_reduce.pass transform_reduce.pass.coal transform_scan.pass algorithm.pass \ + # execution.pass functional.pass algorithms_redirection.pass usm_memory_replacement.pass" - make_targets+="$test" - ctest_regex+="$test" - done + # for test in $test_list + # do + # if [ -n "$make_targets" ] + # then + # make_targets+=" " + # ctest_regex+="|" + # fi - ctest_regex+=")" + # make_targets+="$test" + # ctest_regex+="$test" + # done - mkdir build && cd build - lscpu - device_type=${{ matrix.device_type }} - cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DONEDPL_BACKEND=dpcpp \ - -D_ONEDPL_PSTL_OFFLOAD=$device_type .. + # ctest_regex+=")" - make pstloffload - source vars.sh + # mkdir build && cd build + # lscpu + # device_type=${{ matrix.device_type }} + # cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ + # -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DONEDPL_BACKEND=dpcpp \ + # -D_ONEDPL_PSTL_OFFLOAD=$device_type .. - make VERBOSE=1 -j${BUILD_CONCURRENCY} ${make_targets} + # make pstloffload + # source vars.sh - ctest --timeout ${TEST_TIMEOUT} --output-on-failure -R ${ctest_regex} + # make VERBOSE=1 -j${BUILD_CONCURRENCY} ${make_targets} - 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-2019 - cxx_compiler: icx-cl - std: 17 - build_type: release - backend: tbb - device_type: HOST - - os: windows-2019 - cxx_compiler: cl - std: 17 - build_type: release - backend: tbb - device_type: HOST - - os: windows-2019 - cxx_compiler: icx - std: 17 - build_type: release - backend: dpcpp - device_type: CPU - steps: - - uses: actions/checkout@v3 - - name: Install Intel® oneAPI Threading Building Blocks - if: (matrix.backend == 'tbb' || matrix.backend == 'dpcpp') - shell: cmd - run: | - curl %WINDOWS_TBB_DOWNLOAD_LINK% --output tbb_install.exe - tbb_install.exe -s -a --silent --eula accept -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 - del tbb_install.exe - - name: Install Intel® oneAPI DPC++/C++ Compiler - shell: cmd - run: | - curl %WINDOWS_ICPX_DOWNLOAD_LINK% --output icpx_install.exe - icpx_install.exe -s -a --silent --eula accept -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 - del icpx_install.exe - :: Avoid accidental use of a released version - rd /s /q "%WINDOWS_ONEAPI_PATH%\dpl" - - name: Run testing - shell: cmd - run: | - if exist "%WINDOWS_ONEAPI_PATH%\setvars.bat" ( - call "%WINDOWS_ONEAPI_PATH%\setvars.bat" - ) - if "${{ matrix.cxx_compiler }}" == "cl" ( - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 - ) - powershell $output = cmake --version; Write-Host ::warning::CMake: $output - powershell $output = ${{ matrix.cxx_compiler }} --version; Write-Host ::warning::Compiler: $output + # ctest --timeout ${TEST_TIMEOUT} --output-on-failure -R ${ctest_regex} - if "${{ matrix.backend }}" == "dpcpp" ( - set ninja_targets="build-onedpl-sycl_iterator-tests" - set ctest_flags=-R sycl_iterator_.*\.pass - echo ::warning::dpcpp backend is set. Compile and run only sycl_iterator tests - ) else ( - set ninja_targets=build-onedpl-tests - ) - mkdir build && cd build + # 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-2019 + # cxx_compiler: icx-cl + # std: 17 + # build_type: release + # backend: tbb + # device_type: HOST + # - os: windows-2019 + # cxx_compiler: cl + # std: 17 + # build_type: release + # backend: tbb + # device_type: HOST + # - os: windows-2019 + # cxx_compiler: icx + # std: 17 + # build_type: release + # backend: dpcpp + # device_type: CPU + # steps: + # - uses: actions/checkout@v3 + # - name: Install Intel® oneAPI Threading Building Blocks + # if: (matrix.backend == 'tbb' || matrix.backend == 'dpcpp') + # shell: cmd + # run: | + # curl %WINDOWS_TBB_DOWNLOAD_LINK% --output tbb_install.exe + # tbb_install.exe -s -a --silent --eula accept -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 + # del tbb_install.exe + # - name: Install Intel® oneAPI DPC++/C++ Compiler + # shell: cmd + # run: | + # curl %WINDOWS_ICPX_DOWNLOAD_LINK% --output icpx_install.exe + # icpx_install.exe -s -a --silent --eula accept -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 + # del icpx_install.exe + # :: Avoid accidental use of a released version + # rd /s /q "%WINDOWS_ONEAPI_PATH%\dpl" + # - name: Run testing + # shell: cmd + # run: | + # if exist "%WINDOWS_ONEAPI_PATH%\setvars.bat" ( + # call "%WINDOWS_ONEAPI_PATH%\setvars.bat" + # ) + # if "${{ matrix.cxx_compiler }}" == "cl" ( + # call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 + # ) + # powershell $output = cmake --version; Write-Host ::warning::CMake: $output + # powershell $output = ${{ matrix.cxx_compiler }} --version; Write-Host ::warning::Compiler: $output - cmake -G "Ninja" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DONEDPL_BACKEND=${{ matrix.backend }} -DONEDPL_DEVICE_TYPE=${{ matrix.device_type }} .. || goto :short_circuit_fail - ninja -j 2 -v %ninja_targets% || goto :short_circuit_fail - ctest --timeout %TEST_TIMEOUT% -C ${{ matrix.build_type }} --output-on-failure %ctest_flags% || goto :short_circuit_fail - exit /b 0 - :: modify the default behaviour of shell:cmd, which exits with the status of a last command, in order not to unintentially miss an error - :short_circuit_fail - exit /b %errorlevel% + # if "${{ matrix.backend }}" == "dpcpp" ( + # set ninja_targets="build-onedpl-sycl_iterator-tests" + # set ctest_flags=-R sycl_iterator_.*\.pass + # echo ::warning::dpcpp backend is set. Compile and run only sycl_iterator tests + # ) else ( + # set ninja_targets=build-onedpl-tests + # ) + # mkdir build && cd build - 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-11 - cxx_compiler: icpc - std: 17 - build_type: release - backend: omp - steps: - - uses: actions/checkout@v3 - - name: Install Intel® oneAPI C++ Compiler Classic and Intel® oneAPI Threading Building Blocks - run: | - wget ${MACOS_ONEAPI_DOWNLOAD_LINK} - mkdir installer - hdiutil attach -mountpoint ./installer/ m_cpp-compiler*.dmg - sudo ./installer/bootstrapper.app/Contents/MacOS/install.sh -c --action install --eula accept - - name: Exclude tests with known issues - if: matrix.backend == 'omp' - run: echo "EXCLUDE_FROM_TESTING=transform_binary.pass|transform_unary.pass" >> $GITHUB_ENV - - name: Run testing - shell: bash - run: | - set -x - source /opt/intel/oneapi/setvars.sh - echo "::warning::CMake: $(cmake --version)" - if [[ "${{ matrix.cxx_compiler }}" == "icpc" ]]; then - echo "::warning::Compiler: $(icpc --version)" - fi - mkdir build && cd build - cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DONEDPL_BACKEND=${{ matrix.backend }} .. - make VERBOSE=1 build-onedpl-tests -j${MACOS_BUILD_CONCURRENCY} - ctest --timeout ${TEST_TIMEOUT} --output-on-failure -E "${EXCLUDE_FROM_TESTING}" + # cmake -G "Ninja" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DONEDPL_BACKEND=${{ matrix.backend }} -DONEDPL_DEVICE_TYPE=${{ matrix.device_type }} .. || goto :short_circuit_fail + # ninja -j 2 -v %ninja_targets% || goto :short_circuit_fail + # ctest --timeout %TEST_TIMEOUT% -C ${{ matrix.build_type }} --output-on-failure %ctest_flags% || goto :short_circuit_fail + # exit /b 0 + # :: modify the default behaviour of shell:cmd, which exits with the status of a last command, in order not to unintentially miss an error + # :short_circuit_fail + # 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-11 + # cxx_compiler: icpc + # std: 17 + # build_type: release + # backend: omp + # steps: + # - uses: actions/checkout@v3 + # - name: Install Intel® oneAPI C++ Compiler Classic and Intel® oneAPI Threading Building Blocks + # run: | + # wget ${MACOS_ONEAPI_DOWNLOAD_LINK} + # mkdir installer + # hdiutil attach -mountpoint ./installer/ m_cpp-compiler*.dmg + # sudo ./installer/bootstrapper.app/Contents/MacOS/install.sh -c --action install --eula accept + # - name: Exclude tests with known issues + # if: matrix.backend == 'omp' + # run: echo "EXCLUDE_FROM_TESTING=transform_binary.pass|transform_unary.pass" >> $GITHUB_ENV + # - name: Run testing + # shell: bash + # run: | + # set -x + # source /opt/intel/oneapi/setvars.sh + # echo "::warning::CMake: $(cmake --version)" + # if [[ "${{ matrix.cxx_compiler }}" == "icpc" ]]; then + # echo "::warning::Compiler: $(icpc --version)" + # fi + # mkdir build && cd build + # cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ + # -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DONEDPL_BACKEND=${{ matrix.backend }} .. + # make VERBOSE=1 build-onedpl-tests -j${MACOS_BUILD_CONCURRENCY} + # ctest --timeout ${TEST_TIMEOUT} --output-on-failure -E "${EXCLUDE_FROM_TESTING}" 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)