Skip to content

Commit 0572f6b

Browse files
committed
250803.132120.CST revise compile_mex.yml regarding oneapi version
1 parent a3733a3 commit 0572f6b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/compile_mex.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,12 @@ jobs:
128128
shell: bash
129129
if: ${{ startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'windows') }}
130130
run: |
131+
# Initialize the variable ONEAPI_VERSION to an empty string, which means the default version
131132
ONEAPI_VERSION=
132133
if [[ "${{ matrix.os }}" = "windows-"* ]] ; then
133-
if [[ "${{ matrix.matlab }}" = "R2020"* || "${{ matrix.matlab }}" = "R2021"* || "${{ matrix.matlab }}" = "R2022"* || "${{ matrix.matlab }}" = "R2023"* ]] ; then
134-
ONEAPI_VERSION=2023
134+
# The latest oneAPI supported by MATLAB R2023a/b and R2024a/b is 2023 and 2024, respectively
135+
if [[ "${{ matrix.matlab }}" = "R2023"* || "${{ matrix.matlab }}" = "R2024"* ]] ; then
136+
ONEAPI_VERSION="$(echo "${{ matrix.matlab }}" | cut -c 2-5)"
135137
fi
136138
fi
137139
echo "ONEAPI_VERSION=$ONEAPI_VERSION" >> $GITHUB_ENV

0 commit comments

Comments
 (0)