diff --git a/.github/workflows/ubuntu-latest-icc.yml b/.github/workflows/ubuntu-latest-icc.yml index 7051950..4bd3b0d 100644 --- a/.github/workflows/ubuntu-latest-icc.yml +++ b/.github/workflows/ubuntu-latest-icc.yml @@ -21,7 +21,7 @@ env: https://registrationcenter-download.intel.com/akdlm/irc_nas/17427/l_HPCKit_p_2021.1.0.2684_offline.sh jobs: - build_linux_cpp: + icc_tests: if: >- ! contains(toJSON(github.event.commits.*.message), '[skip ci]') && ! contains(toJSON(github.event.commits.*.message), '[skip github]') diff --git a/.github/workflows/win-icc.yml b/.github/workflows/win-icc.yml index bfbfb69..c700bb6 100644 --- a/.github/workflows/win-icc.yml +++ b/.github/workflows/win-icc.yml @@ -20,7 +20,7 @@ env: WINDOWS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/17392/w_HPCKit_p_2021.1.0.2682_offline.exe jobs: - build_linux_cpp: + icc_tests: if: >- ! contains(toJSON(github.event.commits.*.message), '[skip ci]') && ! contains(toJSON(github.event.commits.*.message), '[skip github]') @@ -37,10 +37,15 @@ jobs: uses: actions/cache@v2 with: path: C:\Program Files (x86)\Intel\oneAPI\compiler - key: install-${{ env.WINDOWS_HPCKIT_URL }}-${{ env.WINDOWS_CPP_COMPONENTS }}-compiler-${{ hashFiles('**/script/cache_exclude_windows.sh') }} + key: >- + install-${{ env.WINDOWS_HPCKIT_URL }}- + ${{ env.WINDOWS_CPP_COMPONENTS }}- + compiler-${{ hashFiles('**/script/cache_exclude_windows.sh') }} - name: Install icc - run: script/ci_install_icc.bat $WINDOWS_HPCKIT_URL $WINDOWS_CPP_COMPONENTS + run: >- + script/ci_win_install_icc.bat $WINDOWS_HPCKIT_URL + $WINDOWS_CPP_COMPONENTS - name: CMake run: echo "/host_usr_local/bin" >> $GITHUB_PATH @@ -48,15 +53,14 @@ jobs: - name: Install dependencies run: script/ci_install_deps.sh + - name: Setup icc + script/ci_win_setup_icc.bat + - name: Configure - run: >- - source script/ci_setup_icc.sh && - cmake -S test -B build -D CMAKE_BUILD_TYPE=Debug + run: CXX=dpcpp && cmake -S test -B build -D CMAKE_BUILD_TYPE=Debug - name: Build - run: >- - source script/ci_setup_icc.sh && - cmake --build build -j ${{ steps.cores.outputs.count }} + run: CXX=dpcpp && cmake --build build -j ${{ steps.cores.outputs.count }} - name: Run working-directory: build diff --git a/script/ci_install_icc.bat b/script/ci_win_install_icc.bat similarity index 100% rename from script/ci_install_icc.bat rename to script/ci_win_install_icc.bat diff --git a/script/ci_win_setup_icc.bat b/script/ci_win_setup_icc.bat new file mode 100755 index 0000000..0962208 --- /dev/null +++ b/script/ci_win_setup_icc.bat @@ -0,0 +1,6 @@ +REM SPDX-FileCopyrightText: 2020 Intel Corporation +REM +REM SPDX-License-Identifier: MIT + +for /f "tokens=* usebackq" %%f in (`dir /b "C:\Program Files (x86)\Intel\oneAPI\compiler\" ^| findstr /V latest ^| sort`) do @set "LATEST_VERSION=%%f" +@call "C:\Program Files (x86)\Intel\oneAPI\compiler\%LATEST_VERSION%\env\vars.bat"