Merge pull request #40652 from akien-mga/ci-more-cache-key

CI: Fix cache key and include base branch
This commit is contained in:
Rémi Verschelde
2020-07-24 09:32:48 +02:00
committed by GitHub
5 changed files with 48 additions and 53 deletions

View File

@@ -3,13 +3,14 @@ on: [push, pull_request]
# Global Cache Settings # Global Cache Settings
env: env:
GODOT_BASE_BRANCH: master
SCONS_CACHE_LIMIT: 4096 SCONS_CACHE_LIMIT: 4096
jobs: jobs:
android-template: android-template:
runs-on: "ubuntu-20.04" runs-on: "ubuntu-20.04"
name: Android Template (target=release, tools=no) name: Template (target=release, tools=no)
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@@ -20,13 +21,13 @@ jobs:
sudo cp -f misc/ci/sources.list /etc/apt/sources.list sudo cp -f misc/ci/sources.list /etc/apt/sources.list
sudo apt-get update sudo apt-get update
# install all packages (except scons) # Install all packages (except scons)
- name: Configure dependencies - name: Configure dependencies
run: | run: |
sudo apt-get install openjdk-8-jdk sudo apt-get install openjdk-8-jdk
echo "::set-env name=JAVA_HOME::usr/lib/jvm/java-8-openjdk-amd64" echo "::set-env name=JAVA_HOME::usr/lib/jvm/java-8-openjdk-amd64"
- name: Install Android Sdk and Ndk - name: Install Android SDK and NDK
run: | run: |
echo "::set-env name=PATH::/usr/lib/jvm/java-8-openjdk-amd64/jre/bin:${PATH}" echo "::set-env name=PATH::/usr/lib/jvm/java-8-openjdk-amd64/jre/bin:${PATH}"
java -version java -version
@@ -36,18 +37,16 @@ jobs:
source ~/.bashrc source ~/.bashrc
# Upload cache on completion and check it out now # 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.
- name: Load .scons_cache directory - name: Load .scons_cache directory
id: android-template-cache id: android-template-cache
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: ${{github.workspace}}/.scons_cache/ path: ${{github.workspace}}/.scons_cache/
key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}} key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: | restore-keys: |
${{github.job}}-${GITHUB_REF##*/}-${{github.sha}} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${GITHUB_REF##*/} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
# Use python 3.x release (works cross platform) # Use python 3.x release (works cross platform)
- name: Set up Python 3.x - name: Set up Python 3.x
@@ -65,6 +64,7 @@ jobs:
python -m pip install scons python -m pip install scons
python --version python --version
scons --version scons --version
- name: Compilation - name: Compilation
env: env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/ SCONS_CACHE: ${{github.workspace}}/.scons_cache/

View File

@@ -3,6 +3,7 @@ on: [push, pull_request]
# Global Cache Settings # Global Cache Settings
env: env:
GODOT_BASE_BRANCH: master
SCONS_CACHE_LIMIT: 4096 SCONS_CACHE_LIMIT: 4096
EM_VERSION: latest EM_VERSION: latest
EM_CACHE_FOLDER: 'emsdk-cache' EM_CACHE_FOLDER: 'emsdk-cache'
@@ -22,18 +23,16 @@ jobs:
sudo apt-get update sudo apt-get update
# Upload cache on completion and check it out now # 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.
- name: Load .scons_cache directory - name: Load .scons_cache directory
id: javascript-template-cache id: javascript-template-cache
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: ${{github.workspace}}/.scons_cache/ path: ${{github.workspace}}/.scons_cache/
key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}} key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: | restore-keys: |
${{github.job}}-${GITHUB_REF##*/}-${{github.sha}} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${GITHUB_REF##*/} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
# Additional cache for Emscripten generated system libraries # Additional cache for Emscripten generated system libraries
- name: Load Emscripten cache - name: Load Emscripten cache

View File

@@ -3,6 +3,7 @@ on: [push, pull_request]
# Global Cache Settings # Global Cache Settings
env: env:
GODOT_BASE_BRANCH: master
SCONS_CACHE_LIMIT: 4096 SCONS_CACHE_LIMIT: 4096
jobs: jobs:
@@ -26,18 +27,16 @@ jobs:
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm
# Upload cache on completion and check it out now # 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.
- name: Load .scons_cache directory - name: Load .scons_cache directory
id: linux-editor-cache id: linux-editor-cache
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: ${{github.workspace}}/.scons_cache/ path: ${{github.workspace}}/.scons_cache/
key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}} key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: | restore-keys: |
${{github.job}}-${GITHUB_REF##*/}-${{github.sha}} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${GITHUB_REF##*/} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
# Use python 3.x release (works cross platform; best to keep self contained in it's own step) # Use python 3.x release (works cross platform; best to keep self contained in it's own step)
- name: Set up Python 3.x - name: Set up Python 3.x
@@ -83,18 +82,16 @@ jobs:
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm
# Upload cache on completion and check it out now # 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.
- name: Load .scons_cache directory - name: Load .scons_cache directory
id: linux-template-cache id: linux-template-cache
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: ${{github.workspace}}/.scons_cache/ path: ${{github.workspace}}/.scons_cache/
key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}} key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: | restore-keys: |
${{github.job}}-${GITHUB_REF##*/}-${{github.sha}} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${GITHUB_REF##*/} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
# Use python 3.x release (works cross platform) # Use python 3.x release (works cross platform)
- name: Set up Python 3.x - name: Set up Python 3.x
@@ -112,6 +109,7 @@ jobs:
python -m pip install scons python -m pip install scons
python --version python --version
scons --version scons --version
- name: Compilation - name: Compilation
env: env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/ SCONS_CACHE: ${{github.workspace}}/.scons_cache/

View File

@@ -3,6 +3,7 @@ on: [push, pull_request]
# Global Cache Settings # Global Cache Settings
env: env:
GODOT_BASE_BRANCH: master
SCONS_CACHE_LIMIT: 4096 SCONS_CACHE_LIMIT: 4096
jobs: jobs:
@@ -15,18 +16,16 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
# Upload cache on completion and check it out now # 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.
- name: Load .scons_cache directory - name: Load .scons_cache directory
id: macos-editor-cache id: macos-editor-cache
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: ${{github.workspace}}/.scons_cache/ path: ${{github.workspace}}/.scons_cache/
key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}} key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: | restore-keys: |
${{github.job}}-${GITHUB_REF##*/}-${{github.sha}} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${GITHUB_REF##*/} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
# Use python 3.x release (works cross platform; best to keep self contained in it's own step) # Use python 3.x release (works cross platform; best to keep self contained in it's own step)
- name: Set up Python 3.x - name: Set up Python 3.x
@@ -60,18 +59,16 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
# Upload cache on completion and check it out now # 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.
- name: Load .scons_cache directory - name: Load .scons_cache directory
id: macos-template-cache id: macos-template-cache
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: ${{github.workspace}}/.scons_cache/ path: ${{github.workspace}}/.scons_cache/
key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}} key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: | restore-keys: |
${{github.job}}-${GITHUB_REF##*/}-${{github.sha}} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${GITHUB_REF##*/} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
# Use python 3.x release (works cross platform) # Use python 3.x release (works cross platform)
- name: Set up Python 3.x - name: Set up Python 3.x
@@ -89,6 +86,7 @@ jobs:
python -m pip install scons python -m pip install scons
python --version python --version
scons --version scons --version
- name: Compilation - name: Compilation
env: env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/ SCONS_CACHE: ${{github.workspace}}/.scons_cache/

View File

@@ -4,6 +4,7 @@ on: [push, pull_request]
# Global Cache Settings # Global Cache Settings
# SCONS_CACHE for windows must be set in the build environment # SCONS_CACHE for windows must be set in the build environment
env: env:
GODOT_BASE_BRANCH: master
SCONS_CACHE_MSVC_CONFIG: true SCONS_CACHE_MSVC_CONFIG: true
SCONS_CACHE_LIMIT: 4096 SCONS_CACHE_LIMIT: 4096
@@ -19,18 +20,17 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
# Upload cache on completion and check it out now # 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. # Editing this is pretty dangerous for Windows since it can break and needs to be properly tested with a fresh cache.
# Linux with this will work reliably, so not as bad to edit for Linux.
- name: Load .scons_cache directory - name: Load .scons_cache directory
id: windows-editor-cache id: windows-editor-cache
uses: RevoluPowered/cache@v2.1 uses: RevoluPowered/cache@v2.1
with: with:
path: /.scons_cache/ path: /.scons_cache/
key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}} key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: | restore-keys: |
${{github.job}}-${GITHUB_REF##*/}-${{github.sha}} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${GITHUB_REF##*/} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
# Use python 3.x release (works cross platform; best to keep self contained in it's own step) # Use python 3.x release (works cross platform; best to keep self contained in it's own step)
- name: Set up Python 3.x - name: Set up Python 3.x
@@ -73,18 +73,17 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
# Upload cache on completion and check it out now # 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. # Editing this is pretty dangerous for Windows since it can break and needs to be properly tested with a fresh cache.
# Linux with this will work reliably, so not as bad to edit for Linux.
- name: Load .scons_cache directory - name: Load .scons_cache directory
id: windows-template-cache id: windows-template-cache
uses: RevoluPowered/cache@v2.1 uses: RevoluPowered/cache@v2.1
with: with:
path: /.scons_cache/ path: /.scons_cache/
key: ${{github.job}}-${GITHUB_REF##*/}-${{github.sha}} key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: | restore-keys: |
${{github.job}}-${GITHUB_REF##*/}-${{github.sha}} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${GITHUB_REF##*/} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}} ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
# Use python 3.x release (works cross platform) # Use python 3.x release (works cross platform)
- name: Set up Python 3.x - name: Set up Python 3.x
@@ -102,6 +101,7 @@ jobs:
python -m pip install scons pywin32 python -m pip install scons pywin32
python --version python --version
scons --version scons --version
- name: Compilation - name: Compilation
env: env:
SCONS_CACHE: /.scons_cache/ SCONS_CACHE: /.scons_cache/