Skip to content

Compilation (Github Actions)

rkevin edited this page Feb 23, 2021 · 1 revision

Building using Github Actions

If you are putting your fork of ModShot on Github, you can ask Github to compile the code for you and avoid the need to setup Docker on your own computer.

When you first fork the repo, you will have to manually enable the action in the Actions tab on Github. You only need to do this once.

To compile the code, just push your changes to Github and Github will compile it for you. You can view the compilation process under the Actions tab. Once it is built, you can download the built Windows and Linux versions from there as well.

The relevant build workflow is under .github/workflows/build-baremetal.yaml. Feel free to modify it as you wish.

Build times

The workflow takes a significant amount of time to build, so keep this in mind. During your first build, the Windows build will take around 45 mins to complete, while the Linux one takes around 15 minutes.

The build dependencies should be automatically cached for you, so for future builds it should be much faster. The Windows build should take around 15 minutes with a cache, while the Linux one takes around 3 minutes with a cache. However, the cache will be deleted if you don't compile your code often (around 7 days).

For active development and testing on your own machine, building ModShot locally using Docker is much faster, letting you test your changes in under 30 seconds. For details on how to set that up, check the Docker compilation instructions.