Skip to content

Commit

Permalink
Add initial maca support
Browse files Browse the repository at this point in the history
  • Loading branch information
sameagen-MW committed Jul 9, 2024
1 parent 445e689 commit 5098c8b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
22 changes: 18 additions & 4 deletions matlab-plugin-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,35 @@
<goal>wget</goal>
</goals>
<configuration>
<url>https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v1/glnxa64/run-matlab-command</url>
<url>https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/glnxa64/run-matlab-command</url>
<unpack>false</unpack>
<skipCache> true </skipCache>
<overwrite> true </overwrite>
<outputDirectory>${basedir}/src/main/resources/glnxa64</outputDirectory>
</configuration>
</execution>
<execution>
<id>get-matlab-runner-mac</id>
<id>get-matlab-runner-maca</id>
<phase>validate</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v1/maci64/run-matlab-command</url>
<url>https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/maca64/run-matlab-command</url>
<unpack>false</unpack>
<skipCache> true </skipCache>
<overwrite> true </overwrite>
<outputDirectory>${basedir}/src/main/resources/maca64</outputDirectory>
</configuration>
</execution>
<execution>
<id>get-matlab-runner-maci</id>
<phase>validate</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/maci64/run-matlab-command</url>
<unpack>false</unpack>
<skipCache> true </skipCache>
<overwrite> true </overwrite>
Expand All @@ -106,7 +120,7 @@
<goal>wget</goal>
</goals>
<configuration>
<url>https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v1/win64/run-matlab-command.exe</url>
<url>https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/win64/run-matlab-command.exe</url>
<unpack>false</unpack>
<skipCache> true </skipCache>
<overwrite> true </overwrite>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ private String copyExecutable(BuildRunnerContext runnerContext) throws IOExcepti

executable = runnerExe.getPath();

copyFileToWorkspace(MatlabConstants.RUN_EXE_MAC, new File(runnerExe.getPath()));
if (System.getProperty("os.arch").equals("aarch64")) {
copyFileToWorkspace(MatlabConstants.RUN_EXE_MACA, new File(runnerExe.getPath()));
} else {
copyFileToWorkspace(MatlabConstants.RUN_EXE_MACI, new File(runnerExe.getPath()));
}
} else {
final File runnerExe = new File(this.tempDirectory, "run-matlab-command");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public interface MatlabConstants {
String TEMP_MATLAB_FOLDER_NAME = ".matlab";
// Matlab Runner files
static final String RUN_EXE_WIN = "win64/run-matlab-command.exe";
static final String RUN_EXE_MAC = "maci64/run-matlab-command";
static final String RUN_EXE_MACA = "maca64/run-matlab-command";
static final String RUN_EXE_MACI = "maci64/run-matlab-command";
static final String RUN_EXE_LINUX = "glnxa64/run-matlab-command";
static final String MATLAB_SCRIPT_GENERATOR = "matlab-script-generator.zip";
//Test runner file prefix
Expand Down

0 comments on commit 5098c8b

Please sign in to comment.