chore: cache yarn dir

This commit is contained in:
John Kleinschmidt
2024-12-03 15:53:51 -05:00
parent eb7ba17eeb
commit 74c8aa8368
7 changed files with 96 additions and 8 deletions

View File

@@ -16,11 +16,22 @@ runs:
shell: bash
run: |
echo "GIT_CACHE_PATH=$(pwd)/git-cache" >> $GITHUB_ENV
- name: Get yarn cache directory path
shell: bash
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
shell: bash
run: |
cd src/electron
node script/yarn install --frozen-lockfile
node script/yarn install --frozen-lockfile --prefer-offline
- name: Install Build Tools
uses: ./src/electron/.github/actions/install-build-tools
- name: Get Depot Tools

View File

@@ -25,10 +25,21 @@ jobs:
path: src/electron
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Get yarn cache directory path
shell: bash
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: |
cd src/electron
node script/yarn install --frozen-lockfile
node script/yarn install --frozen-lockfile --prefer-offline
- name: Run TS/JS compile
shell: bash
run: |

View File

@@ -25,10 +25,21 @@ jobs:
path: src/electron
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Get yarn cache directory path
shell: bash
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: |
cd src/electron
node script/yarn install --frozen-lockfile
node script/yarn install --frozen-lockfile --prefer-offline
- name: Setup third_party Depot Tools
shell: bash
run: |

View File

@@ -105,10 +105,21 @@ jobs:
node-version: 20.11.x
cache: yarn
cache-dependency-path: src/electron/yarn.lock
- name: Get yarn cache directory path
shell: bash
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: |
cd src/electron
node script/yarn install --frozen-lockfile
node script/yarn install --frozen-lockfile --prefer-offline
- name: Install AZCopy
if: ${{ inputs.target-platform == 'macos' }}
run: brew install azcopy

View File

@@ -110,10 +110,21 @@ jobs:
path: src/electron
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Get yarn cache directory path
shell: bash
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: |
cd src/electron
node script/yarn install --frozen-lockfile
node script/yarn install --frozen-lockfile --prefer-offline
- name: Default GN gen
run: |
cd src/electron

View File

@@ -118,10 +118,21 @@ jobs:
path: src/electron
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Get yarn cache directory path
shell: bash
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: |
cd src/electron
node script/yarn install --frozen-lockfile
node script/yarn install --frozen-lockfile --prefer-offline
- name: Get Depot Tools
timeout-minutes: 5
run: |

View File

@@ -55,10 +55,21 @@ jobs:
- name: Init Build Tools
run: |
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }}
- name: Get yarn cache directory path
shell: bash
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: |
cd src/electron
node script/yarn install --frozen-lockfile
node script/yarn install --frozen-lockfile --prefer-offline
- name: Get Depot Tools
timeout-minutes: 5
run: |
@@ -118,10 +129,21 @@ jobs:
- name: Init Build Tools
run: |
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }}
- name: Get yarn cache directory path
shell: bash
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: |
cd src/electron
node script/yarn install --frozen-lockfile
node script/yarn install --frozen-lockfile --prefer-offline
- name: Get Depot Tools
timeout-minutes: 5
run: |