Skip to content

Commit 9dd91b6

Browse files
committed
ci: separate workflow for very old matlab
1 parent 8faa991 commit 9dd91b6

File tree

3 files changed

+36
-8
lines changed

3 files changed

+36
-8
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
matrix:
2828
os: [ubuntu-22.04, windows-2022]
29-
release: [R2021a, R2021b, R2022a, R2022b, R2023a, R2023b, R2024a, R2024b, R2025a]
29+
release: [R2022a, R2022b, R2023a, R2023b, R2024a, R2024b, R2025a]
3030
# on Linux, even R2025a needs GCC 10.x and hence Github Actions runner ubuntu-22.04.
3131
# R2021a...R2022a officially need Ubuntu 20.04,
3232
# which is no longer available on Github Actions
@@ -76,3 +76,26 @@ jobs:
7676
- name: MEX tests
7777
if: ${{ matrix.release >= 'R2023b' }}
7878
uses: ./.github/workflows/composite-mex
79+
80+
81+
matlab-older-than-R2022a:
82+
timeout-minutes: 15
83+
runs-on: ${{ matrix.os }}
84+
85+
strategy:
86+
matrix:
87+
os: [ubuntu-22.04]
88+
release: [R2021a, R2021b]
89+
90+
steps:
91+
- uses: actions/checkout@v4
92+
93+
- uses: ./.github/workflows/composite-install-matlab
94+
95+
- name: Matlab tell External Language Interface versions
96+
uses: matlab-actions/run-command@v2
97+
with:
98+
command: stdlib.platform_tell()
99+
100+
- name: Non-MEX tests
101+
uses: ./.github/workflows/composite-nomex

test/is_capable.m

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,11 @@ function is_capable(tc, f)
2626
tc.assumeGreaterThanOrEqual(japi, 11)
2727
end
2828

29-
elseif ~isMATLABReleaseOlderThan('R2022a') && contains(n, "python")
29+
elseif contains(n, "python")
3030

3131
tc.assumeTrue(stdlib.has_python())
3232

33-
try
34-
py.psutil.version_info();
35-
has_psutil = true;
36-
catch
37-
has_psutil = false;
38-
end
33+
has_psutil = pvt_psutil();
3934

4035
if contains(n, ["ram_free", "ram_total"])
4136
tc.assumeTrue(has_psutil, "need Python psutil package")

test/private/pvt_psutil.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function y = pvt_psutil()
2+
3+
try
4+
py.psutil.version_info();
5+
y = true;
6+
catch
7+
y = false;
8+
end
9+
10+
end

0 commit comments

Comments
 (0)