Search code examples
pythonc++travis-ciread-the-docs

Optimizing build time for ReadTheDocs project


I am developing a reasonably-sized binary Python library, Parselmouth, which takes some time to build - mainly because I am wrapping an existing program with a large codebase. Consequently, now that I'm trying to set up API documentation, I am running into either the 15 minute time limit or 1 GB memory limit (when I multithread my build, I have some expensive template instantiations and the compiler process gets killed) when building on ReadTheDocs.

However, I have successfully set up Travis CI builds, using ccache to not recompile the large codebase, but only the changed parts of the wrapper code.

I have been thinking about installing from PyPI, but then the versioning gets complicated, and intermediate development builds do not get good API documentation.

So I was wondering: is there a known solution for this kind of case, maybe using the builds from Travis CI?


Solution

  • What I ended up doing to solve this problem was to use BinTray to upload my wheels built on Travis CI. After this built and upload have succeeded, I manually trigger the ReadTheDocs build, which will then install the project with the right Python wheel from BinTray.

    For more details, see this commit