isographlabs / isograph

The UI framework for teams that move fast — without breaking things.
MIT License
202 stars 9 forks source link

Cache result of `pnpm -r compile` across build steps #20

Open rbalicki2 opened 4 months ago

rbalicki2 commented 4 months ago

Right now, we re-build the JavaScript code when building the JS packages and also when publishing to NPM. We should find a way to reuse the built output.

ismajl-ramadani commented 3 months ago

Would love to work on this, just one thing...

According to documentation "By default, GitHub Actions allows multiple jobs within the same workflow, ..., to run concurrently.". Considering this, there is an option to store the build as artifact as you mentioned it, or using caching. But in my opinion both approaches are not a great fit for this case, as build phase I believe should change frequently and there is no point on caching it, and also we don't need the build files after the workflow runs, so also this beats the purpose of using artifacts feature of GitHub actions.

I just wanted to ask, did you find any issue with the current implementation, like degraded performance of the run, or you just don't like it as it it because of its repetitiveness?

https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts#comparing-artifacts-and-dependency-caching