Skip to content

Commit b51ab41

Browse files
committed
Add Intel oneAPI setup for OpenMP in GitHub Actions
Integrated Intel oneAPI into the workflow to enable OpenMP support for the project. Updated CMake configuration to include necessary OpenMP flags and library paths. This ensures compatibility with Intel's OpenMP runtime for improved parallelization.Simplify Intel oneAPI setup in CI workflow Removed the explicit `rscohn2/setup-oneapi` action and streamlined the OpenMP configuration directly within the CMake command. This reduces external dependencies while maintaining compatibility with Intel's oneAPI tools.
1 parent ba1ba02 commit b51ab41

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -810,25 +810,37 @@ jobs:
810810
windows_compile_environment: msvc
811811
- name: Setup ninja
812812
uses: seanmiddleditch/gha-setup-ninja@v6
813-
- name: Setup MSVC for Ninja again
813+
- name: Setup MSVC for Ninja
814814
uses: ilammy/msvc-dev-cmd@v1
815+
- name: Install Intel OpenMP via NuGet
816+
run: |
817+
nuget install intelopenmp.redist.win -Version 2025.1.1.9 -OutputDirectory intel-openmp
818+
shell: pwsh
819+
- name: Set environment variables for Intel OpenMP
820+
shell: pwsh
821+
run: |
822+
echo "LIB=${{ github.workspace }}\\intel-openmp\\intelopenmp.redist.win.2025.1.1.9\\redist\\intel64\\compiler" >> $env:GITHUB_ENV
823+
echo "PATH=${{ github.workspace }}\\intel-openmp\\intelopenmp.redist.win.2025.1.1.9\\redist\\intel64\\compiler;$env:PATH" >> $env:GITHUB_ENV
815824
- name: CMake configure
816825
run: >
817-
cmake -S . -B build -G Ninja -D CMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
818-
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
819-
-D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=install
826+
cmake -S . -B build -G Ninja
827+
-D CMAKE_C_COMPILER=clang-cl
828+
-D CMAKE_CXX_COMPILER=clang-cl
829+
-D CMAKE_C_COMPILER_LAUNCHER=ccache
830+
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache
831+
-D CMAKE_BUILD_TYPE=Release
832+
-D CMAKE_INSTALL_PREFIX=install
833+
-D CMAKE_CXX_FLAGS="/clang:-fopenmp=libiomp5 /link libiomp5md.lib"
820834
env:
821835
CC: clang-cl
822836
CXX: clang-cl
823837
- name: Build project
824-
run: |
825-
cmake --build build --config Release --parallel
838+
run: cmake --build build --config Release --parallel
826839
env:
827840
CC: clang-cl
828841
CXX: clang-cl
829842
- name: Install project
830-
run: |
831-
cmake --install build
843+
run: cmake --install build
832844
- name: Archive installed package
833845
run: Compress-Archive -Path install -DestinationPath windows-clang-install.zip
834846
shell: pwsh

0 commit comments

Comments
 (0)