Skip to content

Commit afe5380

Browse files
authored
[CI] Fix check-sycl with oneAPI-built compiler (#21753)
When setting up the oneAPI env we source the `setupvars.sh` script which sets many envvars including `CMAKE_PREFIX_PATH`, which messes up our environment for building the compiler. Just don't set it. Fail: https://github.com/intel/llvm/actions/runs/24325175633/job/71018931276 Working with fix (only oneAPI job matters): https://github.com/intel/llvm/actions/runs/24352663962/job/71111116646 `check-clang` fail is not related. Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
1 parent cc439a1 commit afe5380

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

devops/actions/setup_linux_oneapi_env/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ runs:
1313
| sudo tee /etc/apt/sources.list.d/oneAPI.list && \
1414
sudo apt update && sudo apt-get -y install intel-oneapi-compiler-dpcpp-cpp-2025.3
1515
16-
env_before=$(env | sort)
16+
env_before=$(env | sort)
1717
source /opt/intel/oneapi/setvars.sh
1818
env_after=$(env | sort)
1919
changed_envvars=$(comm -13 <(echo "$env_before") <(echo "$env_after"))
2020
while IFS= read -r line; do
21-
echo "$line" >> $GITHUB_ENV
21+
if [[ ! "$line" =~ ^CMAKE_PREFIX_PATH= ]]; then
22+
echo "$line" >> $GITHUB_ENV
23+
fi
2224
done <<< "$changed_envvars"

devops/actions/setup_windows_oneapi_env/action.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ runs:
2020
if ($envVar -match "^(.*?)=(.*)$") {
2121
$name = $matches[1]
2222
$value = $matches[2]
23-
$envBeforeVar = $envBefore | Where-Object { $_ -like "$name=*" }
24-
if (-not $envBeforeVar -or $envBeforeVar -ne "$name=$value") {
25-
Add-Content -Path $githubEnvFilePath -Value "$name=$value"
23+
if ($name -ne "CMAKE_PREFIX_PATH") {
24+
$envBeforeVar = $envBefore | Where-Object { $_ -like "$name=*" }
25+
if (-not $envBeforeVar -or $envBeforeVar -ne "$name=$value") {
26+
Add-Content -Path $githubEnvFilePath -Value "$name=$value"
27+
}
2628
}
2729
}
2830
}

0 commit comments

Comments
 (0)