Commit 16a44b03 authored by Jason Madden's avatar Jason Madden

Take a whack at using ccache to speed up builds on CI.

parent dac5fe4c
...@@ -8,6 +8,11 @@ python: ...@@ -8,6 +8,11 @@ python:
env: env:
global: global:
- BUILD_RUNTIMES=$HOME/.runtimes - BUILD_RUNTIMES=$HOME/.runtimes
- CC="ccache gcc"
- CCACHE_NOCPP2=true
- CCACHE_SLOPPINESS=file_macro,time_macros,include_file_ctime,include_file_mtime
- CCACHE_NOHASHDIR=true
- CFLAGS="-Ofast -pipe -fomit-frame-pointer -march=native -flto"
matrix: matrix:
# These are ordered to get as much diversity in the # These are ordered to get as much diversity in the
...@@ -37,6 +42,7 @@ cache: ...@@ -37,6 +42,7 @@ cache:
- $HOME/.venv - $HOME/.venv
- $HOME/.runtimes - $HOME/.runtimes
- $HOME/.wheelhouse - $HOME/.wheelhouse
- $HOME/.ccache
before_cache: before_cache:
- rm -f $HOME/.cache/pip/log/debug.log - rm -f $HOME/.cache/pip/log/debug.log
...@@ -168,11 +168,13 @@ develop: ...@@ -168,11 +168,13 @@ develop:
# First install a newer pip so that it can use the wheel cache # First install a newer pip so that it can use the wheel cache
# (only needed until travis upgrades pip to 7.x; note that the 3.5 # (only needed until travis upgrades pip to 7.x; note that the 3.5
# environment uses pip 7.1 by default) # environment uses pip 7.1 by default)
python -m pip install -U pip setuptools ${PYTHON} -m pip install -U pip setuptools
# Then start installing our deps so they can be cached. Note that use of --build-options / --global-options / --install-options # Then start installing our deps so they can be cached. Note that use of --build-options / --global-options / --install-options
# disables the cache. # disables the cache.
# We need wheel>=0.26 on Python 3.5. See previous revisions. # We need wheel>=0.26 on Python 3.5. See previous revisions.
GEVENTSETUP_EV_VERIFY=3 ${PYTHON} -m pip install -U -r dev-requirements.txt ${PYTHON} -m pip install -U -r ci-requirements.txt
GEVENTSETUP_EV_VERIFY=3 time ${PYTHON} -m pip install -U -e .
ccache -s
@${PYTHON} scripts/travis.py fold_end install @${PYTHON} scripts/travis.py fold_end install
test-py27: $(PY27) test-py27: $(PY27)
......
...@@ -137,8 +137,13 @@ def make_universal_header(filename, *defines): ...@@ -137,8 +137,13 @@ def make_universal_header(filename, *defines):
def _system(cmd, cwd=None, env=None, **kwargs): def _system(cmd, cwd=None, env=None, **kwargs):
sys.stdout.write('Running %r in %s\n' % (cmd, cwd or os.getcwd())) sys.stdout.write('Running %r in %s\n' % (cmd, cwd or os.getcwd()))
sys.stdout.flush()
if 'shell' not in kwargs: if 'shell' not in kwargs:
kwargs['shell'] = True kwargs['shell'] = True
env = env or os.environ.copy()
if env.get('CC', '').startswith('ccache '):
# Running configure scripts under ccache just adds overhead.
env['CC'] = env['CC'][7:]
return check_call(cmd, cwd=cwd, env=env, **kwargs) return check_call(cmd, cwd=cwd, env=env, **kwargs)
......
...@@ -142,6 +142,7 @@ install: ...@@ -142,6 +142,7 @@ install:
cache: cache:
- "%TMP%\\py\\" - "%TMP%\\py\\"
- '%LOCALAPPDATA%\pip\Cache'
build_script: build_script:
# Build the compiled extension # Build the compiled extension
......
setuptools
wheel
cython>=0.27.3 ; python_version < '3.7'
# Thread state changes, especially in Pythran seem to need this,
# which in turn requires CPython 3.7.0a3 or above
git+https://github.com/cython/cython#egg=cython ; python_version >= '3.7'
greenlet>=0.4.10 ; python_version < '3.7'
# Thread state changes again; requires 0.4.13, as yet unreleased
git+https://github.com/python-greenlet/greenlet#egg=greenlet ; python_version >= '3.7'
pylint>=1.8.0
# pyyaml is included here and doesn't install on travis with 3.7a3
prospector[with_pyroma] ; python_version < '3.7'
coverage>=4.0
coveralls>=1.0
# See version requirements in setup.py
cffi
futures
dnspython
idna
# Makes tests faster
psutil
# For viewing README.rst (restview --long-description),
# CONTRIBUTING.rst, etc.
# https://github.com/mgedmin/restview
restview
setuptools -r ci-requirements.txt
wheel
cython>=0.27.3 ; python_version < '3.7'
# Thread state changes, especially in Pythran seem to need this,
# which in turn requires CPython 3.7.0a3 or above
git+https://github.com/cython/cython#egg=cython ; python_version >= '3.7'
greenlet>=0.4.10 ; python_version < '3.7'
# Thread state changes again; requires 0.4.13, as yet unreleased
git+https://github.com/python-greenlet/greenlet#egg=greenlet ; python_version >= '3.7'
pylint>=1.8.0
# pyyaml is included here and doesn't install on travis with 3.7a3
prospector[with_pyroma] ; python_version < '3.7'
coverage>=4.0
coveralls>=1.0
# See version requirements in setup.py
cffi
futures
dnspython
idna
# Makes tests faster
psutil
# For viewing README.rst (restview --long-description),
# CONTRIBUTING.rst, etc.
# https://github.com/mgedmin/restview
restview
-e . -e .
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment