Skip to content

Commit 6e54942

Browse files
committed
Maintenance for R2024b
1) Remove unnecessary files including Utilities/OldVersions, report, and buildutil 2) Update GitHub workflow file and supporting testing scripts in SoftwareTests 3) Update project contents, startup and shutdown files, and the ProjectStartupApp 4) Add InstructorResources with solutions 5) Make the image files more descriptive and fix the Open in MATLAB Online links in the README.md file
1 parent de77321 commit 6e54942

File tree

160 files changed

+2307
-2981
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+2307
-2981
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,22 @@ 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: [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
2127

2228
# Sets up a display server
2329
- name: Start display server
@@ -32,7 +38,7 @@ jobs:
3238
uses: matlab-actions/setup-matlab@v2
3339
with:
3440
release: ${{ matrix.MATLABVersion }}
35-
products: Symbolic_Math_Toolbox
41+
products: # Simulink Statistics_and_Machine_Learning_Toolbox
3642
# List required products above in the format shown (and uncomment them)
3743
# List of product strings:
3844
# Simulink
@@ -50,10 +56,12 @@ jobs:
5056

5157
# Upload the test results as artifact
5258
- name: Upload TestResults
53-
uses: actions/upload-artifact@v3.1.3
59+
if: ${{ always() }}
60+
uses: actions/upload-artifact@v4
5461
with:
55-
name: TestResults
56-
path: ./SoftwareTests/TestResults_${{ matrix.MATLABVersion }}.txt
62+
name: TestResults_${{ matrix.MATLABVersion }}
63+
path: ./public/*
64+
overwrite: true
5765

5866
badge:
5967
if: ${{ always() }}
@@ -64,26 +72,38 @@ jobs:
6472
steps:
6573

6674
# Checks-out your repository
67-
- uses: actions/checkout@v3
75+
- uses: actions/checkout@v4
6876

6977
# Sets up R2023b
7078
- name: Setup MATLAB
71-
uses: matlab-actions/setup-matlab@v1
79+
uses: matlab-actions/setup-matlab@v2
7280
with:
73-
release: R2023b
81+
release: R2024b
7482

7583
# Download the test results from artifact
76-
- name: Download TestResults
77-
uses: actions/download-artifact@v2.1.1
84+
- name: Download All TestResults
85+
uses: actions/download-artifact@v4
7886
with:
79-
name: TestResults
80-
path: ./SoftwareTests/
81-
87+
path: public
88+
pattern: TestResults_*
89+
merge-multiple: true
90+
8291
# Create the test results badge
83-
- name: Run CreateBadge
84-
uses: matlab-actions/run-command@v1
92+
- name: Run PostSmokeTest
93+
uses: matlab-actions/run-command@v2
94+
with:
95+
command: openProject(pwd); PostSmokeTest;
96+
97+
# Deploy reports to GitHub pages
98+
- name: Setup Pages
99+
uses: actions/configure-pages@v5
100+
- name: Upload pages artifact
101+
uses: actions/upload-pages-artifact@v3
85102
with:
86-
command: openProject(pwd); CreateBadge;
103+
path: public
104+
- name: Deploy to GitHub Pages
105+
id: deployment
106+
uses: actions/deploy-pages@v4
87107

88108
# Commit the JSON for the MATLAB releases badge
89109
- name: Commit changed files
@@ -96,4 +116,3 @@ jobs:
96116
git commit Images/TestedWith.json -m "Update CI badges ${{ github.ref_name }}"
97117
git fetch
98118
git push
99-

.gitignore

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

50-
# Test results
51-
SoftwareTests/TestResults_*
52-
53-
# GitLab page fodler
54-
public/
50+
# GitLab page folder
51+
public/

.gitlab-ci.yml

Lines changed: 84 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,87 @@
11
stages:
2+
# Set up two testing paths
3+
- setup
24
- test
5+
- deploy
6+
- release
37

4-
matlab-test-job:
5-
tags:
6-
- matlab
7-
stage: test
8-
script:
9-
- matlab -batch "openProject('Integrals.prj'); results = runtests('IncludeSubfolders', true); disp(table(results)); assertSuccess(results);"
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 git@insidelabs-git.mathworks.com: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]
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

Apps/CalculusFlashcards.mlapp

151 KB
Binary file not shown.

0 commit comments

Comments
 (0)