From 67a2db6662a25cf0042cb82f1746c645202d1c07 Mon Sep 17 00:00:00 2001 From: Dan Hoeflinger Date: Tue, 19 Nov 2024 12:56:58 -0500 Subject: [PATCH 1/3] changing workflows for ci testing Signed-off-by: Dan Hoeflinger --- .github/workflows/ci-testing.yml | 319 +++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 289 +--------------------------- 2 files changed, 320 insertions(+), 288 deletions(-) create mode 100644 .github/workflows/ci-testing.yml diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml new file mode 100644 index 00000000000..711452f57d7 --- /dev/null +++ b/.github/workflows/ci-testing.yml @@ -0,0 +1,319 @@ +name: oneDPL CI Testing + +on: + push: + branches: [main] + pull_request: + branches: + - release_oneDPL + - main + - 'release/**' + paths: + - 'cmake/**/*' + - 'include/**/*' + - 'test/**/*' + + + +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/8222de4d-2c5e-41bc-bdd5-f557a9edda28/w_tbb_oneapi_p_2021.13.0.627_offline.exe + WINDOWS_ICPX_DOWNLOAD_LINK: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7991e201-ca0f-4689-bdb6-1ed73a8246fd/w_dpcpp-cpp-compiler_p_2024.2.0.491_offline.exe + WINDOWS_ONEAPI_PATH: C:\Program Files (x86)\Intel\oneAPI + LINUX_ONEAPI_PATH: /opt/intel/oneapi + +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@v4 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + - uses: actions/setup-python@v5 + 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: | + MERGE_BASE=$(git merge-base ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }}) + FILES=$(git diff --diff-filter=d --name-only $MERGE_BASE | grep ^include | grep -v nanorange\.hpp\$ || true) + CLANG_FORMAT_DIFF_PATH=$(which clang-format-diff) + echo $FILES | xargs -n1 -t -r git diff -U0 --no-color --relative $MERGE_BASE | python3 $CLANG_FORMAT_DIFF_PATH -i -p1 -style file + if: github.event_name == 'pull_request' || github.event_name == 'push' + - 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@v4 + 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=с++${{ 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_EMU + - 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: 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: clang++ + std: 17 + build_type: release + backend: tbb + device_type: HOST + - os: ubuntu-latest + cxx_compiler: icpx + std: 17 + build_type: release + backend: tbb + 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: release + backend: dpcpp + device_type: CPU + - os: ubuntu-latest + cxx_compiler: icpx + std: 20 + build_type: release + backend: tbb + device_type: HOST + - os: ubuntu-latest + cxx_compiler: icpx + std: 20 + build_type: release + backend: omp + device_type: HOST + steps: + - uses: actions/checkout@v4 + - 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-compiler-fpga -y + - 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 + 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 build-onedpl-ranges-tests" + ctest_flags="-R (sycl_iterator_.*)|(std_ranges_.*)\.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} + + 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 + steps: + - uses: actions/checkout@v4 + - 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\2022\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 + + 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 + + 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-latest + cxx_compiler: clang++ + std: 17 + build_type: release + backend: omp + steps: + - uses: actions/checkout@v4 + - name: Install OpenMP for Clang++ + run: | + brew install libomp + - name: Run testing + shell: bash + run: | + set -x + echo "::warning::CMake: $(cmake --version)" + 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 _ROOT variables. + export OpenMP_ROOT=$(brew --prefix)/opt/libomp + 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 }} -DCMAKE_POLICY_DEFAULT_CMP0074=NEW .. + make VERBOSE=1 build-onedpl-tests -j${MACOS_BUILD_CONCURRENCY} + ctest --timeout ${TEST_TIMEOUT} --output-on-failure -E "${EXCLUDE_FROM_TESTING}" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b114be28c96..afe1db2c2d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: oneDPL CI +name: oneDPL CI Docs on: push: @@ -25,38 +25,6 @@ concurrency: 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@v4 - with: - fetch-depth: 0 - ref: ${{ github.event.pull_request.head.sha }} - - uses: actions/setup-python@v5 - 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: | - MERGE_BASE=$(git merge-base ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }}) - FILES=$(git diff --diff-filter=d --name-only $MERGE_BASE | grep ^include | grep -v nanorange\.hpp\$ || true) - CLANG_FORMAT_DIFF_PATH=$(which clang-format-diff) - echo $FILES | xargs -n1 -t -r git diff -U0 --no-color --relative $MERGE_BASE | python3 $CLANG_FORMAT_DIFF_PATH -i -p1 -style file - if: github.event_name == 'pull_request' || github.event_name == 'push' - - 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@v4 - with: - name: clang-format-diff - path: clang-format.diff - retention-days: 3 - codespell: runs-on: ubuntu-latest timeout-minutes: 10 @@ -89,258 +57,3 @@ jobs: with: 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-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_EMU - - 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: 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: clang++ - std: 17 - build_type: release - backend: tbb - device_type: HOST - - os: ubuntu-latest - cxx_compiler: icpx - std: 17 - build_type: release - backend: tbb - 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: release - backend: dpcpp - device_type: CPU - - os: ubuntu-latest - cxx_compiler: icpx - std: 20 - build_type: release - backend: tbb - device_type: HOST - - os: ubuntu-latest - cxx_compiler: icpx - std: 20 - build_type: release - backend: omp - device_type: HOST - steps: - - uses: actions/checkout@v4 - - 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-compiler-fpga -y - - 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 - 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 build-onedpl-ranges-tests" - ctest_flags="-R (sycl_iterator_.*)|(std_ranges_.*)\.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} - - 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 - steps: - - uses: actions/checkout@v4 - - 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\2022\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 - - 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 - - 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-latest - cxx_compiler: clang++ - std: 17 - build_type: release - backend: omp - steps: - - uses: actions/checkout@v4 - - name: Install OpenMP for Clang++ - run: | - brew install libomp - - name: Run testing - shell: bash - run: | - set -x - echo "::warning::CMake: $(cmake --version)" - 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 _ROOT variables. - export OpenMP_ROOT=$(brew --prefix)/opt/libomp - 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 }} -DCMAKE_POLICY_DEFAULT_CMP0074=NEW .. - make VERBOSE=1 build-onedpl-tests -j${MACOS_BUILD_CONCURRENCY} - ctest --timeout ${TEST_TIMEOUT} --output-on-failure -E "${EXCLUDE_FROM_TESTING}" From 241793b0f6eeea635ef07265eed820a2bbd1b38b Mon Sep 17 00:00:00 2001 From: Dan Hoeflinger Date: Tue, 19 Nov 2024 12:59:39 -0500 Subject: [PATCH 2/3] adding .github directory to launch tests Signed-off-by: Dan Hoeflinger --- .github/workflows/ci-testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 711452f57d7..e3d1e4be06a 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -9,6 +9,7 @@ on: - main - 'release/**' paths: + - '.github/**/*' - 'cmake/**/*' - 'include/**/*' - 'test/**/*' From 38edfd2a758fcd591e328769eabb044def18022d Mon Sep 17 00:00:00 2001 From: Dan Hoeflinger Date: Wed, 20 Nov 2024 13:54:48 -0500 Subject: [PATCH 3/3] address feedback and more Signed-off-by: Dan Hoeflinger --- .github/workflows/{ci.yml => ci-docs.yml} | 9 --------- .github/workflows/ci-testing.yml | 2 ++ README.md | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) rename .github/workflows/{ci.yml => ci-docs.yml} (72%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci-docs.yml similarity index 72% rename from .github/workflows/ci.yml rename to .github/workflows/ci-docs.yml index afe1db2c2d2..f9503d38562 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci-docs.yml @@ -11,15 +11,6 @@ on: 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/8222de4d-2c5e-41bc-bdd5-f557a9edda28/w_tbb_oneapi_p_2021.13.0.627_offline.exe - WINDOWS_ICPX_DOWNLOAD_LINK: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7991e201-ca0f-4689-bdb6-1ed73a8246fd/w_dpcpp-cpp-compiler_p_2024.2.0.491_offline.exe - WINDOWS_ONEAPI_PATH: C:\Program Files (x86)\Intel\oneAPI - LINUX_ONEAPI_PATH: /opt/intel/oneapi - concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: ${{ !contains(github.ref, 'refs/heads/main') }} diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index e3d1e4be06a..a8a2dae8ab8 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -13,6 +13,8 @@ on: - 'cmake/**/*' - 'include/**/*' - 'test/**/*' + - 'CMakeLists.txt' + - '.clang-format' diff --git a/README.md b/README.md index fc1163ad5cb..2792670b9fa 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # oneAPI DPC++ Library (oneDPL) -[![Apache License Version 2.0](https://img.shields.io/badge/license-Apache_2.0-green.svg)](LICENSE.txt) [![oneDPL CI](https://github.com/oneapi-src/oneDPL/actions/workflows/ci.yml/badge.svg)](https://github.com/oneapi-src/oneDPL/actions/workflows/ci.yml?query=branch%3Amaster) +[![Apache License Version 2.0](https://img.shields.io/badge/license-Apache_2.0-green.svg)](LICENSE.txt) [![oneDPL CI](https://github.com/oneapi-src/oneDPL/actions/workflows/ci-testing.yml/badge.svg)](https://github.com/oneapi-src/oneDPL/actions/workflows/ci-testing.yml?query=branch%3Amaster) [![Join the community on GitHub Discussions](https://badgen.net/badge/join%20the%20discussion/on%20github/blue?icon=github)](https://github.com/oneapi-src/oneDPL/discussions) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/oneapi-src/oneDPL/badge)](https://securityscorecards.dev/viewer/?uri=github.com/oneapi-src/oneDPL)