forked from gemini3d/mat_gemini
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildfile.m
More file actions
35 lines (23 loc) · 988 Bytes
/
buildfile.m
File metadata and controls
35 lines (23 loc) · 988 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function plan = buildfile
plan = buildplan(localfunctions);
plan.DefaultTasks = "setup";
check_paths = ["+gemini3d/", "test"];
if ~isMATLABReleaseOlderThan("R2023b")
codeIssuesArgs = {"IncludeSubfolders",true, "WarningThreshold",0};
testTaskArgs = {"test", "Strict",false};
if ~isMATLABReleaseOlderThan("R2024a")
codeIssuesArgs(end+1:end+2) = {"Results","CodeIssues.sarif"};
testTaskArgs(end+1:end+2) = {"TestResults","TestResults.xml"};
end
plan("check") = matlab.buildtool.tasks.CodeIssuesTask(check_paths, codeIssuesArgs{:});
plan("test") = matlab.buildtool.tasks.TestTask(testTaskArgs{:});
plan("test").Dependencies = "setup";
end
end
function setupTask(~)
setup()
gemini3d.sys.macos_path()
% leave this assert here to fail CI as "setup()" only warns, and CI will seem to pass
% but actually be skipping several tests.
assert(~isempty(gemini3d.find.gemini_exe("msis_setup")), "need to setup Gemini3D and/or set environment variable GEMINI_ROOT")
end