From d59c8076f8ddf8f9c78f8f31e4dea6d63819a833 Mon Sep 17 00:00:00 2001 From: acampbel Date: Thu, 4 Apr 2024 21:50:21 -0400 Subject: [PATCH] Prep for workshop --- .github/workflows/matlab-ci.yml | 68 +++++++++++++++---------------- .github/workflows/pages.yml | 2 +- buildfile.m | 72 ++++++++++++++++----------------- 3 files changed, 71 insertions(+), 71 deletions(-) diff --git a/.github/workflows/matlab-ci.yml b/.github/workflows/matlab-ci.yml index 4f4604c..6a99d5c 100644 --- a/.github/workflows/matlab-ci.yml +++ b/.github/workflows/matlab-ci.yml @@ -11,7 +11,7 @@ on: env: PRODUCT_LIST: MATLAB MATLAB_Test MATLAB_Compiler MATLAB_Compiler_SDK - MLM_LICENSE_TOKEN: ${{secrets.MLM_LICENSE_TOKEN}} + # MLM_LICENSE_TOKEN: ${{secrets.MLM_LICENSE_TOKEN}} jobs: @@ -92,36 +92,36 @@ jobs: name: Mass-Spring-Damper Toolbox (All Platforms) path: release/Mass-Spring-Damper.mltbx - deploy-service: - # This job executes only after a successful completion of 'mex-and-unittests' job - needs: mex-and-unittests - - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Setup MATLAB - uses: matlab-actions/setup-matlab@v2 - with: - release: R2024a - cache: true - products: ${{ env.PRODUCT_LIST }} - - - name: Download Linux artifacts(to benefit from incremental build) - uses: actions/download-artifact@v4 - with: - pattern: build-artifacts-ubuntu-latest - merge-multiple: true - - - name: Build the ctf archive and run equivalence integration tests - uses: matlab-actions/run-build@v2 - with: - tasks: deploy - - - name: Upload Production Server Archive - uses: actions/upload-artifact@v4 - with: - name: Mass-Spring-Damper Production Server Archive - path: results/glnxa64/ctf-archive \ No newline at end of file + # deploy-service: + # # This job executes only after a successful completion of 'mex-and-unittests' job + # needs: mex-and-unittests + # + # + # runs-on: ubuntu-latest + # + # steps: + # - uses: actions/checkout@v4 + # + # - name: Setup MATLAB + # uses: matlab-actions/setup-matlab@v2 + # with: + # release: R2024a + # cache: true + # products: ${{ env.PRODUCT_LIST }} + # + # - name: Download Linux artifacts(to benefit from incremental build) + # uses: actions/download-artifact@v4 + # with: + # pattern: build-artifacts-ubuntu-latest + # merge-multiple: true + # + # - name: Build the ctf archive and run equivalence integration tests + # uses: matlab-actions/run-build@v2 + # with: + # tasks: deploy + # + # - name: Upload Production Server Archive + # uses: actions/upload-artifact@v4 + # with: + # name: Mass-Spring-Damper Production Server Archive + # path: results/glnxa64/ctf-archive \ No newline at end of file diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index d462cc2..423e69e 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -4,7 +4,7 @@ name: Publish to pages on: # This workflow requires enabling pages in the repository settings. # Therefore not running automatically on push and pr - push: # Uncomment to runs on push events + # push: # Uncomment to runs on push events # pull_request: # Runs on pull requests workflow_dispatch: # Allows you to run this workflow manually from the Actions tab diff --git a/buildfile.m b/buildfile.m index d3f22c4..080e541 100644 --- a/buildfile.m +++ b/buildfile.m @@ -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") = matlab.buildtool.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") = matlab.buildtool.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 @@ -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