versotile-org / verso

A web browser that plays old world blues to build new world hope
Apache License 2.0
4.68k stars 156 forks source link

Speed up CI builds #60

Open Mikopet opened 4 months ago

Mikopet commented 4 months ago

I noticed that the builds are generally slow. It could be speed up with some caching and better flow.

Example in the doc CI workflow

wusyong commented 4 months ago

Doc CI workflow is also in separate pipeline which will have to build all over again apart from build.yml. It would be great if it can build the doc in build.yml when it's pushed to main branch.

Mikopet commented 4 months ago

I was thinking I'm putting the whole doc generation in the doc repo, and detach it from the verso pushes.

There are multiple reasons to do it, one, is that stable rustdoc cannot make index page, that's an unstable nightly feature for some reason.

Perhaps it could generate new docs on a daily basis.

having separate work flow here is not really a problem, as it cached and kinda fast.

True, we could think about saving some build artifacts regarding cargo builds. Also perhaps own dockerfile to build verso (could make more sense than cache apt)

But also we want build matrix in the future, so that's perhaps not the best approach.

I will think about it later this week.

wusyong commented 3 months ago

Maybe we can use rust cache as doc.yml does: https://github.com/versotile-org/verso/blob/main/.github/workflows/doc.yml#L25