Repo Build FAQ and Tips#

There’s a ton going on in repo_build. The following is an unordered collection of tips and observations.

repo_build OOMs my machine/uses all my cores!#

By default repo_build will use all available cores. That could cause your host to run out of memory (OOM error) your host if you have less than 2GB of memory per thread and you build a sufficiently large project to cause all your cores to get used. You can override the number of compilation threads/jobs with the the following options in descending priority: --jobs argument, the OMNI_REPO_BUILD_JOBS environment variable, or the [repo_build.build.job_count] configuration file option. It is recommended to set a repo_man global config to lock your job_count if you routinely find yourself running out of memory building.

I don’t need premake!#

If you have a purely Python project, or a project that uses an external build tool that isn’t msbuild/make, you can disable the build stage by setting [repo_build.build.enabled] = false in your repo.toml. Additionally set [repo_build.premake.enabled] = false to skip trying to call premake.

You can optionally use a repo_build.fetch.after_pull_commands command to execute your build entrypoint after your dependencies have been fetched. repo_build.pre_build.commands is another option for executing arbitrary commands after dependency fetch.