You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
# Action for Setting Up MATLAB
2
2
3
-
The [Setup MATLAB](#set-up-matlab) action enables you to run MATLAB® code and Simulink® models with a specific version of MATLAB. When you specify this action as part of your workflow, the action sets up your preferred MATLAB release (R2021a or later) on a Linux®, Windows®, or macOS® runner. If you do not specify a release, the action sets up the latest release of MATLAB. As part of the setup process, the action prepends MATLAB to the system PATH environment variable.
3
+
The [Setup MATLAB](#set-up-matlab) action enables you to run MATLAB® code and Simulink® models with a specific version of MATLAB. When you specify this action as part of your workflow, the action sets up your preferred MATLAB release (R2021a or later) on a Linux®, Windows®, or macOS runner. If you do not specify a release, the action sets up the latest release of MATLAB. As part of the setup process, the action prepends MATLAB to the `PATH` system environment variable.
4
4
5
-
## Usage Examples
5
+
## Examples
6
6
Once you set up MATLAB on a runner, you can build and test your MATLAB project as part of your workflow. To execute code on the runner, include the [Run MATLAB Build](https://github.com/matlab-actions/run-build/), [Run MATLAB Tests](https://github.com/matlab-actions/run-tests/), or [Run MATLAB Command](https://github.com/matlab-actions/run-command/) action in your workflow.
7
7
8
8
### Run MATLAB Build on GitHub-Hosted Runner
9
-
Use a [GitHub®-hosted runner](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners) to run a task and its depended-on tasks that are specified in a file named `buildfile.m` in the root of your repository. Because the `"test"` task in this example runs the tests authored using the MATLAB unit testing framework as well as Simulink Test™, you must set up Simulink and Simulink Test in addition to MATLAB. To run tasks using the MATLAB build tool, include the [Run MATLAB Build](https://github.com/matlab-actions/run-build/) action in your workflow.
9
+
Use a [GitHub®-hosted runner](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners) to run a task and its depended-on tasks that are specified in a file named `buildfile.m` in the root of your repository. Because the `"test"` task in this example runs the tests authored using the MATLAB unit testing framework as well as Simulink Test™, you must set up Simulink and Simulink Test in addition to MATLAB. To run tasks using the MATLAB build tool, specify the [Run MATLAB Build](https://github.com/matlab-actions/run-build/) action in your workflow.
10
10
11
11
```yaml
12
12
name: Run MATLAB Build on GitHub-Hosted Runner
@@ -29,7 +29,7 @@ jobs:
29
29
```
30
30
31
31
### Run MATLAB Tests on GitHub-Hosted Runner
32
-
Use a GitHub-hosted runner to run the tests in your [MATLAB project](https://www.mathworks.com/help/matlab/projects.html) and generate test results in JUnit-style XML format and code coverage results in Cobertura XML format. To run the tests and generate the artifacts, include the [Run MATLAB Tests](https://github.com/matlab-actions/run-tests/) action in your workflow.
32
+
Use a GitHub-hosted runner to run the tests in your [MATLAB project](https://www.mathworks.com/help/matlab/projects.html) and generate test results in JUnit-style XML format and code coverage results in Cobertura XML format. To run the tests and generate the artifacts, specify the [Run MATLAB Tests](https://github.com/matlab-actions/run-tests/) action in your workflow.
33
33
34
34
```yaml
35
35
name: Run MATLAB Tests on GitHub-Hosted Runner
@@ -51,7 +51,7 @@ jobs:
51
51
```
52
52
53
53
### Run MATLAB Script on GitHub-Hosted Runner
54
-
Use a GitHub-hosted runner to run the commands in a file named `myscript.m` in the root of your repository. To run the script, include the [Run MATLAB Command](https://github.com/matlab-actions/run-command/) action in your workflow.
54
+
Use a GitHub-hosted runner to run the commands in a file named `myscript.m` in the root of your repository. To run the script, specify the [Run MATLAB Command](https://github.com/matlab-actions/run-command/) action in your workflow.
55
55
56
56
```yaml
57
57
name: Run MATLAB Script on GitHub-Hosted Runner
@@ -75,7 +75,7 @@ jobs:
75
75
The **Setup MATLAB** action supports the Linux, Windows, and macOS platforms. Define a matrix of job configurations to run a build using the MATLAB build tool on all the supported platforms. This workflow runs three jobs, one for each value in the variable `os`. For more information about matrices, see [Using a matrix for your jobs](https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs).
76
76
77
77
```YAML
78
-
name: Run MATLAB Build on Different Platforms
78
+
name: Run MATLAB Build Across Different Platforms
79
79
on: [push]
80
80
jobs:
81
81
my-job:
@@ -100,8 +100,8 @@ When you define your workflow in the `.github/workflows` directory of your repos
100
100
101
101
| Input | Description |
102
102
|-----------|-------------|
103
-
| `release` | <p>(Optional) MATLAB release to set up. You can specify R2021a or a later release. If you do not specify `release`, the action defaults to `latest`, which represents the latest release of MATLAB.<p/><p>**Example**: `release: R2023a`<br/>**Example**: `release: latest`</p>
104
-
| `products` | <p>(Optional) Products to set up in addition to MATLAB, specified as a list of product names separated by spaces. You can specify `products` to set up most MathWorks® products and support packages. For example, `products: Deep_Learning_Toolbox` sets up Deep Learning Toolbox™ in addition to MATLAB.</p><p>The action uses [MATLAB Package Manager](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/MPM.md) (`mpm`) for installing products. For a list of supported products and their correctly formatted names, see [Product Installation Options](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/MPM.md#product-installation-options).</p> <p>:information_source: **Note:** If you use this input to set up transformation products, such as MATLAB Coder™ and MATLAB Compiler™, the action does not automatically license such products for you.<p/><p>**Example**: `products: Simulink`</br>**Example:** `products: Simulink Deep_Learning_Toolbox`</p>
103
+
| `release` | <p>(Optional) MATLAB release to set up. You can specify R2021a or a later release. By default, the value of `release` is `latest`. If you do not specify `release`, the action sets up the latest release of MATLAB.<p/><p>**Example**: `release: R2023a`<br/>**Example**: `release: latest`</p>
104
+
| `products` | <p>(Optional) Products to set up in addition to MATLAB, specified as a list of product names separated by spaces. You can specify `products` to set up most MathWorks® products and support packages. For example, `products: Deep_Learning_Toolbox` sets up Deep Learning Toolbox™ in addition to MATLAB.</p><p>The action uses [MATLAB Package Manager](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/MPM.md) (`mpm`) to install products. For a list of supported products and their correctly formatted names, see [Product Installation Options](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/MPM.md#product-installation-options).</p> <p>:information_source: **Note:** If you use this input to set up transformation products, such as MATLAB Coder™ and MATLAB Compiler™, the action does not automatically license such products for you.<p/><p>**Example**: `products: Simulink`</br>**Example:** `products: Simulink Deep_Learning_Toolbox`</p>
105
105
| `cache` | <p>(Optional) Option to enable caching with GitHub® Actions, specified as `false` or `true`. By default, the value is `false` and the action does not store MATLAB and the specified products in a GitHub Actions cache for future use. For more information about caching with GitHub Actions, see [Caching dependencies to speed up workflows](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows).<p/><p>**Example**: `cache: true`</p>
106
106
107
107
## Notes
@@ -114,4 +114,4 @@ When you use the **Setup MATLAB** action, you execute third-party code that is l
114
114
- [Continuous Integration with MATLAB and Simulink](https://www.mathworks.com/solutions/continuous-integration.html)
115
115
116
116
## Contact Us
117
-
If you have any questions or suggestions, please contact MathWorks® at [continuous-integration@mathworks.com](mailto:continuous-integration@mathworks.com).
117
+
If you have any questions or suggestions, please contact MathWorks at [continuous-integration@mathworks.com](mailto:continuous-integration@mathworks.com).
0 commit comments