diff --git a/.github/actions/checkout/action.yml b/.github/actions/checkout/action.yml index 8aaf937e61..af29c15eab 100644 --- a/.github/actions/checkout/action.yml +++ b/.github/actions/checkout/action.yml @@ -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 diff --git a/.github/workflows/pipeline-electron-docs-only.yml b/.github/workflows/pipeline-electron-docs-only.yml index 31d3392106..4c156d2548 100644 --- a/.github/workflows/pipeline-electron-docs-only.yml +++ b/.github/workflows/pipeline-electron-docs-only.yml @@ -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: | diff --git a/.github/workflows/pipeline-electron-lint.yml b/.github/workflows/pipeline-electron-lint.yml index 1a4e308ef2..b120bf74f3 100644 --- a/.github/workflows/pipeline-electron-lint.yml +++ b/.github/workflows/pipeline-electron-lint.yml @@ -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: | diff --git a/.github/workflows/pipeline-segment-electron-build.yml b/.github/workflows/pipeline-segment-electron-build.yml index 144e471b90..91fc246997 100644 --- a/.github/workflows/pipeline-segment-electron-build.yml +++ b/.github/workflows/pipeline-segment-electron-build.yml @@ -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 diff --git a/.github/workflows/pipeline-segment-electron-gn-check.yml b/.github/workflows/pipeline-segment-electron-gn-check.yml index f996798251..5ac0e8799d 100644 --- a/.github/workflows/pipeline-segment-electron-gn-check.yml +++ b/.github/workflows/pipeline-segment-electron-gn-check.yml @@ -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 diff --git a/.github/workflows/pipeline-segment-electron-test.yml b/.github/workflows/pipeline-segment-electron-test.yml index c594d9d302..278c22f6ae 100644 --- a/.github/workflows/pipeline-segment-electron-test.yml +++ b/.github/workflows/pipeline-segment-electron-test.yml @@ -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: | diff --git a/.github/workflows/pipeline-segment-node-nan-test.yml b/.github/workflows/pipeline-segment-node-nan-test.yml index 024ddd5b1c..bfbf4db86f 100644 --- a/.github/workflows/pipeline-segment-node-nan-test.yml +++ b/.github/workflows/pipeline-segment-node-nan-test.yml @@ -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: |