This repository provides infrastructure for cloning and working on the various SkyLabs AI repositories (public of private), within a single workspace.
This section gives detailed instructions for setting up a local workspace. The
instructions assume that the workspace is cloned in a directory that will hold
potentially many copies of the workspace, some containing git work-trees.
First, you need to clone the workspace repository.
mkdir -p $HOME/dev && cd $HOME/dev # Pick a suitable directory.
git clone git@github.com:SkyLabsAI/workspace.git # Clone the workspace.
cd workspace # Move to the workspace.You can then optionally clone sub-repositories within it.
make clone -j # Cloning everything (including private repos).
make clone-public -j # Cloning only the publicly-accessible repos.
make clone-vendored -j # Cloning only the (public) vendored repositories.
make clone-fmdeps -j # Cloning (mostly public) repos of fmdeps/.
make clone-psi -j # Cloning (private) repos of psi/.
make clone-bluerock -j # Cloning (private) repos of bluerock/ (used in CI).make dev-check-ver # Check system deps.
make dev-setup # Setup the dev environment (opam switch, ...).
make update-opam-deps # Install necessary dependencies.Note that you might need to run either of the following commands to enable the correct development environment locally (opam switch, ...).
source dev/activate.sh # Enable the development environment.To start building, you can run the following.
make ide-prepare # Prepare for a minimal build.
make -j$(nproc) stage1 # Build ASTs of client projects.
dune build # Build for installation.The configuration for sub-repositories is found in dev/repos/config.mk. This
file controls what repos get clone in the workspace, and where. At the moment,
repositories are gatherd into the followig directories:
fmdeps/(all the core FM repositories),psi/(all other SkyLabs AI repositories),bluerock/(all the BlueRock repositories used by FM CI).
Custom Makefile targets are provided to run batch operations on repositories
of the workspace, either all of them, or a group of them (corresponding to the
directories listed above, and also to special groups like upstream, owned,
dowstream, public, or private). Here is a list of often useful targets:
make show-configshows the configuration for the sub-repositories.make cloneinitializes all the sub-repositories.make fetchrunsgit fetch --allin all the sub-repositories.make pullrunsgit pull --rebasein all the sub-repositories.make peekrunsgit statusin all the sub-repositories.make describeshows the commit hash of each sub-repositories.
There are more, but these can be dangerous:
make gitcleanrunsgit clean -xfdin all the sub-repositories.make checkout-mainresets all the repositories to our main branch.make nukedeletes all the sub-repositories.
Similar targets are available for groups of repos. For example:
make clone-fmdepsonly clones the sub-repos of thefmdeps/directory.make peek-psirunsgit statusin sub-repos of thepsi/directory.make nuke-bluerockdeletes all sub-repositories inbluerock/.make peek-publicrunsgit statusin all the public repos.
Targets are also provided per-repo. For example:
make clone-BRiCkonly clonesBRiCkinfmdeps/BRiCk.make nuke-bhvdeletes the sub-repo inbluerock/bhv.
See here for worktree support.