-
Notifications
You must be signed in to change notification settings - Fork 6
Adds caching functionality #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start!
name: Verify files exist in cache | ||
command: | | ||
set -e | ||
matlab_binary="$HOME/matlab_ci/matlab_root" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like the matlab root not the binary?
RESOLVE_RELEASE_SH: <<include(scripts/resolve-release.sh)>> | ||
command: | | ||
eval "$RESOLVE_RELEASE_SH" | ||
echo "$mpmrelease" > install-metadata.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this writing install-metadata.txt into the user's working directory (where their source code is)? If so, we probably want to put it somewhere else. I think it would be pretty unexpected for the orb to drop files in your source root and more likely for the user to delete or mess with them.
mpmdir="$tmpdir/mpm" | ||
matlabcidir="$HOME/matlab_ci" | ||
mkdir -p "$matlabcidir" | ||
rootdir="$matlabcidir/matlab_root" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's technically possible for a user to use matlab/install
twice in their pipeline to install two different releases of MATLAB, so we probably need to consider getting the release name in this path. Any reason not to install to the standard /usr/local/MATLAB/<release>
location used by mpm?
${releasestatus} \ | ||
--products ${PARAM_PRODUCTS} MATLAB | ||
# Short-circuit if MATLAB & matlab-batch already exist and PARAM_CACHE is true | ||
if [[ "$PARAM_CACHE" == "1" && -x "$batchdir/matlab-batch$binext" && -x "$rootdir/bin/matlab" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't cache matlab-batch
because it is important that we always make sure we're using the latest version of it. It's a fairly small binary, so just downloading it every time isn't bad.
cache
parameter in install step, which cachesMATLAB
andmatlab-batch
in~/matlab-ci/matlab_root
and~/matlab_ci/matlab-batch
directories, respectively.false
.install-metadata.txt
file, which contains the parsed release information and a sorted list of user-specified products.Demo job runs - cache it with circleCI