Skip to content

Commit

Permalink
Update buildfile.m
Browse files Browse the repository at this point in the history
  • Loading branch information
acampbel authored Jul 24, 2024
1 parent 2dc600b commit 6559ae8
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions buildfile.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,25 +77,25 @@
Description="Produce a fully qualified toolbox for release");


% %% Build a MATLAB Production Server archive
% % Ad hoc task, task action defined in toolboxTask local function
% plan("ctf").Dependencies = ["lint","test"];
% plan("ctf").Inputs = ["code", "pcode", "buildutils/simulateSystemFunctionSignatures.json"];
% plan("ctf").Outputs = [...
% resultsFolder + "/ctf-archive/MassSpringDamperService.ctf", ...
% resultsFolder + "/ctf-build-results.mat", ...
% resultsFolder + "/ctf-archive"];
%% Build a MATLAB Production Server archive
% Ad hoc task, task action defined in toolboxTask local function
plan("ctf").Dependencies = ["lint","test"];
plan("ctf").Inputs = ["code", "pcode", "buildutils/simulateSystemFunctionSignatures.json"];
plan("ctf").Outputs = [...
resultsFolder + "/ctf-archive/MassSpringDamperService.ctf", ...
resultsFolder + "/ctf-build-results.mat", ...
resultsFolder + "/ctf-archive"];


% %% Integration tests - back-to-back equivalence tests for the production server archive
% plan("ctfIntegTest") = TestTask("integTests/equivalence",SourceFiles=["code","pcode"], ...
% Description="Run integration tests against CTF archive.", ...
% Dependencies="ctf");
%% Integration tests - back-to-back equivalence tests for the production server archive
plan("ctfIntegTest") = TestTask("integTests/equivalence",SourceFiles=["code","pcode"], ...
Description="Run integration tests against CTF archive.", ...
Dependencies="ctf");


% %% Create the deploy task - does nothing but depends on other tasks
% plan("deploy") = Task(Dependencies="ctfIntegTest", ...
% Description="Produce and test a ctf archive to deploy to a MATLAB Production Server");
%% Create the deploy task - does nothing but depends on other tasks
plan("deploy") = Task(Dependencies="ctfIntegTest", ...
Description="Produce and test a ctf archive to deploy to a MATLAB Production Server");


%% Produce HTML from workshop live scripts to publish to GitHub pages
Expand Down Expand Up @@ -163,27 +163,27 @@ function toolboxTask(context,version)
end


% %% The "ctf" task action
% function ctfTask(context)
% % Create a deployable archive for MATLAB Production Server
%
% ctfArchive = context.Task.Outputs(1).paths;
% ctfBuildResults = context.Task.Outputs(2).paths;
%
% % Create the archive options for the build.
% [ctfFolder, ctfFile] = fileparts(ctfArchive);
% opts = compiler.build.ProductionServerArchiveOptions(...
% ["code/simulateSystem.m", "pcode/springMassDamperDesign.m"], ...
% FunctionSignatures="buildutils/simulateSystemFunctionSignatures.json", ...
% OutputDir=ctfFolder, ...
% ArchiveName=ctfFile, ...
% ObfuscateArchive="on");
%
% % Build the archive
% buildResults = compiler.build.productionServerArchive(opts);
%
% save(ctfBuildResults,"buildResults");
% end
%% The "ctf" task action
function ctfTask(context)
% Create a deployable archive for MATLAB Production Server

ctfArchive = context.Task.Outputs(1).paths;
ctfBuildResults = context.Task.Outputs(2).paths;

% Create the archive options for the build.
[ctfFolder, ctfFile] = fileparts(ctfArchive);
opts = compiler.build.ProductionServerArchiveOptions(...
["code/simulateSystem.m", "pcode/springMassDamperDesign.m"], ...
FunctionSignatures="buildutils/simulateSystemFunctionSignatures.json", ...
OutputDir=ctfFolder, ...
ArchiveName=ctfFile, ...
ObfuscateArchive="on");

% Build the archive
buildResults = compiler.build.productionServerArchive(opts);

save(ctfBuildResults,"buildResults");
end


%% The "workshop" task action
Expand Down

0 comments on commit 6559ae8

Please sign in to comment.