Chapter 1: The Clone Wars (or - how the fork do I start?)
First, ya gotta get the code. Note this is something that any new developer to the project will need to do. The fact that you don't yet know what this project does is half the point. Lucky for you, this project uses the tools we have made available for efficient development.
Did you do the homework? If not then you don't get to eat dessert tonight, but we will still try to make it meaningful. The homework involved concrete steps for your preparation, as a reminder this includes:
- Installing the R2024a prerelease on your laptop. Note we are not using the -webui option or JSD to start MATLAB. This workshop assumes standard prerelease fucntionality and interfaces.
- Creating a GitHub account (see guidelines here)
- Setting up git such that you ca easily commit and push to GitHub. On Windows, this likely involves leveraging the git credential manager to login to GitHub and access the repo over http. On Linux or MAc this may mean setting up SSH keys for communicating to GitHub. Please address this before the workshop. You should be able to easily authenticate and push to your GitHub repo easily from MATLAB.
- Ensure you can build C++ mex files. If you have WIndows and do not have a compiler installed, this project installs MinGW for you. Please confirm.
Fork it by clicking the Fork button
You will need to choose your account and click the button. Super easy.
Now you own a repo on your personal org. Congrats! Your mother is very proud.
Before we get into MATLAB, navigate to the Actions tab of your new repository and enable actions.
Now click the MATLAB Build job on the left, navigate through the Run workflow dropdown, and click the green Run workflow button. This will kick off a multi-platform CI build of this repository. It is good to kick it off now so that it can cache our MATLAB installations on the hosted runners and increase performance later on in the workshop.
Bring it to MATLAB
Open up MATLAB on your machine. It needs to be the R2024a Prerelease with MATLAB, MATLAB Test, MATLAB Compiler, and MATLAB Compiler SDK installed.
Navigate to an empty working folder and clone the code to this folder by naviating to New ---> Project ---> From Git
Navigate to your GitHub repo in the browser and copy the location of your repo for cloning. If you are using Windows and already have signed into GitHub on your Windows machine via git credential manager (this was homework) you can just use the HTTPS location of the Git repo. If you are connected to GitHub via ssh keys then copy the SSH location.
Go back to MATLAB and paste in the location of your repo, navigate to your working folder, and click Retrieve
This will create and open the project in the folder you specified. You now have a fresh clone.