diff --git a/.github/actions/node-build/action.yml b/.github/actions/node-build/action.yml index 3d95a58a..caa80362 100644 --- a/.github/actions/node-build/action.yml +++ b/.github/actions/node-build/action.yml @@ -39,7 +39,7 @@ runs: EXTRA_LIBS=${{ inputs.local_libs }} \ make -C native_client/javascript \ NODE_ABI_TARGET=--target=${node} \ - NODE_DEVDIR=--devdir=tmp/headers/nodejs/${node} \ + NODE_DEVDIR=--devdir=headers/nodejs \ clean node-wrapper done; shell: bash @@ -52,7 +52,7 @@ runs: NODE_ABI_TARGET=--target=${electron} \ NODE_DIST_URL=--disturl=https://electronjs.org/headers \ NODE_RUNTIME=--runtime=electron \ - NODE_DEVDIR=--devdir=tmp/headers/electronjs/${electron} \ + NODE_DEVDIR=--devdir=headers/electronjs \ clean node-wrapper done; shell: bash diff --git a/.github/workflows/macOS-amd64.yml b/.github/workflows/macOS-amd64.yml index f7ad40f9..56a88a4a 100644 --- a/.github/workflows/macOS-amd64.yml +++ b/.github/workflows/macOS-amd64.yml @@ -7,6 +7,7 @@ on: env: CI_TASK_DIR: ${{ github.workspace }} CI_ARTIFACTS_DIR: ${{ github.workspace }}/artifacts + CI_NODE_MODULES_NTH: 1 MACOSX_DEPLOYMENT_TARGET: "10.10" jobs: swig_macOS: @@ -334,6 +335,16 @@ jobs: - uses: actions/setup-node@v2 with: node-version: 12 + - uses: actions/cache@v2 + id: node-headers-cache + with: + path: native_client/javascript/headers/nodejs/ + key: node-headers-10.0.0_15.0.0 + - uses: actions/cache@v2 + id: electron-headers-cache + with: + path: native_client/javascript/headers/electronjs/ + key: electron-headers-5.0.13_12.0.0 - uses: ./.github/actions/node-build with: nodejs_versions: "10.0.0 11.0.0 12.7.0 13.0.0 14.0.0 15.0.0" @@ -498,9 +509,16 @@ jobs: - run: | ls -hal ${{ env.CI_TMP_DIR }}/ if: matrix.models == 'test' + - uses: actions/cache@v2 + id: node-modules-cache + with: + path: ~/.npm/ + key: node-modules-${{ matrix.build-flavor }}-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }} - run: | ls -hal ${{ env.CI_TMP_DIR }}/ - npm install ${{ env.CI_TMP_DIR }}/stt*.tgz + npm install --verbose ${{ env.CI_TMP_DIR }}/stt*.tgz + - run: | + ls -hal node_modules/deepspeech* node_modules/.bin/ - uses: ./.github/actions/run-tests with: runtime: "node" @@ -543,6 +561,11 @@ jobs: - run: | ls -hal ${{ env.CI_TMP_DIR }}/ if: matrix.models == 'test' + - uses: actions/cache@v2 + id: electron-modules-cache + with: + path: ~/.npm/ + key: electron-modules-${{ matrix.build-flavor }}-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }} - run: | ls -hal ${{ env.CI_TMP_DIR }}/ npm install ${{ env.CI_TMP_DIR }}/stt*.tgz @@ -592,9 +615,16 @@ jobs: - run: | ls -hal ${{ env.CI_TMP_DIR }}/ if: matrix.models == 'test' + - uses: actions/cache@v2 + id: node-modules-cache + with: + path: ~/.npm/ + key: node-modules-${{ matrix.build-flavor }}-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }} - run: | ls -hal ${{ env.CI_TMP_DIR }}/ - npm install ${{ env.CI_TMP_DIR }}/stt*.tgz + npm install --verbose ${{ env.CI_TMP_DIR }}/stt*.tgz + - run: | + ls -hal node_modules/deepspeech* node_modules/.bin/ - uses: ./.github/actions/run-tests with: runtime: "node" @@ -637,6 +667,11 @@ jobs: - run: | ls -hal ${{ env.CI_TMP_DIR }}/ if: matrix.models == 'test' + - uses: actions/cache@v2 + id: electron-modules-cache + with: + path: ~/.npm/ + key: electron-modules-${{ matrix.build-flavor }}-${{ runner.os }}-${{ env.CI_NODE_MODULES_NTH }} - run: | ls -hal ${{ env.CI_TMP_DIR }}/ npm install ${{ env.CI_TMP_DIR }}/stt*.tgz