Hi all we are currently…

2 minute read

Hi all, we are currently using Github Actions for building our Nx Workspace. Due to a decreasing build performance, we would like to leverage Nx even more. Is there already some who has experience with that, especially Github Actions + Nx Incremental Builds. I tried to enable the local caching, but not sure how to save and restore that cache in the Github Action Runners. Would Nx Cloud work “out of the box” with Github Actions? How much does Nx Cloud help if we are not using libraries heavily at the moment? I’m looking forward to a chat with someone, who has successfully combined Github Actions with Nx Caching / Incremental Builds or Nx Cloud :slightly_smiling_face: Thank you!


It will work out of the box in github actions. Just add your nx cloud auth token to the environment and you are off to the races

Thank you Jay! As I understand Nx Cloud, it manages a shared cache that can be used by devs and CI servers, right? At the moment we are in the process of splitting one large Application into multiple libraries, but we are not far yet. The Incremental Builds rely on having buildable libraries, doesn’t it? If only 5% of our code is move into buildable libs, it would not have a large impact!?

I’m thinking: Nx Affected + Nx Computation Cache === Nx Incremental Build

I’ve been going through the same process over the past week or so. Currently all our libraries are publishable and this setup is far from finished - but we are now using the NX cache and GitHub actions so I thought I’d share in case it’s helpful to see a live example https://github.com/GetTerminus/terminus-oss

So far the move to NX has been a huge quality of life increase for us.

Depending on the complexity of your dep graph if you do not have your code split (at all or well) the cache might not work super well for you since one small change would affect a lot of stuff. but yes affected + cache = incredemtnal build thats how it works. if nx determines if doesn’t need to build (or test) something that has already been built it will use the cached artifacts

Hey Benjamin, super interesting! I can imagine that many teams are going through that process. We started with Angular 2 and our project has grown a lot as one big Application. Only since end of last year we are moving to Nx, but it is quite a long process because we have created a lot of components in the last years… And our teams are working on that all the time. So building features + improving the whole app structure + moving out things into libraries is a challenge!

We are going through the same thing right now as well