Skip to content

Commit

Permalink
Improve the cache keys to prevent clashes for the wrong type of build
Browse files Browse the repository at this point in the history
  • Loading branch information
RevoluPowered committed Jul 23, 2020
1 parent 3c07d0f commit afdce1e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 30 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/android_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ jobs:
uses: actions/cache@v2
with:
path: ${{github.workspace}}/.scons_cache/
key: ${{runner.os}}-template-${{github.sha}}
key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
restore-keys: |
${{runner.os}}-template-${{github.sha}}
${{runner.os}}-template
${{runner.os}}
${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
${{github.job}}-${GITHUB_REF##*/}
${{github.job}}
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/javascript_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ jobs:
uses: actions/cache@v2
with:
path: ${{github.workspace}}/.scons_cache/
key: ${{github.job}}-${{github.sha}}
key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
restore-keys: |
${{github.job}}-${{github.sha}}
${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
${{github.job}}-${GITHUB_REF##*/}
${{github.job}}
# Additional cache for Emscripten generated system libraries
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:
uses: actions/cache@v2
with:
path: ${{github.workspace}}/.scons_cache/
key: ${{runner.os}}-editor-${{github.sha}}
key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
restore-keys: |
${{runner.os}}-editor-${{github.sha}}
${{runner.os}}-editor
${{runner.os}}
${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
${{github.job}}-${GITHUB_REF##*/}
${{github.job}}
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
- name: Set up Python 3.x
Expand Down Expand Up @@ -90,11 +90,11 @@ jobs:
uses: actions/cache@v2
with:
path: ${{github.workspace}}/.scons_cache/
key: ${{runner.os}}-template-${{github.sha}}
key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
restore-keys: |
${{runner.os}}-template-${{github.sha}}
${{runner.os}}-template
${{runner.os}}
${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
${{github.job}}-${GITHUB_REF##*/}
${{github.job}}
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/macos_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
uses: actions/cache@v2
with:
path: ${{github.workspace}}/.scons_cache/
key: ${{runner.os}}-editor-${{github.sha}}
key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
restore-keys: |
${{runner.os}}-editor-${{github.sha}}
${{runner.os}}-editor
${{runner.os}}
${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
${{github.job}}-${GITHUB_REF##*/}
${{github.job}}
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
- name: Set up Python 3.x
Expand Down Expand Up @@ -67,11 +67,11 @@ jobs:
uses: actions/cache@v2
with:
path: ${{github.workspace}}/.scons_cache/
key: ${{runner.os}}-template-${{github.sha}}
key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
restore-keys: |
${{runner.os}}-template-${{github.sha}}
${{runner.os}}-template
${{runner.os}}
${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
${{github.job}}-${GITHUB_REF##*/}
${{github.job}}
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/windows_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
uses: RevoluPowered/[email protected]
with:
path: /.scons_cache/
key: ${{runner.os}}-editor-${{github.sha}}
key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
restore-keys: |
${{runner.os}}-editor-${{github.sha}}
${{runner.os}}-editor
${{runner.os}}
${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
${{github.job}}-${GITHUB_REF##*/}
${{github.job}}
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
- name: Set up Python 3.x
Expand Down Expand Up @@ -80,11 +80,11 @@ jobs:
uses: RevoluPowered/[email protected]
with:
path: /.scons_cache/
key: ${{runner.os}}-template-${{github.sha}}
key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
restore-keys: |
${{runner.os}}-template-${{github.sha}}
${{runner.os}}-template
${{runner.os}}
${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
${{github.job}}-${GITHUB_REF##*/}
${{github.job}}
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x
Expand Down

0 comments on commit afdce1e

Please sign in to comment.