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 }} \ | ||||
|             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 | ||||
|  | ||||
							
								
								
									
										39
									
								
								.github/workflows/macOS-amd64.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										39
									
								
								.github/workflows/macOS-amd64.yml
									
									
									
									
										vendored
									
									
								
							| @ -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 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user