99# For details about the syntax of this file, see
1010# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
1111
12- # Copyright 2023 The MathWorks, Inc.
12+ # Copyright 2023-2025 The MathWorks, Inc.
1313
14- name : CI using MATLAB
14+ name : CI using MATLAB Across Multiple OS and MATLAB Versions
1515
1616on :
1717 push :
3535 - ' **.xml'
3636
3737jobs :
38-
39- job-check-project :
40- runs-on : ubuntu-latest
38+ check-project :
39+ name : Check Project on ${{ matrix.os }} with MATLAB ${{ matrix.matlab_version }}
40+ runs-on : ${{ matrix.os }}
41+ strategy :
42+ matrix :
43+ os : [ubuntu-latest, windows-latest, macos-latest]
44+ matlab_version : [R2021b, R2022b, R2023b, R2024b]
4145 steps :
42-
4346 - name : Check out repository
44- uses : actions/checkout@v3
47+ uses : actions/checkout@v4
4548
46- - name : Setup MATLAB
47- uses : matlab-actions/setup-matlab@v1
49+ - name : Setup MATLAB ${{ matrix.matlab_version }}
50+ uses : matlab-actions/setup-matlab@v2
4851 with :
49- release : R2021b
52+ release : ${{ matrix.matlab_version }}
5053
51- - name : Run tests
52- uses : matlab-actions/run-command@v1
54+ - name : Run Project Tests
55+ uses : matlab-actions/run-command@v2
5356 with :
54- command : openProject(pwd); ImportMotorCADThermalModel_CheckProject_runtests;
57+ command : |
58+ openProject(pwd);
59+ ImportMotorCADThermalModel_CheckProject_runtests;
5560
56- job-run-libraries-tests :
57- runs-on : ubuntu-latest
61+ run-libraries-tests :
62+ name : Run Libraries Tests on ${{ matrix.os }} with MATLAB ${{ matrix.matlab_version }}
63+ runs-on : ${{ matrix.os }}
64+ strategy :
65+ matrix :
66+ os : [ubuntu-latest, windows-latest, macos-latest]
67+ matlab_version : [R2021b, R2022b, R2023b, R2024b]
5868 steps :
59-
6069 - name : Check out repository
61- uses : actions/checkout@v3
70+ uses : actions/checkout@v4
6271
63- - name : Setup MATLAB
64- uses : matlab-actions/setup-matlab@v1
72+ - name : Setup MATLAB ${{ matrix.matlab_version }}
73+ uses : matlab-actions/setup-matlab@v2
6574 with :
66- release : R2021b
75+ release : ${{ matrix.matlab_version }}
6776
68- - name : Run libraries tests
69- uses : matlab-actions/run-command@v1
77+ - name : Run Libraries Tests
78+ uses : matlab-actions/run-command@v2
7079 with :
71- command : openProject(pwd); ImportMotorCADThermalModel_runlibtests;
80+ command : |
81+ openProject(pwd);
82+ ImportMotorCADThermalModel_runlibtests;
0 commit comments