Skip to content

Commit 2e5b796

Browse files
authored
Use matrix strategy.
1 parent 67420b7 commit 2e5b796

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: CI
22

3-
env:
4-
MATLAB_VER: R2023a
5-
63
# Controls when the workflow will run
74
on:
85
# Triggers the workflow on push or pull request events but only for the "master" branch
@@ -22,6 +19,10 @@ on:
2219
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2320
jobs:
2421
check:
22+
strategy:
23+
fail-fast: false # Run with every MATLAB version independently
24+
matrix:
25+
matlabVer: [R2023a] # List of MATLAB releases to test
2526
runs-on: matlab
2627
# Steps represent a sequence of tasks that will be executed as part of the job
2728
steps:
@@ -41,7 +42,7 @@ jobs:
4142
4243
- name: Run MATLAB command
4344
run: |
44-
&"$env:ProgramFiles\MATLAB\$env:MATLAB_VER\bin\matlab.exe" -batch "openProject(pwd); cd('buildUtilities'); buildtool check"
45+
&"$env:ProgramFiles\MATLAB\${{ matrix.matlabVer }}\bin\matlab.exe" -batch "openProject(pwd); cd('buildUtilities'); buildtool check"
4546
4647
- name: Archive check results
4748
uses: actions/upload-artifact@v3
@@ -51,6 +52,10 @@ jobs:
5152
path: checkResults.json
5253

5354
test:
55+
strategy:
56+
fail-fast: false # Run with every MATLAB version independently
57+
matrix:
58+
matlabVer: [R2023a] # List of MATLAB releases to test
5459
runs-on: matlab
5560
# Steps represent a sequence of tasks that will be executed as part of the job
5661
steps:
@@ -75,7 +80,7 @@ jobs:
7580
7681
- name: Run MATLAB command
7782
run: |
78-
&"$env:ProgramFiles\MATLAB\$env:MATLAB_VER\bin\matlab.exe" -batch "openProject(pwd); cd('buildUtilities'); buildtool test({'noHW','bdConnected'})"
83+
&"$env:ProgramFiles\MATLAB\${{ matrix.matlabVer }}\bin\matlab.exe" -batch "openProject(pwd); cd('buildUtilities'); buildtool test({'noHW','bdConnected'})"
7984
8085
- name: Publish Test Results
8186
uses: EnricoMi/publish-unit-test-result-action/composite@v2

0 commit comments

Comments
 (0)