From c8cac93b6723c5ebc46eafdb5dd1fb601b091f0b Mon Sep 17 00:00:00 2001 From: Akash Satheesan Date: Tue, 1 Jun 2021 22:46:33 +0530 Subject: [PATCH 1/2] feat(ci): add restore-keys for ci speedup --- .github/workflows/ci.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2229df086084..8fcda93a485b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,6 +38,8 @@ jobs: with: path: "**/node_modules" key: yarn-build-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + yarn-build- - name: Install dependencies if: steps.cache-yarn.outputs.cache-hit != 'true' @@ -78,6 +80,8 @@ jobs: with: path: "**/node_modules" key: yarn-build-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + yarn-build- - name: Install dependencies if: steps.cache-yarn.outputs.cache-hit != 'true' @@ -107,6 +111,8 @@ jobs: with: path: "**/node_modules" key: yarn-build-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + yarn-build- - name: Install dependencies if: steps.cache-yarn.outputs.cache-hit != 'true' @@ -347,6 +353,8 @@ jobs: with: path: "**/node_modules" key: yarn-build-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + yarn-build- - name: Download release packages uses: actions/download-artifact@v2 From 1d3a521be672d4fd41aa8bff1d62872e6960c78d Mon Sep 17 00:00:00 2001 From: Akash Satheesan Date: Wed, 2 Jun 2021 21:04:29 +0530 Subject: [PATCH 2/2] fix: use rm -rf for node_modules.asar --- ci/build/npm-postinstall.sh | 2 +- ci/lib.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/build/npm-postinstall.sh b/ci/build/npm-postinstall.sh index 761e46c127d4..05c936815751 100755 --- a/ci/build/npm-postinstall.sh +++ b/ci/build/npm-postinstall.sh @@ -75,7 +75,7 @@ main() { # This is a copy of symlink_asar in ../lib.sh. Look there for details. symlink_asar() { - rm -f node_modules.asar + rm -rf node_modules.asar if [ "${WINDIR-}" ]; then mklink /J node_modules.asar node_modules else diff --git a/ci/lib.sh b/ci/lib.sh index 3b78cb6e0183..7417a48485cc 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -113,7 +113,7 @@ RELEASE_PATH="${RELEASE_PATH-release}" # Code itself but also extensions will look specifically in this directory for # files (like the ripgrep binary or the oniguruma wasm). symlink_asar() { - rm -f node_modules.asar + rm -rf node_modules.asar if [ "${WINDIR-}" ]; then # mklink takes the link name first. mklink /J node_modules.asar node_modules