Closed josmartin closed 2 years ago
I strongly encourage at least a Squash and Merge action on this request as I needed to play around with how GitHub actions worked to get this all working successfully!
Merging #40 (636b2c5) into master (a24b5aa) will increase coverage by
0.39%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## master #40 +/- ##
==========================================
+ Coverage 68.58% 68.98% +0.39%
==========================================
Files 302 317 +15
Lines 42555 44546 +1991
==========================================
+ Hits 29187 30728 +1541
- Misses 13368 13818 +450
Impacted Files | Coverage Δ | |
---|---|---|
utilities_help/publishFS.m | 89.62% <0.00%> (-0.11%) |
:arrow_down: |
clustering/ctlcurves.m | 81.15% <0.00%> (ø) |
|
clustering/restreigenmemopt.m | 54.11% <0.00%> (ø) |
|
clustering/restrdeterGPCM.m | 100.00% <0.00%> (ø) |
|
clustering/overlapmap.m | 54.49% <0.00%> (ø) |
|
clustering/GowerIndex.m | 91.42% <0.00%> (ø) |
|
clustering/restreigeneasy.m | 97.72% <0.00%> (ø) |
|
clustering/restreigen.m | 98.00% <0.00%> (ø) |
|
clustering/restrSigmaGPCM.m | 86.30% <0.00%> (ø) |
|
clustering/restrdeter.m | 90.00% <0.00%> (ø) |
|
... and 8 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update a24b5aa...636b2c5. Read the comment docs.
Dear Jos, many thanks for this new great feature, you did a excellent job!
Proposed changes
This PR enables users to build a docker container on their own machines which contains MATLAB and the required toolboxes in addition to a properly configured installation of FSDA toolbox.
In addition this PR updates the repository actions so as to automatically rebuild and push a docker container with the latest version of MATLAB (and toolboxes) along with the latest release of FSDA and make this container available from the
ghcr.io
repository so that a user could simplypull
this container instead of building it themselves. This container is based on `mathworks/matlab' and has all the same capabilities as that container.Types of changes
What types of changes does your code introduce to FSDA? Put an
x
in the boxes that applyOverview of changes
This PR has 2 sets of files that inter-relate
./docker
provides aDockerfile
along with some start-up code for the resulting MATLAB and aREADME.md
to explain how to build a docker container on an arbitrary on-prem machine.github/workflows
folder to enable automatic building and pushing of a docker container post-(create release) so that we can manually trigger a build of the container and automate it via release of a new tag.Hopefully the
./docker/
files are relatively self-explanatory!Dockerfile
starts frommathworks/matlab
wget
which is needed for downloadingmpm
(]MATLAB Package Manager](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/MPM.md)).Dockerfile
is theFSDA_RELEASE
version from the releases in this repo. That is the version of FSDA that is put in the containerstartup.m
is added to the container - this is where FSDA is added to the MATLAB path at MATLAB startup and the doc search DB is updated, etc.Changes to
.github/workflow
are a bit more complicated and can be broken down as follows:FILE:
reusable-build-docker-container.yml
As the name suggests this is a reusable workflow that is intended to be called from other triggered workflows (as you can see in both
build-docker-container.yml
andupload-artifact.yml
). It has a required inputfsda-release
(the release of FSDA from the current repo that should be installed) and an optional inputmatlab-release
(the tag for themathworks/matlab
container to be use - defaults tolatest
). The resulting build willpush
a container with full nameFILE:
build-docker-container.yml
This is a manually triggered workflow that should be used where you want to manually re-build a specific container. It calls the reusable workflow with specified input arguments.
FILE:
upload-artifact.yml
I have modified this to consist of 2 jobs - the first is a modification of your original
archive-build-artifacts
workflow - the only additions here are that this job now has an output that is the release of FSDA that has just been build and uploaded, along with a conditional step that stopsupload-release-asset
running if./bin/FSDA.mltbx
does not exist. I believe that you build this MLTBX somewhere else with another CI system and for people who fork the repo it doesn't exist.I have then added a second job that runs after
archive-build-artifacts
(needs: archive-build-artifacts
achieves this) and again it triggers the reusable docker build workflow in the same way asbuild-docker-container.yml