@@ -10,26 +10,42 @@ import { State } from './install-state';
1010/**
1111 * Set up an instance of MATLAB on the runner.
1212 *
13- * First, system dependencies are installed. Then the ephemeral installer script
13+ * First, system dependencies are installed (if enabled) . Then the ephemeral installer script
1414 * is invoked.
1515 *
1616 * @param platform Operating system of the runner (e.g. "win32" or "linux").
1717 * @param architecture Architecture of the runner (e.g. "x64", or "x86").
1818 * @param release Release of MATLAB to be set up (e.g. "latest" or "R2020a").
1919 * @param products A list of products to install (e.g. ["MATLAB", "Simulink"]).
2020 * @param useCache whether to use the cache to restore & save the MATLAB installation
21+ * @param installSysDeps resolved boolean (from "auto" | "true" | "false"):
22+ * true -> install system dependencies
23+ * false -> skip system dependencies
2124 */
22- export async function install ( platform : string , architecture : string , release : string , products : string [ ] , useCache : boolean ) {
25+ export async function install (
26+ platform : string ,
27+ architecture : string ,
28+ release : string ,
29+ products : string [ ] ,
30+ useCache : boolean ,
31+ installSysDeps : boolean
32+ ) {
2333 const releaseInfo = await matlab . getReleaseInfo ( release ) ;
2434 if ( releaseInfo . name < "r2020b" ) {
2535 return Promise . reject ( Error ( `Release '${ releaseInfo . name } ' is not supported. Use 'R2020b' or a later release.` ) ) ;
2636 }
2737
28- // Install system dependencies if cloud-hosted
29- if ( process . env [ "RUNNER_ENVIRONMENT" ] === "github-hosted" && process . env [ "AGENT_ISSELFHOSTED" ] !== "1" ) {
38+ // -------------------------------
39+ // PRE-INSTALL DECISION & LOGGING
40+ // -------------------------------
41+ console . log ( `installSysDep (resolved): ${ installSysDeps } ` ) ;
42+ if ( installSysDeps ) {
43+ console . log ( "installs sys deps" ) ;
3044 await core . group ( "Preparing system for MATLAB" , async ( ) => {
3145 await matlab . installSystemDependencies ( platform , architecture , releaseInfo . name ) ;
3246 } ) ;
47+ } else {
48+ console . log ( "not installing sys deps" ) ;
3349 }
3450
3551 await core . group ( "Setting up MATLAB" , async ( ) => {
0 commit comments