diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 106064ab1fb..6f7c8f1f205 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,13 +32,15 @@ jobs: - name: Compute node modules cache key id: nodeModulesCacheKey run: echo "::set-output name=value::$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)" - - name: Cache node modules + - name: Cache node_modules archive id: cacheNodeModules uses: actions/cache@v2 with: - path: "**/node_modules" - key: ${{ runner.os }}-cacheNodeModules11-${{ steps.nodeModulesCacheKey.outputs.value }} - restore-keys: ${{ runner.os }}-cacheNodeModules11- + path: ".build/node_modules_cache" + key: "${{ runner.os }}-cacheNodeModulesArchive-${{ steps.nodeModulesCacheKey.outputs.value }}" + - name: Extract node_modules archive + if: ${{ steps.cacheNodeModules.outputs.cache-hit == 'true' }} + run: 7z.exe x .build/node_modules_cache/cache.7z -aos - name: Get yarn cache directory path id: yarnCacheDirPath if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} @@ -56,6 +58,12 @@ jobs: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 ELECTRON_SKIP_BINARY_DOWNLOAD: 1 run: yarn --frozen-lockfile --network-timeout 180000 + - name: Create node_modules archive + if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} + run: | + node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt + mkdir -Force .build/node_modules_cache + 7z.exe a .build/node_modules_cache/cache.7z -mx3 `@.build/node_modules_list.txt - name: Compile and Download run: yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64" playwright-install download-builtin-extensions