Skip to content

Commit 45e41a6

Browse files
author
Angel Gonzalez
committed
feat: update ci.yml to test across os and MATLAB versions
1 parent 52863f0 commit 45e41a6

File tree

1 file changed

+34
-23
lines changed

1 file changed

+34
-23
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
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

1616
on:
1717
push:
@@ -35,37 +35,48 @@ on:
3535
- '**.xml'
3636

3737
jobs:
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

Comments
 (0)