Skip to content

Commit

Permalink
Fix up caches
Browse files Browse the repository at this point in the history
  • Loading branch information
eatonphil committed Jul 19, 2023
1 parent 4bda79e commit 36fa379
Showing 1 changed file with 133 additions and 39 deletions.
172 changes: 133 additions & 39 deletions .github/workflows/pull_requests.yml
Expand Up @@ -14,7 +14,18 @@ jobs:
with:
ref: ${{ github.ref }}

- uses: c-hive/gha-yarn-cache@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Setup Golang caches
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -47,7 +58,18 @@ jobs:
with:
ref: ${{ github.ref }}

- uses: c-hive/gha-yarn-cache@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Setup Golang caches
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -78,7 +100,18 @@ jobs:
with:
ref: ${{ github.ref }}

- uses: c-hive/gha-yarn-cache@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Setup Golang caches
uses: actions/cache@v3
with:
Expand All @@ -103,16 +136,26 @@ jobs:
with:
ref: ${{ github.ref }}

- uses: c-hive/gha-yarn-cache@v2
- name: Setup Golang caches
uses: actions/cache@v3
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
~\AppData\Local\go-build
~\go\pkg\mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-
${{ runner.os }}-go-
- run: ./scripts/ci/prepare_windows.ps1
shell: pwsh
Expand All @@ -130,7 +173,18 @@ jobs:
with:
ref: ${{ github.ref }}

- uses: c-hive/gha-yarn-cache@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Setup Golang caches
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -218,18 +272,17 @@ jobs:
with:
ref: ${{ github.ref }}

- name: Setup Golang caches
uses: actions/cache@v3
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/Library/Caches/go-build
~/go/pkg/mod
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-
${{ runner.os }}-go-
- run: ./scripts/ci/prepare_macos.sh

- run: cd runner && go test

windows_go_tests:
Expand All @@ -241,15 +294,14 @@ jobs:
with:
ref: ${{ github.ref }}

- name: Setup Golang caches
uses: actions/cache@v3
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
~\AppData\Local\go-build
~\go\pkg\mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-
${{ runner.os }}-go-
- run: ./scripts/ci/prepare_windows.ps1
shell: pwsh
Expand All @@ -265,7 +317,18 @@ jobs:
with:
ref: ${{ github.ref }}

- uses: c-hive/gha-yarn-cache@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Setup Golang caches
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -293,16 +356,26 @@ jobs:
with:
ref: ${{ github.ref }}

- uses: c-hive/gha-yarn-cache@v2
- name: Setup Golang caches
uses: actions/cache@v3
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/Library/Caches/go-build
~/go/pkg/mod
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-
${{ runner.os }}-go-
- run: ./scripts/ci/prepare_macos.sh
# Needed so we can have ./build/desktop_runner.js ready for tests
Expand All @@ -323,16 +396,26 @@ jobs:
with:
ref: ${{ github.ref }}

- uses: c-hive/gha-yarn-cache@v2
- name: Setup Golang caches
uses: actions/cache@v3
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
~\AppData\Local\go-build
~\go\pkg\mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-
${{ runner.os }}-go-
- run: ./scripts/ci/prepare_windows.ps1
shell: pwsh
Expand All @@ -353,7 +436,18 @@ jobs:
with:
ref: ${{ github.ref }}

- uses: c-hive/gha-yarn-cache@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Setup Golang caches
uses: actions/cache@v3
with:
Expand Down

0 comments on commit 36fa379

Please sign in to comment.