summaryrefslogtreecommitdiffstats
path: root/.github/workflows/windows_builds.yml
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-07-24 08:20:42 +0200
committerRémi Verschelde <rverschelde@gmail.com>2020-07-24 08:28:43 +0200
commit2cf5ad9ea9b1c7edb77f5c3e42935d73d041f1f9 (patch)
treef6c812b11b82e74f0ed43cb7eacc28f91b3b73cd /.github/workflows/windows_builds.yml
parent422a2da8c7c2d973e391703ea0c0249b2c6fa4c5 (diff)
downloadredot-engine-2cf5ad9ea9b1c7edb77f5c3e42935d73d041f1f9.tar.gz
CI: Fix cache key and include base branch
The base branch is hardcoded as an env variable as I couldn't find a simple way to just get either `3.2` or `master`. But it's easy to change when we branch off from `master` to a new stable branch, which doesn't happen often. (There's `{{github.base_ref}}` but it's probably more verbose like `ref/heads/master`, and only valid for PRs.)
Diffstat (limited to '.github/workflows/windows_builds.yml')
-rw-r--r--.github/workflows/windows_builds.yml26
1 files changed, 13 insertions, 13 deletions
diff --git a/.github/workflows/windows_builds.yml b/.github/workflows/windows_builds.yml
index 611684debb..0c7f23036e 100644
--- a/.github/workflows/windows_builds.yml
+++ b/.github/workflows/windows_builds.yml
@@ -4,6 +4,7 @@ on: [push, pull_request]
# Global Cache Settings
# SCONS_CACHE for windows must be set in the build environment
env:
+ GODOT_BASE_BRANCH: master
SCONS_CACHE_MSVC_CONFIG: true
SCONS_CACHE_LIMIT: 4096
@@ -18,19 +19,18 @@ jobs:
steps:
- uses: actions/checkout@v2
- # Upload cache on completion and check it out now
- # Editing this is pretty dangerous for windows since it can break and needs properly tested with a fresh cache.
- # Linux with this will work reliably, so not as bad to edit for Linux.
+ # Upload cache on completion and check it out now
+ # Editing this is pretty dangerous for Windows since it can break and needs to be properly tested with a fresh cache.
- name: Load .scons_cache directory
id: windows-editor-cache
uses: RevoluPowered/cache@v2.1
with:
path: /.scons_cache/
- key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
+ key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: |
- ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
- ${{github.job}}-${GITHUB_REF##*/}
- ${{github.job}}
+ ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
+ ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
+ ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
- name: Set up Python 3.x
@@ -73,18 +73,17 @@ jobs:
- uses: actions/checkout@v2
# Upload cache on completion and check it out now
- # Editing this is pretty dangerous for windows since it can break and needs properly tested with a fresh cache.
- # Linux with this will work reliably, so not as bad to edit for Linux.
+ # Editing this is pretty dangerous for Windows since it can break and needs to be properly tested with a fresh cache.
- name: Load .scons_cache directory
id: windows-template-cache
uses: RevoluPowered/cache@v2.1
with:
path: /.scons_cache/
- key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
+ key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: |
- ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}}
- ${{github.job}}-${GITHUB_REF##*/}
- ${{github.job}}
+ ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
+ ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
+ ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x
@@ -102,6 +101,7 @@ jobs:
python -m pip install scons pywin32
python --version
scons --version
+
- name: Compilation
env:
SCONS_CACHE: /.scons_cache/