ci: skip npm caching for cross builds, cache key
the cross builders might end up otherwise poisoning the cache with an
empty npm. this may have already happened and explains why it didn't
work for mac and linux.
also include the patches again in the cache key.
@@ -72,14 +72,16 @@ jobs:
- name: Get npm cache directory
id: npm-cache
+ if: matrix.platform.cross == false
run: |
echo "::set-output name=dir::$(npm config get cache)"
- - name: Cache npm
+ - name: Cache npm (non-cross targets)
uses: actions/cache@v2
+ if: matrix.platform.cross == false
with:
path: ${{ steps.npm-cache.outputs.dir }}
- key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json', '**/setup.sh') }}
+ key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json', '**/setup.sh', '**/*.patch') }}
restore-keys: |
${{ runner.os }}-node-
