first try cache rust + npm
@@ -23,6 +23,30 @@ jobs:
with:
node-version: 12.x
+ - name: Cache Cargo Registry
+ uses: actions/cache@v1
+ with:
+ path: ~/.cargo/registry
+ key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
+
+ - name: Cache Cargo Build Target
+ uses: actions/cache@v1
+ with:
+ path: bindings/node/native/target
+ key: ${{ runner.os }}-cargo-node-build-${{ hashFiles('**/Cargo.toml') }}
+
+ - name: Get NPM cache directory
+ id: npm-cache
+ run: |
+ echo "::set-output name=dir::$(npm config get cache)"
+ - name: Cache NPM cache
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.npm-cache.outputs.dir }}
+ key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.os }}-node-
+
- name: Install npm dependencies
working-directory: ./bindings/node
run: npm ci --ignore-scripts
