Skip to content

Commit 49c5366

Browse files
committed
Maintenance cycle R2024b
1 parent 923ea9e commit 49c5366

38 files changed

+655
-216
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*.slmx binary merge=mlAutoMerge
1717
*.sltx binary
1818
*.slxc binary
19-
*.slx binary merge=mlAutoMerge
19+
*.slx binary merge=mlAutoMerge linguist-language=Simulink
2020
*.slxp binary
2121

2222
## Other common binary file types

.github/workflows/ci.yml

Lines changed: 49 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,53 @@ on:
88
branches: [ release ]
99
workflow_dispatch:
1010

11+
# Add permission to write GitHub pages
12+
permissions:
13+
contents: write
14+
pages: write
15+
id-token: write
16+
1117
jobs:
1218
test:
1319
strategy:
1420
fail-fast: false
1521
matrix:
16-
MATLABVersion: [R2021a,R2021b,R2022a,R2022b,R2023a,R2023b]
22+
MATLABVersion: [R2024a,R2024b]
1723
runs-on: ubuntu-latest
1824
steps:
1925
# Checks-out your repository
20-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
27+
28+
# Sets up a display server
29+
- name: Start display server
30+
if: ${{ always() }}
31+
run: |
32+
sudo apt-get install xvfb
33+
Xvfb :99 &
34+
echo "DISPLAY=:99" >> $GITHUB_ENV
2135
2236
# Sets up MATLAB
2337
- name: Setup MATLAB
24-
uses: matlab-actions/setup-matlab@v1
38+
uses: matlab-actions/setup-matlab@v2
2539
with:
2640
release: ${{ matrix.MATLABVersion }}
41+
products: Simulink Simscape
42+
2743

2844
# Run all the tests
2945
- name: Run SmokeTests
30-
uses: matlab-actions/run-command@v1
46+
uses: matlab-actions/run-command@v2
3147
with:
3248
command: openProject(pwd); RunAllTests;
3349

3450
# Upload the test results as artifact
3551
- name: Upload TestResults
36-
uses: actions/[email protected]
52+
if: ${{ always() }}
53+
uses: actions/upload-artifact@v4
3754
with:
38-
name: TestResults
39-
path: ./SoftwareTests/TestResults_${{ matrix.MATLABVersion }}.txt
55+
name: TestResults_${{ matrix.MATLABVersion }}
56+
path: ./public/*
57+
overwrite: true
4058

4159
badge:
4260
if: ${{ always() }}
@@ -47,26 +65,38 @@ jobs:
4765
steps:
4866

4967
# Checks-out your repository
50-
- uses: actions/checkout@v3
68+
- uses: actions/checkout@v4
5169

5270
# Sets up R2023b
5371
- name: Setup MATLAB
54-
uses: matlab-actions/setup-matlab@v1
72+
uses: matlab-actions/setup-matlab@v2
5573
with:
56-
release: R2023b
74+
release: R2024b
5775

5876
# Download the test results from artifact
59-
- name: Download TestResults
60-
uses: actions/download-artifact@v2.1.1
77+
- name: Download All TestResults
78+
uses: actions/download-artifact@v4
6179
with:
62-
name: TestResults
63-
path: ./SoftwareTests/
64-
80+
path: public
81+
pattern: TestResults_*
82+
merge-multiple: true
83+
6584
# Create the test results badge
66-
- name: Run CreateBadge
67-
uses: matlab-actions/run-command@v1
85+
- name: Run PostSmokeTest
86+
uses: matlab-actions/run-command@v2
87+
with:
88+
command: openProject(pwd); PostSmokeTest;
89+
90+
# Deploy reports to GitHub pages
91+
- name: Setup Pages
92+
uses: actions/configure-pages@v5
93+
- name: Upload pages artifact
94+
uses: actions/upload-pages-artifact@v3
6895
with:
69-
command: openProject(pwd); CreateBadge;
96+
path: public
97+
- name: Deploy to GitHub Pages
98+
id: deployment
99+
uses: actions/deploy-pages@v4
70100

71101
# Commit the JSON for the MATLAB releases badge
72102
- name: Commit changed files
@@ -75,6 +105,7 @@ jobs:
75105
git config user.name "${{ github.workflow }} by ${{ github.actor }}"
76106
git config user.email "<>"
77107
git pull
108+
git add Images/TestedWith.json
78109
git commit Images/TestedWith.json -m "Update CI badges ${{ github.ref_name }}"
79110
git fetch
80111
git push

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ codegen/
4747
# Project settings
4848
Utilities/ProjectSettings.mat
4949

50-
# Test results
51-
SoftwareTests/TestResults_*
50+
# GitLab page folder
51+
public/

.gitlab-ci.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
stages:
2+
# Set up two testing paths
3+
- setup
4+
- test
5+
- deploy
6+
- release
7+
8+
setup-job:
9+
tags:
10+
- matlab
11+
stage: setup
12+
script:
13+
- cd ..
14+
- if (test-path utilities) { rm -r -force utilities }
15+
- git clone [email protected]:modular-curriculum-content/utilities.git
16+
- cd $CI_PROJECT_NAME
17+
allow_failure: false
18+
19+
20+
smoke-test:
21+
# Smoke tests should run all the time
22+
tags:
23+
# Add additional tags like (e.g. - arduino) as required
24+
# Make sure that the runner you plan to use matches the tags
25+
- matlab
26+
stage: test
27+
parallel:
28+
matrix:
29+
- VERSION: [R2024a,R2024b,R2025a]
30+
script:
31+
- Set-Alias -Name matlab -Value "C:\Program Files\MATLAB\$VERSION\bin\matlab.exe"
32+
- matlab -batch "openProject(pwd);RunAllTests"
33+
when: always
34+
allow_failure: true
35+
artifacts:
36+
name: "$VERSION"
37+
paths:
38+
- public/*
39+
when: always
40+
41+
42+
pages:
43+
tags:
44+
- matlab
45+
stage: deploy
46+
script:
47+
- matlab -batch "openProject(pwd);PostSmokeTest;"
48+
artifacts:
49+
paths:
50+
- public
51+
52+
file-test:
53+
tags:
54+
- matlab
55+
stage: release
56+
script:
57+
- matlab -batch "proj = openProject(pwd);
58+
addpath(proj.RootFolder+'/InternalFiles/Tests/CI');
59+
results = runtests('OpenCloseFileTest.m');
60+
disp(table(results)); assertSuccess(results);"
61+
rules:
62+
# This test should always run when merging to main
63+
# And be available for manual running on any push
64+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
65+
when: always
66+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
67+
when: manual
68+
allow_failure: true
69+
70+
release-testing:
71+
tags:
72+
- matlab
73+
stage: release
74+
script:
75+
- matlab -batch "proj = openProject(pwd);
76+
cd ..;
77+
addpath(genpath(fullfile('utilities','TestingResources')));
78+
addpath(genpath(fullfile('utilities','Tools')));
79+
runCMTests"
80+
rules:
81+
# This test should always run when merging to main
82+
# And be available for manual running on any push
83+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
84+
when: always
85+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
86+
when: manual
87+
allow_failure: true

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2023, The MathWorks, Inc.
1+
Copyright (c) 2024, The MathWorks, Inc.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

0 commit comments

Comments
 (0)