3434 - name : Checkout nodejs_api
3535 uses : actions/checkout@v4
3636 with :
37+ fetch-depth : 1
3738 path : tools/nodejs_api
39+ submodules : recursive
3840
3941 - name : Fetch ladybug source archive
4042 shell : bash
@@ -45,13 +47,16 @@ jobs:
4547 # it into the working directory, excluding tools/nodejs_api since we
4648 # already have it checked out there.
4749
48- - name : Fetch dataset archive
49- shell : bash
50- run : |
51- mkdir -p dataset
52- curl -fsSL https://github.com/ladybugdb/dataset/archive/refs/heads/main.tar.gz \
53- | tar -xz --strip-components=1 -C dataset
54- # Tests reference ../../dataset/ relative to tools/nodejs_api.
50+ - name : Setup ccache (non-Windows)
51+ if : ${{ matrix.platform != 'win32' }}
52+ uses : hendrikmuhs/ccache-action@v1.2
53+ with :
54+ key : nodejs-${{ runner.os }}-${{ runner.arch }}-${{ github.ref }}
55+ max-size : 2G
56+ create-symlink : true
57+ restore-keys : |
58+ nodejs-${{ runner.os }}-${{ runner.arch }}-refs/heads/main
59+ nodejs-${{ runner.os }}-${{ runner.arch }}-
5560
5661 - name : Install Node.js dependencies (non-Windows)
5762 if : ${{ matrix.platform != 'win32' }}
@@ -117,6 +122,8 @@ jobs:
117122 env :
118123 MACOSX_DEPLOYMENT_TARGET : ${{ matrix.mac_env && '13.3' || '' }}
119124 CMAKE_OSX_ARCHITECTURES : ${{ matrix.mac_env && matrix.arch || '' }}
125+ CMAKE_C_COMPILER_LAUNCHER : ccache
126+ CMAKE_CXX_COMPILER_LAUNCHER : ccache
120127
121128 - name : Run Node.js tests
122129 working-directory : tools/nodejs_api
0 commit comments