Skip to content

Commit 0bae3e9

Browse files
committed
250731.104715.PDT revise test_matlab*.yml
1 parent 9e6e9e4 commit 0bae3e9

File tree

5 files changed

+16
-27
lines changed

5 files changed

+16
-27
lines changed

.github/workflows/test_matlab.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,6 @@ jobs:
115115
$SEDI "s/max(\[0, chist\]) > 0)/max(\[0, chist\]) > 0)\nprobinfo.raw_data\noutput\nchist/" postprima.m
116116
cat postprima.m
117117
118-
# - name: Revise cobylb.f
119-
# shell: bash
120-
# run: |
121-
# cd fortran/classical/cobyla/
122-
# $SEDI "s/cstrv = maxval(\[ZERO, -constr\])/cstrv = maxval([\ZERO, -constr\])\n write(*,*) 'x = ', x(1:n)\n write(*,*) 'f = ', f\n write(*,*) 'constr = ', constr(1:m)\n write(*,*) 'cstrv = ', cstrv/" cobylb.f
123-
# cat cobylb.f
124-
125118
- name: Decide gfortran version for MATLAB on Linux
126119
if: startsWith(matrix.os, 'ubuntu')
127120
run: |
@@ -149,10 +142,9 @@ jobs:
149142
# Initialize the variable ONEAPI_VERSION to an empty string, which means the default version
150143
ONEAPI_VERSION=
151144
if [[ "${{ matrix.os }}" = "windows-"* ]] ; then
152-
if [[ "${{ matrix.matlab }}" = "R2020"* || "${{ matrix.matlab }}" = "R2021"* || "${{ matrix.matlab }}" = "R2022"* || "${{ matrix.matlab }}" = "R2023"* ]] ; then
153-
ONEAPI_VERSION=2023
154-
elif [[ "${{ matrix.matlab }}" = "R2024"* ]] ; then
155-
ONEAPI_VERSION=2024
145+
# The latest oneAPI supported by MATLAB R2023a/b and R2024a/b is 2023 and 2024, respectively
146+
if [[ "${{ matrix.matlab }}" = "R2023"* || "${{ matrix.matlab }}" = "R2024"* ]] ; then
147+
ONEAPI_VERSION="$(echo "${{ matrix.matlab }}" | cut -c 2-5)"
156148
fi
157149
fi
158150
echo "ONEAPI_VERSION=$ONEAPI_VERSION" >> $GITHUB_ENV

.github/workflows/test_matlab_linux.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ jobs:
8787
if: startsWith(matrix.os, 'ubuntu')
8888
run: |
8989
GFVER=${{ env.GFORTRAN_VERSION }}
90-
if [[ "${{ matrix.os }}" = "ubuntu-20.04" ]] ; then
91-
GFVER=11
90+
if [[ "${{ matrix.os }}" = "ubuntu-22.04" ]] ; then
91+
GFVER=13
9292
fi
9393
if [[ "${{ matrix.matlab }}" = "R2020b" || "${{ matrix.matlab }}" = "R2021a" || "${{ matrix.matlab }}" = "R2021b" ]] ; then
9494
GFVER=9
@@ -110,10 +110,9 @@ jobs:
110110
# Initialize the variable ONEAPI_VERSION to an empty string, which means the default version
111111
ONEAPI_VERSION=
112112
if [[ "${{ matrix.os }}" = "windows-"* ]] ; then
113-
if [[ "${{ matrix.matlab }}" = "R2020"* || "${{ matrix.matlab }}" = "R2021"* || "${{ matrix.matlab }}" = "R2022"* || "${{ matrix.matlab }}" = "R2023"* ]] ; then
114-
ONEAPI_VERSION=2023
115-
elif [[ "${{ matrix.matlab }}" = "R2024"* ]] ; then
116-
ONEAPI_VERSION=2024
113+
# The latest oneAPI supported by MATLAB R2023a/b and R2024a/b is 2023 and 2024, respectively
114+
if [[ "${{ matrix.matlab }}" = "R2023"* || "${{ matrix.matlab }}" = "R2024"* ]] ; then
115+
ONEAPI_VERSION="$(echo "${{ matrix.matlab }}" | cut -c 2-5)"
117116
fi
118117
fi
119118
echo "ONEAPI_VERSION=$ONEAPI_VERSION" >> $GITHUB_ENV

.github/workflows/test_matlab_mac_intel.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,9 @@ jobs:
7070
# Initialize the variable ONEAPI_VERSION to an empty string, which means the default version
7171
ONEAPI_VERSION=
7272
if [[ "${{ matrix.os }}" = "windows-"* ]] ; then
73-
if [[ "${{ matrix.matlab }}" = "R2020"* || "${{ matrix.matlab }}" = "R2021"* || "${{ matrix.matlab }}" = "R2022"* || "${{ matrix.matlab }}" = "R2023"* ]] ; then
74-
ONEAPI_VERSION=2023
75-
elif [[ "${{ matrix.matlab }}" = "R2024"* ]] ; then
76-
ONEAPI_VERSION=2024
73+
# The latest oneAPI supported by MATLAB R2023a/b and R2024a/b is 2023 and 2024, respectively
74+
if [[ "${{ matrix.matlab }}" = "R2023"* || "${{ matrix.matlab }}" = "R2024"* ]] ; then
75+
ONEAPI_VERSION="$(echo "${{ matrix.matlab }}" | cut -c 2-5)"
7776
fi
7877
fi
7978
echo "ONEAPI_VERSION=$ONEAPI_VERSION" >> $GITHUB_ENV

.github/workflows/test_matlab_windows.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,9 @@ jobs:
7070
# Initialize the variable ONEAPI_VERSION to an empty string, which means the default version
7171
ONEAPI_VERSION=
7272
if [[ "${{ matrix.os }}" = "windows-"* ]] ; then
73-
if [[ "${{ matrix.matlab }}" = "R2020"* || "${{ matrix.matlab }}" = "R2021"* || "${{ matrix.matlab }}" = "R2022"* || "${{ matrix.matlab }}" = "R2023"* ]] ; then
74-
ONEAPI_VERSION=2023
75-
elif [[ "${{ matrix.matlab }}" = "R2024"* ]] ; then
76-
ONEAPI_VERSION=2024
73+
# The latest oneAPI supported by MATLAB R2023a/b and R2024a/b is 2023 and 2024, respectively
74+
if [[ "${{ matrix.matlab }}" = "R2023"* || "${{ matrix.matlab }}" = "R2024"* ]] ; then
75+
ONEAPI_VERSION="$(echo "${{ matrix.matlab }}" | cut -c 2-5)"
7776
fi
7877
fi
7978
echo "ONEAPI_VERSION=$ONEAPI_VERSION" >> $GITHUB_ENV

matlab/setup_tools/try_mex_setup.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
% cannot locate the compiler due to the change of the directory structure, even if ONEAPI_ROOT
5858
% is set correctly.
5959
% 3. Starting from oneAPI 2025, ifort is removed and replaced by ifx. MATLAB R2024a/b looks for
60-
% ifort during mex setup and hence would fail with oneAPI 2025, even though it actually uses
61-
% ifx to compile Fortran code.
60+
% ifort during mex setup and hence would fail with oneAPI 2025, even though it actually uses
61+
% ifx to compile Fortran code when the oneAPI version is 2024.
6262
compiler_dir = fullfile(oneapi_root, 'compiler', 'latest', system_string);
6363
if ~exist(compiler_dir, 'dir')
6464
compiler_dir = fullfile(oneapi_root, 'compiler', 'latest');

0 commit comments

Comments
 (0)