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
| `release` | <p>(Optional) MATLAB release to set up. You can specify R2021a or a later release. By default, the value of `release` is `latest`, which corresponds to the latest release of MATLAB.</p><p><ul><li>To set up the latest update of a release, specify only the release name, for example, `R2024a`.</li><li>To set up a specific update release, specify the release name with an update number suffix, for example, `R2024aU4`.</li><li>To set up a release without updates, specify the release name with an update 0 or general release suffix, for example, `R2024aU0` or `R2024aGR`.</li></ul></p><p>**Example**: `release: R2024a`<br/>**Example**: `release: latest`<br/>**Example**: `release: R2024aU4`</p> |
144
144
| `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. The action uses [MATLAB Package Manager](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/MPM.md) (`mpm`) to set up products.</p><p>For a list of supported products, open the input file for your preferred release from the [`mpm-input-files`](https://github.com/mathworks-ref-arch/matlab-dockerfile/tree/main/mpm-input-files) folder on GitHub. Specify products using the format shown in the input file, excluding the `#product.` prefix. For example, to set up Deep Learning Toolbox™ in addition to MATLAB, specify `products: Deep_Learning_Toolbox`.</p><p>For an example of how to use the `products` input, see [Run Tests in Parallel](#run-tests-in-parallel).</p><p>**Example**: `products: Simulink`<br/>**Example:** `products: Simulink Deep_Learning_Toolbox`</p> |
145
-
| `install-system-dependencies` | <p>(Optional) Option to install the dependencies required to run MATLAB and other MathWorks products, specified as one of these values:<ul><li>`auto` (default) — If the runner is GitHub-hosted, install the dependencies. Otherwise, do not install any dependencies.</li><li>`true` — Install the dependencies on the runner, regardless of its type.</li><li>`false` — Do not install any dependencies on the runner, regardless of its type.</li></ul></p><p>**Note**: On a self-hosted runner, if you specify this input as `true`, the runner must be configured with passwordless `sudo` access.</p><p>**Example**: `install-system-dependencies: true`</p> |
145
+
| `install-system-dependencies` | <p>(Optional) Option to install the dependencies required to run MATLAB and other MathWorks products, specified as one of these values:<ul><li>`auto` (default) — If the runner is GitHub-hosted, install the dependencies. Otherwise, do not install any dependencies.</li><li>`true` — Install the dependencies on the runner, regardless of its type.</li><li>`false` — Do not install any dependencies on the runner, regardless of its type.</li></ul></p><p>**Note**: On a self-hosted runner, if you specify this input as `true`, the runner must be configured with passwordless `sudo` access.</p><p>**Example**: `install-system-dependencies: true`</p> |
146
146
| `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> |
147
147
148
-
149
148
#### Required Software on Self-Hosted Runners
150
149
151
150
Setting up MATLAB and other MathWorks products on a self-hosted UNIX runner requires certain dependencies to be installed on the runner. You can install these dependencies by using the `install-system-dependencies` action input.
Copy file name to clipboardExpand all lines: devel/contributing.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,3 +13,32 @@ Familiarize yourself with the best practices for [releasing and maintaining GitH
13
13
Changes should be made on a new branch. The new branch should be merged to the main branch via a pull request. Ensure that all of the CI pipeline checks and tests have passed for your changes.
14
14
15
15
After the pull request has been approved and merged to main, follow the Github process for [creating a new release](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository). The release must follow semantic versioning (ex: vX.Y.Z). This will kick off a new pipeline execution, and the action will automatically be published to the GitHub Actions Marketplace if the pipeline finishes successfully. Check the [GitHub Marketplace](https://github.com/marketplace/actions/setup-matlab) and check the major version in the repository (ex: v1 for v1.0.0) to ensure that the new semantically versioned tag is available.
16
+
17
+
## Adding a Pre-Commit Hook
18
+
19
+
You can run all CI checks before each commit by adding a pre-commit hook. To do so, navigate to the repository root folder and run the following commands:
20
+
21
+
_bash (Linux/macOS)_
22
+
23
+
```sh
24
+
echo'#!/bin/sh'> .git/hooks/pre-commit
25
+
echo'npm run ci'>> .git/hooks/pre-commit
26
+
chmod +x .git/hooks/pre-commit
27
+
```
28
+
29
+
_Command Prompt (Windows)_
30
+
31
+
```cmd
32
+
echo #!/bin/sh > .git\hooks\pre-commit
33
+
echo npm run ci >> .git\hooks\pre-commit
34
+
```
35
+
36
+
_PowerShell (Windows)_
37
+
38
+
```pwsh
39
+
Set-Content .git\hooks\pre-commit '#!/bin/sh'
40
+
Add-Content .git\hooks\pre-commit 'npm run ci'
41
+
```
42
+
43
+
> **Note:**
44
+
> Git hooks are not version-controlled, so you need to set up this hook for each fresh clone of the repository.
0 commit comments