Skip to content

Commit 092ee1a

Browse files
committed
Fix Intel oneAPI environment setup in CI workflow
1 parent ae0de54 commit 092ee1a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,14 @@ jobs:
4242
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
4343
sudo apt-get update
4444
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
45+
46+
- name: Setup Intel oneAPI environment
47+
if: matrix.compiler == 'intel-icx' && runner.os == 'Linux'
48+
run: |
4549
source /opt/intel/oneapi/setvars.sh
4650
echo "CC=icx" >> $GITHUB_ENV
4751
echo "CXX=icpx" >> $GITHUB_ENV
52+
echo "/opt/intel/oneapi/compiler/latest/bin" >> $GITHUB_PATH
4853
4954
- name: Configure CMake
5055
run: >
@@ -53,8 +58,8 @@ jobs:
5358
-DPCG_CPP_BUILD_TESTS=ON
5459
-DCMAKE_BUILD_TYPE=Release
5560
env:
56-
CC: ${{ matrix.cc }}
57-
CXX: ${{ matrix.cxx }}
61+
CC: ${{ matrix.cc || env.CC }}
62+
CXX: ${{ matrix.cxx || env.CXX }}
5863

5964
- name: Build
6065
run: cmake --build build --config Release

0 commit comments

Comments
 (0)