Merge pull request #13300 from rraallvv/scons_cache_2.1

Enable SCons shared cache for AppVeyor CI (2.1)
This commit is contained in:
Rémi Verschelde 2017-11-26 15:09:10 +01:00 committed by GitHub
commit aad6ef9423
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -1,7 +1,9 @@
os: Visual Studio 2015 os: Visual Studio 2015
environment: environment:
HOME: "%HOMEDRIVE%%HOMEPATH%"
PYTHON: C:\Python27 PYTHON: C:\Python27
SCONS_CACHE: "%HOME%\\scons_cache"
matrix: matrix:
- VS: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat - VS: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
GD_PLATFORM: windows GD_PLATFORM: windows
@ -9,6 +11,9 @@ environment:
TARGET: release_debug TARGET: release_debug
ARCH: amd64 ARCH: amd64
cache:
- "%SCONS_CACHE%"
install: install:
- SET "PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" - SET "PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- pip install --egg scons # it will fail on AppVeyor without --egg flag - pip install --egg scons # it will fail on AppVeyor without --egg flag

View File

@ -394,6 +394,11 @@ if selected_platform in platform_list:
if (env['verbose'] == 'no'): if (env['verbose'] == 'no'):
methods.no_verbose(sys, env) methods.no_verbose(sys, env)
scons_cache_path = os.environ.get("SCONS_CACHE")
if scons_cache_path != None:
CacheDir(scons_cache_path)
print("Scons cache enabled... (path: '" + scons_cache_path + "')")
Export('env') Export('env')
# build subdirs, the build order is dependent on link order. # build subdirs, the build order is dependent on link order.