Automating deployment of extensions

I am trying to automate the deployment (building and packaging) of a Slicer extension (including a C++ and Python module). From what I understand I need a working slicer build (from source) in order to build and package the extension correctly? The slicer build is quite big (couple of GB) and therefore hard to put into a Docker container or into a CI system (e.g. GitHub Actions). So my questions are:

  1. Is there any possibility to make the Slicer build more lightweight, i.e., reduce it in size?
  2. Also, is there maybe a work around for extensions which only include a Python module or do we absolutely need a slicer build here, too?

Turning off SimpleITK and Testing will save a lot. Also QWebEngine is big. Also CLIs can be big. It depends on what you need for your extension.

If your extension includes any C++ then you need to have the locally compiled version of the libs to compile against.

From a CI/container perspective it would be great if we had could create build environments all the Slicer superbuild projects (VTK, ITK, CTK, etc) since they don’t change very often. But so far I don’t think anyone has found time to work on that.