Skip to content

Commit 31356d9

Browse files
committed
250904.235216.CST revise GFVER and ONEAPI_VERSION
1 parent ded5f16 commit 31356d9

File tree

8 files changed

+79
-60
lines changed

8 files changed

+79
-60
lines changed

.github/workflows/compile_mex.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ jobs:
106106
if: startsWith(matrix.os, 'ubuntu')
107107
run: |
108108
GFVER=${{ env.GFORTRAN_VERSION }}
109-
if [[ "${{ matrix.matlab }}" = "R2020b" || "${{ matrix.matlab }}" = "R2021a" || "${{ matrix.matlab }}" = "R2021b" ]] ; then
109+
# MATLAB R2021b- supports gfortran 9-
110+
MATLAB_VERSION_NUMBER=$(echo "${{ matrix.matlab }}" | sed -e 's/R\([0-9]*\)\([ab]\)/\1/')
111+
if [[ "${MATLAB_VERSION_NUMBER}" != "latest" && "${MATLAB_VERSION_NUMBER}" -le 2021 ]]; then
110112
GFVER=9
111113
fi
112114
echo "GFVER=$GFVER" >> $GITHUB_ENV
@@ -124,13 +126,13 @@ jobs:
124126
shell: bash
125127
if: ${{ startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'windows') }}
126128
run: |
127-
# Initialize the variable ONEAPI_VERSION to an empty string, which means the default version
128-
ONEAPI_VERSION=
129-
if [[ "${{ matrix.os }}" = "windows-"* ]] ; then
130-
# The latest oneAPI supported by MATLAB R2023a/b and R2024a/b is 2023 and 2024, respectively
131-
if [[ "${{ matrix.matlab }}" = "R2023"* || "${{ matrix.matlab }}" = "R2024"* ]] ; then
132-
ONEAPI_VERSION="$(echo "${{ matrix.matlab }}" | cut -c 2-5)"
133-
fi
129+
# Initialize ONEAPI_VERSION to "latest", causing the installer script to install the latest oneAPI.
130+
ONEAPI_VERSION="latest"
131+
# On Windows. the latest oneAPI supported by MATLAB R2023a/b and R2024a/b is 2023 and 2024,
132+
# respectively. Thus we set ONEAPI_VERSION to the following. If matrix.matlab is "latest",
133+
# then ONEAPI_VERSION will be "latest".
134+
if [[ "${{ matrix.os }}" == windows* ]]; then
135+
ONEAPI_VERSION=$(echo "${{ matrix.matlab }}" | sed -e 's/R\([0-9]*\)\([ab]\)/\1/')
134136
fi
135137
echo "ONEAPI_VERSION=$ONEAPI_VERSION" >> $GITHUB_ENV
136138
echo "ONEAPI_VERSION:" $ONEAPI_VERSION

.github/workflows/parallel_test_matlab.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,17 @@ jobs:
9595
if: startsWith(matrix.os, 'ubuntu')
9696
run: which gcc && gcc --version && which gfortran && gfortran --version
9797

98-
- name: Decide the version of oneAPI to use
98+
- name: Decide the version of oneAPI to use on macOS and Windows
9999
shell: bash
100+
if: ${{ startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'windows') }}
100101
run: |
101-
ONEAPI_VERSION=
102-
if [[ "${{ matrix.os }}" = "windows-"* ]] ; then
103-
if [[ "${{ matrix.matlab }}" = "R2020"* || "${{ matrix.matlab }}" = "R2021"* || "${{ matrix.matlab }}" = "R2022"* || "${{ matrix.matlab }}" = "R2023"* ]] ; then
104-
ONEAPI_VERSION=2023
105-
fi
102+
# Initialize ONEAPI_VERSION to "latest", causing the installer script to install the latest oneAPI.
103+
ONEAPI_VERSION="latest"
104+
# On Windows. the latest oneAPI supported by MATLAB R2023a/b and R2024a/b is 2023 and 2024,
105+
# respectively. Thus we set ONEAPI_VERSION to the following. If matrix.matlab is "latest",
106+
# then ONEAPI_VERSION will be "latest".
107+
if [[ "${{ matrix.os }}" == windows* ]]; then
108+
ONEAPI_VERSION=$(echo "${{ matrix.matlab }}" | sed -e 's/R\([0-9]*\)\([ab]\)/\1/')
106109
fi
107110
echo "ONEAPI_VERSION=$ONEAPI_VERSION" >> $GITHUB_ENV
108111
echo "ONEAPI_VERSION:" $ONEAPI_VERSION

.github/workflows/recursive_test_matlab.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,17 @@ jobs:
9595
if: startsWith(matrix.os, 'ubuntu')
9696
run: which gcc && gcc --version && which gfortran && gfortran --version
9797

98-
- name: Decide the version of oneAPI to use
98+
- name: Decide the version of oneAPI to use on macOS and Windows
9999
shell: bash
100+
if: ${{ startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'windows') }}
100101
run: |
101-
ONEAPI_VERSION=
102-
if [[ "${{ matrix.os }}" = "windows-"* ]] ; then
103-
if [[ "${{ matrix.matlab }}" = "R2020"* || "${{ matrix.matlab }}" = "R2021"* || "${{ matrix.matlab }}" = "R2022"* || "${{ matrix.matlab }}" = "R2023"* ]] ; then
104-
ONEAPI_VERSION=2023
105-
fi
102+
# Initialize ONEAPI_VERSION to "latest", causing the installer script to install the latest oneAPI.
103+
ONEAPI_VERSION="latest"
104+
# On Windows. the latest oneAPI supported by MATLAB R2023a/b and R2024a/b is 2023 and 2024,
105+
# respectively. Thus we set ONEAPI_VERSION to the following. If matrix.matlab is "latest",
106+
# then ONEAPI_VERSION will be "latest".
107+
if [[ "${{ matrix.os }}" == windows* ]]; then
108+
ONEAPI_VERSION=$(echo "${{ matrix.matlab }}" | sed -e 's/R\([0-9]*\)\([ab]\)/\1/')
106109
fi
107110
echo "ONEAPI_VERSION=$ONEAPI_VERSION" >> $GITHUB_ENV
108111
echo "ONEAPI_VERSION:" $ONEAPI_VERSION

.github/workflows/stress_test_matlab.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,17 @@ jobs:
9191
if: startsWith(matrix.os, 'ubuntu')
9292
run: which gcc && gcc --version && which gfortran && gfortran --version
9393

94-
- name: Decide the version of oneAPI to use
94+
- name: Decide the version of oneAPI to use on macOS and Windows
9595
shell: bash
96+
if: ${{ startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'windows') }}
9697
run: |
97-
ONEAPI_VERSION=
98-
if [[ "${{ matrix.os }}" = "windows-"* ]] ; then
99-
if [[ "${{ matrix.matlab }}" = "R2020"* || "${{ matrix.matlab }}" = "R2021"* || "${{ matrix.matlab }}" = "R2022"* || "${{ matrix.matlab }}" = "R2023"* ]] ; then
100-
ONEAPI_VERSION=2023
101-
fi
98+
# Initialize ONEAPI_VERSION to "latest", causing the installer script to install the latest oneAPI.
99+
ONEAPI_VERSION="latest"
100+
# On Windows. the latest oneAPI supported by MATLAB R2023a/b and R2024a/b is 2023 and 2024,
101+
# respectively. Thus we set ONEAPI_VERSION to the following. If matrix.matlab is "latest",
102+
# then ONEAPI_VERSION will be "latest".
103+
if [[ "${{ matrix.os }}" == windows* ]]; then
104+
ONEAPI_VERSION=$(echo "${{ matrix.matlab }}" | sed -e 's/R\([0-9]*\)\([ab]\)/\1/')
102105
fi
103106
echo "ONEAPI_VERSION=$ONEAPI_VERSION" >> $GITHUB_ENV
104107
echo "ONEAPI_VERSION:" $ONEAPI_VERSION

.github/workflows/test_matlab.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ jobs:
118118
if: startsWith(matrix.os, 'ubuntu')
119119
run: |
120120
GFVER=${{ env.GFORTRAN_VERSION }}
121-
if [[ "${{ matrix.matlab }}" = "R2020b" || "${{ matrix.matlab }}" = "R2021a" || "${{ matrix.matlab }}" = "R2021b" ]] ; then
121+
# MATLAB R2021b- supports gfortran 9-
122+
MATLAB_VERSION_NUMBER=$(echo "${{ matrix.matlab }}" | sed -e 's/R\([0-9]*\)\([ab]\)/\1/')
123+
if [[ "${MATLAB_VERSION_NUMBER}" != "latest" && "${MATLAB_VERSION_NUMBER}" -le 2021 ]]; then
122124
GFVER=9
123125
fi
124126
echo "GFVER=$GFVER" >> $GITHUB_ENV
@@ -132,16 +134,17 @@ jobs:
132134
if: startsWith(matrix.os, 'ubuntu')
133135
run: which gcc && gcc --version && which gfortran && gfortran --version
134136

135-
- name: Decide the version of oneAPI to use
137+
- name: Decide the version of oneAPI to use on macOS and Windows
136138
shell: bash
139+
if: ${{ startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'windows') }}
137140
run: |
138-
# Initialize the variable ONEAPI_VERSION to an empty string, which means the default version
139-
ONEAPI_VERSION=
140-
if [[ "${{ matrix.os }}" = "windows-"* ]] ; then
141-
# The latest oneAPI supported by MATLAB R2023a/b and R2024a/b is 2023 and 2024, respectively
142-
if [[ "${{ matrix.matlab }}" = "R2023"* || "${{ matrix.matlab }}" = "R2024"* ]] ; then
143-
ONEAPI_VERSION="$(echo "${{ matrix.matlab }}" | cut -c 2-5)"
144-
fi
141+
# Initialize ONEAPI_VERSION to "latest", causing the installer script to install the latest oneAPI.
142+
ONEAPI_VERSION="latest"
143+
# On Windows. the latest oneAPI supported by MATLAB R2023a/b and R2024a/b is 2023 and 2024,
144+
# respectively. Thus we set ONEAPI_VERSION to the following. If matrix.matlab is "latest",
145+
# then ONEAPI_VERSION will be "latest".
146+
if [[ "${{ matrix.os }}" == windows* ]]; then
147+
ONEAPI_VERSION=$(echo "${{ matrix.matlab }}" | sed -e 's/R\([0-9]*\)\([ab]\)/\1/')
145148
fi
146149
echo "ONEAPI_VERSION=$ONEAPI_VERSION" >> $GITHUB_ENV
147150
echo "ONEAPI_VERSION:" $ONEAPI_VERSION

.github/workflows/test_matlab_linux.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ jobs:
8484
if: startsWith(matrix.os, 'ubuntu')
8585
run: |
8686
GFVER=${{ env.GFORTRAN_VERSION }}
87-
if [[ "${{ matrix.matlab }}" = "R2020b" || "${{ matrix.matlab }}" = "R2021a" || "${{ matrix.matlab }}" = "R2021b" ]] ; then
87+
# MATLAB R2021b- supports gfortran 9-
88+
MATLAB_VERSION_NUMBER=$(echo "${{ matrix.matlab }}" | sed -e 's/R\([0-9]*\)\([ab]\)/\1/')
89+
if [[ "${MATLAB_VERSION_NUMBER}" != "latest" && "${MATLAB_VERSION_NUMBER}" -le 2021 ]]; then
8890
GFVER=9
8991
fi
9092
echo "GFVER=$GFVER" >> $GITHUB_ENV
@@ -98,16 +100,17 @@ jobs:
98100
if: startsWith(matrix.os, 'ubuntu')
99101
run: which gcc && gcc --version && which gfortran && gfortran --version
100102

101-
- name: Decide the version of oneAPI to use
103+
- name: Decide the version of oneAPI to use on macOS and Windows
102104
shell: bash
105+
if: ${{ startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'windows') }}
103106
run: |
104-
# Initialize the variable ONEAPI_VERSION to an empty string, which means the default version
105-
ONEAPI_VERSION=
106-
if [[ "${{ matrix.os }}" = "windows-"* ]] ; then
107-
# The latest oneAPI supported by MATLAB R2023a/b and R2024a/b is 2023 and 2024, respectively
108-
if [[ "${{ matrix.matlab }}" = "R2023"* || "${{ matrix.matlab }}" = "R2024"* ]] ; then
109-
ONEAPI_VERSION="$(echo "${{ matrix.matlab }}" | cut -c 2-5)"
110-
fi
107+
# Initialize ONEAPI_VERSION to "latest", causing the installer script to install the latest oneAPI.
108+
ONEAPI_VERSION="latest"
109+
# On Windows. the latest oneAPI supported by MATLAB R2023a/b and R2024a/b is 2023 and 2024,
110+
# respectively. Thus we set ONEAPI_VERSION to the following. If matrix.matlab is "latest",
111+
# then ONEAPI_VERSION will be "latest".
112+
if [[ "${{ matrix.os }}" == windows* ]]; then
113+
ONEAPI_VERSION=$(echo "${{ matrix.matlab }}" | sed -e 's/R\([0-9]*\)\([ab]\)/\1/')
111114
fi
112115
echo "ONEAPI_VERSION=$ONEAPI_VERSION" >> $GITHUB_ENV
113116
echo "ONEAPI_VERSION:" $ONEAPI_VERSION

.github/workflows/test_matlab_mac_intel.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,17 @@ jobs:
6464
$SEDI "s/max(\[0, chist\]) > 0)/max(\[0, chist\]) > 0)\nprobinfo.raw_data\noutput\nchist/" postprima.m
6565
cat postprima.m
6666
67-
- name: Decide the version of oneAPI to use
67+
- name: Decide the version of oneAPI to use on macOS and Windows
6868
shell: bash
69+
if: ${{ startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'windows') }}
6970
run: |
70-
# Initialize the variable ONEAPI_VERSION to an empty string, which means the default version
71-
ONEAPI_VERSION=
72-
if [[ "${{ matrix.os }}" = "windows-"* ]] ; then
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)"
76-
fi
71+
# Initialize ONEAPI_VERSION to "latest", causing the installer script to install the latest oneAPI.
72+
ONEAPI_VERSION="latest"
73+
# On Windows. the latest oneAPI supported by MATLAB R2023a/b and R2024a/b is 2023 and 2024,
74+
# respectively. Thus we set ONEAPI_VERSION to the following. If matrix.matlab is "latest",
75+
# then ONEAPI_VERSION will be "latest".
76+
if [[ "${{ matrix.os }}" == windows* ]]; then
77+
ONEAPI_VERSION=$(echo "${{ matrix.matlab }}" | sed -e 's/R\([0-9]*\)\([ab]\)/\1/')
7778
fi
7879
echo "ONEAPI_VERSION=$ONEAPI_VERSION" >> $GITHUB_ENV
7980
echo "ONEAPI_VERSION:" $ONEAPI_VERSION

.github/workflows/test_matlab_windows.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,17 @@ jobs:
6464
$SEDI "s/max(\[0, chist\]) > 0)/max(\[0, chist\]) > 0)\nprobinfo.raw_data\noutput\nchist/" postprima.m
6565
cat postprima.m
6666
67-
- name: Decide the version of oneAPI to use
67+
- name: Decide the version of oneAPI to use on macOS and Windows
6868
shell: bash
69+
if: ${{ startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'windows') }}
6970
run: |
70-
# Initialize the variable ONEAPI_VERSION to an empty string, which means the default version
71-
ONEAPI_VERSION=
72-
if [[ "${{ matrix.os }}" = "windows-"* ]] ; then
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)"
76-
fi
71+
# Initialize ONEAPI_VERSION to "latest", causing the installer script to install the latest oneAPI.
72+
ONEAPI_VERSION="latest"
73+
# On Windows. the latest oneAPI supported by MATLAB R2023a/b and R2024a/b is 2023 and 2024,
74+
# respectively. Thus we set ONEAPI_VERSION to the following. If matrix.matlab is "latest",
75+
# then ONEAPI_VERSION will be "latest".
76+
if [[ "${{ matrix.os }}" == windows* ]]; then
77+
ONEAPI_VERSION=$(echo "${{ matrix.matlab }}" | sed -e 's/R\([0-9]*\)\([ab]\)/\1/')
7778
fi
7879
echo "ONEAPI_VERSION=$ONEAPI_VERSION" >> $GITHUB_ENV
7980
echo "ONEAPI_VERSION:" $ONEAPI_VERSION

0 commit comments

Comments
 (0)