mirror of
https://github.com/RocketChat/Rocket.Chat.git
synced 2025-12-27 22:40:49 +00:00
chore(ci): improve cache logic for multi arch builds (#37575)
This commit is contained in:
parent
1d80ce5741
commit
4102f12cc8
14
.github/actions/meteor-build/action.yml
vendored
14
.github/actions/meteor-build/action.yml
vendored
@ -34,7 +34,7 @@ runs:
|
||||
id: cache-build
|
||||
with:
|
||||
path: /tmp/Rocket.Chat.tar.gz
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-${{ inputs.type }}-rc-build-${{ inputs.source-hash }}
|
||||
key: ${{ runner.arch }}-${{ runner.os }}-${{ inputs.type }}-rc-build-${{ inputs.source-hash }}
|
||||
|
||||
- name: Set Swap Space
|
||||
uses: pierotofy/set-swap-space@master
|
||||
@ -73,27 +73,27 @@ runs:
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ./node_modules/.vite
|
||||
key: vite-local-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package.json') }}
|
||||
key: vite-local-cache-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('package.json') }}
|
||||
restore-keys: |
|
||||
vite-local-cache-${{ runner.os }}-${{ runner.arch }}-
|
||||
vite-local-cache-${{ runner.arch }}-${{ runner.os }}-
|
||||
|
||||
- name: Cache meteor local
|
||||
uses: actions/cache@v3
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ./apps/meteor/.meteor/local
|
||||
key: meteor-local-cache-${{ runner.os }}-${{ runner.arch }}-${{ inputs.type }}-${{ hashFiles('apps/meteor/.meteor/versions') }}
|
||||
key: meteor-local-cache-${{ runner.arch }}-${{ runner.os }}-${{ inputs.type }}-${{ hashFiles('apps/meteor/.meteor/versions') }}
|
||||
restore-keys: |
|
||||
meteor-local-cache-${{ runner.os }}-${{ runner.arch }}-${{ inputs.type }}-
|
||||
meteor-local-cache-${{ runner.arch }}-${{ runner.os }}-${{ inputs.type }}-
|
||||
|
||||
- name: Cache meteor
|
||||
uses: actions/cache@v3
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ~/.meteor
|
||||
key: meteor-cache-${{ runner.os }}-${{ runner.arch }}-${{ inputs.type }}-${{ hashFiles('apps/meteor/.meteor/release') }}
|
||||
key: meteor-cache-${{ runner.arch }}-${{ runner.os }}-${{ inputs.type }}-${{ hashFiles('apps/meteor/.meteor/release') }}
|
||||
restore-keys: |
|
||||
meteor-cache-${{ runner.os }}-${{ runner.arch }}-${{ inputs.type }}-
|
||||
meteor-cache-${{ runner.arch }}-${{ runner.os }}-${{ inputs.type }}-
|
||||
|
||||
- name: Install Meteor
|
||||
shell: bash
|
||||
|
||||
4
.github/actions/setup-node/action.yml
vendored
4
.github/actions/setup-node/action.yml
vendored
@ -51,8 +51,8 @@ runs:
|
||||
apps/meteor/ee/server/services/node_modules
|
||||
packages/apps-engine/node_modules
|
||||
packages/apps-engine/.deno-cache
|
||||
key: node-modules-${{ inputs.type }}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package.json') }}-${{ hashFiles('yarn.lock') }}-deno-v${{ inputs.deno-version }}-${{ hashFiles('packages/apps-engine/deno-runtime/deno.lock') }}-v3
|
||||
# key: node-modules-${{ inputs.type }}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package.json') }}-${{ hashFiles('yarn.lock') }}-deno-v${{ inputs.deno-version }}-${{ hashFiles('packages/apps-engine/deno-runtime/deno.lock') }}-v${{ github.run_id }}
|
||||
key: node-modules-${{ inputs.type }}-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('package.json') }}-${{ hashFiles('yarn.lock') }}-deno-v${{ inputs.deno-version }}-${{ hashFiles('packages/apps-engine/deno-runtime/deno.lock') }}-v3
|
||||
# key: node-modules-${{ inputs.type }}-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('package.json') }}-${{ hashFiles('yarn.lock') }}-deno-v${{ inputs.deno-version }}-${{ hashFiles('packages/apps-engine/deno-runtime/deno.lock') }}-v${{ github.run_id }}
|
||||
#
|
||||
# Could use this command to list all paths to save:
|
||||
# find . -name 'node_modules' -prune | grep -v "/\.meteor/" | grep -v "/meteor/packages/"
|
||||
|
||||
2
.github/actions/setup-playwright/action.yml
vendored
2
.github/actions/setup-playwright/action.yml
vendored
@ -11,7 +11,7 @@ runs:
|
||||
path: |
|
||||
~/.cache/ms-playwright
|
||||
# This is the version of Playwright that we are using, if you are willing to upgrade, you should update this.
|
||||
key: playwright-${{ runner.os }}-${{ runner.arch }}-1.52.0
|
||||
key: playwright-${{ runner.arch }}-${{ runner.os }}-1.52.0
|
||||
|
||||
- name: Install Playwright
|
||||
shell: bash
|
||||
|
||||
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -172,7 +172,7 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
/tmp/RocketChat-packages-build.tar.gz
|
||||
key: ${{ runner.OS }}-packages-build-${{ needs.release-versions.outputs.source-hash }}
|
||||
key: ${{ runner.arch }}-${{ runner.os }}-packages-build-${{ needs.release-versions.outputs.source-hash }}
|
||||
|
||||
- name: Debug cache-hit
|
||||
run: echo "cache-hit=${{ steps.packages-cache-build.outputs.cache-hit }}"
|
||||
@ -202,9 +202,9 @@ jobs:
|
||||
if: steps.packages-cache-build.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ./node_modules/.vite
|
||||
key: vite-local-cache-${{ runner.OS }}-${{ hashFiles('package.json') }}
|
||||
key: vite-local-cache-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('package.json') }}
|
||||
restore-keys: |
|
||||
vite-local-cache-${{ runner.os }}-
|
||||
vite-local-cache-${{ runner.arch }}-${{ runner.os }}-
|
||||
|
||||
- uses: rharkor/caching-for-turbo@v1.8
|
||||
if: steps.packages-cache-build.outputs.cache-hit != 'true'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user