Use caching for node_modules and headers
This commit is contained in:
parent
b0c38d5aa9
commit
5558f55701
4
.github/actions/node-build/action.yml
vendored
4
.github/actions/node-build/action.yml
vendored
@ -39,7 +39,7 @@ runs:
|
|||||||
EXTRA_LIBS=${{ inputs.local_libs }} \
|
EXTRA_LIBS=${{ inputs.local_libs }} \
|
||||||
make -C native_client/javascript \
|
make -C native_client/javascript \
|
||||||
NODE_ABI_TARGET=--target=${node} \
|
NODE_ABI_TARGET=--target=${node} \
|
||||||
NODE_DEVDIR=--devdir=tmp/headers/nodejs/${node} \
|
NODE_DEVDIR=--devdir=headers/nodejs \
|
||||||
clean node-wrapper
|
clean node-wrapper
|
||||||
done;
|
done;
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -52,7 +52,7 @@ runs:
|
|||||||
NODE_ABI_TARGET=--target=${electron} \
|
NODE_ABI_TARGET=--target=${electron} \
|
||||||
NODE_DIST_URL=--disturl=https://electronjs.org/headers \
|
NODE_DIST_URL=--disturl=https://electronjs.org/headers \
|
||||||
NODE_RUNTIME=--runtime=electron \
|
NODE_RUNTIME=--runtime=electron \
|
||||||
NODE_DEVDIR=--devdir=tmp/headers/electronjs/${electron} \
|
NODE_DEVDIR=--devdir=headers/electronjs \
|
||||||
clean node-wrapper
|
clean node-wrapper
|
||||||
done;
|
done;
|
||||||
shell: bash
|
shell: bash
|
||||||
|
39
.github/workflows/macOS-amd64.yml
vendored
39
.github/workflows/macOS-amd64.yml
vendored
@ -7,6 +7,7 @@ on:
|
|||||||
env:
|
env:
|
||||||
CI_TASK_DIR: ${{ github.workspace }}
|
CI_TASK_DIR: ${{ github.workspace }}
|
||||||
CI_ARTIFACTS_DIR: ${{ github.workspace }}/artifacts
|
CI_ARTIFACTS_DIR: ${{ github.workspace }}/artifacts
|
||||||
|
CI_NODE_MODULES_NTH: 1
|
||||||
MACOSX_DEPLOYMENT_TARGET: "10.10"
|
MACOSX_DEPLOYMENT_TARGET: "10.10"
|
||||||
jobs:
|
jobs:
|
||||||
swig_macOS:
|
swig_macOS:
|
||||||
@ -334,6 +335,16 @@ jobs:
|
|||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
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
|
- uses: ./.github/actions/node-build
|
||||||
with:
|
with:
|
||||||
nodejs_versions: "10.0.0 11.0.0 12.7.0 13.0.0 14.0.0 15.0.0"
|
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: |
|
- run: |
|
||||||
ls -hal ${{ env.CI_TMP_DIR }}/
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
||||||
if: matrix.models == 'test'
|
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: |
|
- run: |
|
||||||
ls -hal ${{ env.CI_TMP_DIR }}/
|
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
|
- uses: ./.github/actions/run-tests
|
||||||
with:
|
with:
|
||||||
runtime: "node"
|
runtime: "node"
|
||||||
@ -543,6 +561,11 @@ jobs:
|
|||||||
- run: |
|
- run: |
|
||||||
ls -hal ${{ env.CI_TMP_DIR }}/
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
||||||
if: matrix.models == 'test'
|
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: |
|
- run: |
|
||||||
ls -hal ${{ env.CI_TMP_DIR }}/
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
||||||
npm install ${{ env.CI_TMP_DIR }}/stt*.tgz
|
npm install ${{ env.CI_TMP_DIR }}/stt*.tgz
|
||||||
@ -592,9 +615,16 @@ jobs:
|
|||||||
- run: |
|
- run: |
|
||||||
ls -hal ${{ env.CI_TMP_DIR }}/
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
||||||
if: matrix.models == 'test'
|
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: |
|
- run: |
|
||||||
ls -hal ${{ env.CI_TMP_DIR }}/
|
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
|
- uses: ./.github/actions/run-tests
|
||||||
with:
|
with:
|
||||||
runtime: "node"
|
runtime: "node"
|
||||||
@ -637,6 +667,11 @@ jobs:
|
|||||||
- run: |
|
- run: |
|
||||||
ls -hal ${{ env.CI_TMP_DIR }}/
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
||||||
if: matrix.models == 'test'
|
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: |
|
- run: |
|
||||||
ls -hal ${{ env.CI_TMP_DIR }}/
|
ls -hal ${{ env.CI_TMP_DIR }}/
|
||||||
npm install ${{ env.CI_TMP_DIR }}/stt*.tgz
|
npm install ${{ env.CI_TMP_DIR }}/stt*.tgz
|
||||||
|
Loading…
Reference in New Issue
Block a user