diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2022-04-30 21:19:42 -0500 |
---|---|---|
committer | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2022-04-30 22:09:51 -0500 |
commit | ad940fbef537ba294aa2650367f8abbdbd93b3af (patch) | |
tree | 8cb3e36b0955c7e1452b06066a609b72e9291fb7 /.github | |
parent | Install the required version of 'python' in CI builds (diff) | |
download | ferdium-app-ad940fbef537ba294aa2650367f8abbdbd93b3af.tar.gz ferdium-app-ad940fbef537ba294aa2650367f8abbdbd93b3af.tar.zst ferdium-app-ad940fbef537ba294aa2650367f8abbdbd93b3af.zip |
Turn on caching for windows
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/builds.yml | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index acd92eb48..8bde362a8 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml | |||
@@ -139,14 +139,14 @@ jobs: | |||
139 | env: | 139 | env: |
140 | cache-name: cache-electron-modules | 140 | cache-name: cache-electron-modules |
141 | with: | 141 | with: |
142 | key: ${{ runner.os }}-${{ env.cache-name }} | 142 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ secrets.CACHE_VERSION }}-${{ hashFiles('./package-lock.json') }} |
143 | path: ${{ env.ELECTRON_CACHE }} | 143 | path: ${{ env.ELECTRON_CACHE }} |
144 | - name: Cache electron-builder modules | 144 | - name: Cache electron-builder modules |
145 | uses: actions/cache@v3 | 145 | uses: actions/cache@v3 |
146 | env: | 146 | env: |
147 | cache-name: cache-electron-builder-modules | 147 | cache-name: cache-electron-builder-modules |
148 | with: | 148 | with: |
149 | key: ${{ runner.os }}-${{ env.cache-name }} | 149 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ secrets.CACHE_VERSION }}-${{ hashFiles('./package-lock.json') }} |
150 | path: ${{ env.ELECTRON_BUILDER_CACHE }} | 150 | path: ${{ env.ELECTRON_BUILDER_CACHE }} |
151 | - name: Use Node.js specified in the '.nvmrc' file | 151 | - name: Use Node.js specified in the '.nvmrc' file |
152 | uses: actions/setup-node@v3 | 152 | uses: actions/setup-node@v3 |
@@ -230,14 +230,14 @@ jobs: | |||
230 | env: | 230 | env: |
231 | cache-name: cache-electron-modules | 231 | cache-name: cache-electron-modules |
232 | with: | 232 | with: |
233 | key: ${{ runner.os }}-${{ env.cache-name }} | 233 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ secrets.CACHE_VERSION }}-${{ hashFiles('./package-lock.json') }} |
234 | path: ${{ env.ELECTRON_CACHE }} | 234 | path: ${{ env.ELECTRON_CACHE }} |
235 | - name: Cache electron-builder modules | 235 | - name: Cache electron-builder modules |
236 | uses: actions/cache@v3 | 236 | uses: actions/cache@v3 |
237 | env: | 237 | env: |
238 | cache-name: cache-electron-builder-modules | 238 | cache-name: cache-electron-builder-modules |
239 | with: | 239 | with: |
240 | key: ${{ runner.os }}-${{ env.cache-name }} | 240 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ secrets.CACHE_VERSION }}-${{ hashFiles('./package-lock.json') }} |
241 | path: ${{ env.ELECTRON_BUILDER_CACHE }} | 241 | path: ${{ env.ELECTRON_BUILDER_CACHE }} |
242 | - name: Use Node.js specified in the '.nvmrc' file | 242 | - name: Use Node.js specified in the '.nvmrc' file |
243 | uses: actions/setup-node@v3 | 243 | uses: actions/setup-node@v3 |
@@ -317,6 +317,10 @@ jobs: | |||
317 | - name: Set env vars | 317 | - name: Set env vars |
318 | run: | | 318 | run: | |
319 | echo "HOME=$USERPROFILE" >> $GITHUB_ENV | 319 | echo "HOME=$USERPROFILE" >> $GITHUB_ENV |
320 | echo "NPM_CACHE=$USERPROFILE/.npm" >> $GITHUB_ENV | ||
321 | echo "PNPM_CACHE=$USERPROFILE/.pnpm-store" >> $GITHUB_ENV | ||
322 | echo "ELECTRON_CACHE=$USERPROFILE/.cache/electron" >> $GITHUB_ENV | ||
323 | echo "ELECTRON_BUILDER_CACHE=$USERPROFILE/.cache/electron-builder" >> $GITHUB_ENV | ||
320 | echo "MANUAL_REBUILD_ON_NIGHTLY=${{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]') }}" >> $GITHUB_ENV | 324 | echo "MANUAL_REBUILD_ON_NIGHTLY=${{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]') }}" >> $GITHUB_ENV |
321 | shell: bash | 325 | shell: bash |
322 | - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' or this is a forced rebuild on the nightly branch | 326 | - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' or this is a forced rebuild on the nightly branch |
@@ -335,6 +339,20 @@ jobs: | |||
335 | - name: Extract Git branch name from the currently checked out branch (not from the branch where this run was kicked off) | 339 | - name: Extract Git branch name from the currently checked out branch (not from the branch where this run was kicked off) |
336 | run: echo "GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV | 340 | run: echo "GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV |
337 | shell: bash | 341 | shell: bash |
342 | - name: Cache electron modules | ||
343 | uses: actions/cache@v3 | ||
344 | env: | ||
345 | cache-name: cache-electron-modules | ||
346 | with: | ||
347 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ secrets.CACHE_VERSION }}-${{ hashFiles('./package-lock.json') }} | ||
348 | path: ${{ env.ELECTRON_CACHE }} | ||
349 | - name: Cache electron-builder modules | ||
350 | uses: actions/cache@v3 | ||
351 | env: | ||
352 | cache-name: cache-electron-builder-modules | ||
353 | with: | ||
354 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ secrets.CACHE_VERSION }}-${{ hashFiles('./package-lock.json') }} | ||
355 | path: ${{ env.ELECTRON_BUILDER_CACHE }} | ||
338 | - name: Use Node.js specified in the '.nvmrc' file | 356 | - name: Use Node.js specified in the '.nvmrc' file |
339 | uses: actions/setup-node@v3 | 357 | uses: actions/setup-node@v3 |
340 | with: | 358 | with: |