Commit d5268d5b authored by Jason Madden's avatar Jason Madden

Disable c-ares when building on arm github actions.

It's very slow, and we don't test it under manylinux anyway.
parent 587d8416
...@@ -114,10 +114,12 @@ jobs: ...@@ -114,10 +114,12 @@ jobs:
docker run --rm --privileged hypriot/qemu-register docker run --rm --privileged hypriot/qemu-register
- name: Build and test gevent - name: Build and test gevent
# Skip the bulk of the tests, running them emulated on arm takes # Skip the bulk of the tests, running them emulated on arm takes
# forever # forever. Likewise, don't build or even configure c-ares; in the emulated platform
# it takes at least 15 minutes and often much longer.
env: env:
DOCKER_IMAGE: quay.io/pypa/manylinux2014_aarch64 DOCKER_IMAGE: quay.io/pypa/manylinux2014_aarch64
GEVENTTEST_SKIP_ALL: 1 GEVENTTEST_SKIP_ALL: 1
GEVENTSETUP_DISABLE_ARES: 1
run: scripts/releases/make-manylinux run: scripts/releases/make-manylinux
- name: Upload gevent wheels - name: Upload gevent wheels
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
......
...@@ -26,7 +26,8 @@ WIN = sys.platform.startswith('win') ...@@ -26,7 +26,8 @@ WIN = sys.platform.startswith('win')
RUNNING_ON_TRAVIS = os.environ.get('TRAVIS') RUNNING_ON_TRAVIS = os.environ.get('TRAVIS')
RUNNING_ON_APPVEYOR = os.environ.get('APPVEYOR') RUNNING_ON_APPVEYOR = os.environ.get('APPVEYOR')
RUNNING_ON_CI = RUNNING_ON_TRAVIS or RUNNING_ON_APPVEYOR RUNNING_ON_GITHUB_ACTIONS = os.environ.get('GITHUB_ACTIONS')
RUNNING_ON_CI = RUNNING_ON_TRAVIS or RUNNING_ON_APPVEYOR or RUNNING_ON_GITHUB_ACTIONS
RUNNING_FROM_CHECKOUT = os.path.isdir(os.path.join(THIS_DIR, ".git")) RUNNING_FROM_CHECKOUT = os.path.isdir(os.path.join(THIS_DIR, ".git"))
...@@ -77,7 +78,7 @@ def glob_many(*globs): ...@@ -77,7 +78,7 @@ def glob_many(*globs):
# They should all begin with ``GEVENTSETUP_`` # They should all begin with ``GEVENTSETUP_``
def _bool_from_environ(key): def bool_from_environ(key):
value = os.environ.get(key) value = os.environ.get(key)
if not value: if not value:
return return
...@@ -97,9 +98,9 @@ def _check_embed(key, defkey, path=None, warn=False): ...@@ -97,9 +98,9 @@ def _check_embed(key, defkey, path=None, warn=False):
those don't exist, then check for the existence of *path* and return those don't exist, then check for the existence of *path* and return
that (if path is given) that (if path is given)
""" """
value = _bool_from_environ(key) value = bool_from_environ(key)
if value is None: if value is None:
value = _bool_from_environ(defkey) value = bool_from_environ(defkey)
if value is not None: if value is not None:
if warn: if warn:
print("Warning: gevent setup: legacy environment key %s or %s found" print("Warning: gevent setup: legacy environment key %s or %s found"
......
...@@ -82,13 +82,17 @@ if [ -d /gevent -a -d /opt/python ]; then ...@@ -82,13 +82,17 @@ if [ -d /gevent -a -d /opt/python ]; then
cd /tmp/build cd /tmp/build
git clone /gevent gevent git clone /gevent gevent
cd gevent cd gevent
echo Configuring cares if [ -z "$GEVENTSETUP_DISABLE_ARES" ]; then
time (cd deps/c-ares && ./configure --disable-dependency-tracking -C > /dev/null ) echo Configuring cares
time (cd deps/c-ares && ./configure --disable-dependency-tracking -C > /dev/null )
else
echo Not configuring c-ares because it is disabled
fi
rm -rf /gevent/wheelhouse rm -rf /gevent/wheelhouse
mkdir /gevent/wheelhouse mkdir /gevent/wheelhouse
OPATH="$PATH" OPATH="$PATH"
which auditwheel which auditwheel
for variant in `ls -d /opt/python/cp{27,36,37,38,39}*`; do for variant in `ls -d /opt/python/cp{27,37,38,39}*`; do
export PATH="$variant/bin:$OPATH" export PATH="$variant/bin:$OPATH"
echo "Building $variant $(python --version)" echo "Building $variant $(python --version)"
...@@ -108,7 +112,9 @@ if [ -d /gevent -a -d /opt/python ]; then ...@@ -108,7 +112,9 @@ if [ -d /gevent -a -d /opt/python ]; then
python -c 'from __future__ import print_function; from gevent._compat import get_clock_info; print("clock info", get_clock_info("perf_counter"))' python -c 'from __future__ import print_function; from gevent._compat import get_clock_info; print("clock info", get_clock_info("perf_counter"))'
python -c 'from __future__ import print_function; import greenlet; print(greenlet, greenlet.__version__)' python -c 'from __future__ import print_function; import greenlet; print(greenlet, greenlet.__version__)'
python -c 'from __future__ import print_function; import gevent.core; print("loop", gevent.core.loop)' python -c 'from __future__ import print_function; import gevent.core; print("loop", gevent.core.loop)'
python -c 'from __future__ import print_function; import gevent.ares; print("ares", gevent.ares)' if [ -z "$GEVENTSETUP_DISABLE_ARES" ]; then
python -c 'from __future__ import print_function; import gevent.ares; print("ares", gevent.ares)'
fi
if [ -z "$GEVENTTEST_SKIP_ALL" ]; then if [ -z "$GEVENTTEST_SKIP_ALL" ]; then
# TODO: Make the testrunner automatically repeat flaky tests. # TODO: Make the testrunner automatically repeat flaky tests.
...@@ -143,5 +149,5 @@ fi ...@@ -143,5 +149,5 @@ fi
# Travis CI and locally we want `-ti`, but github actions doesn't have a TTY, so one # Travis CI and locally we want `-ti`, but github actions doesn't have a TTY, so one
# or the other of the arguments causes this to fail with 'input device is not a TTY' # or the other of the arguments causes this to fail with 'input device is not a TTY'
# Pas through whether we're running on github or not to help with caching. # Pas through whether we're running on github or not to help with caching.
docker run --rm -e GITHUB_ACTIONS -e GEVENTTEST_SKIP_ALL -e DOCKER_IMAGE -v "$(pwd):/gevent" -v "$LCACHE:/cache" -v "$HOME/.ccache:/ccache" ${DOCKER_IMAGE:-quay.io/pypa/manylinux2010_x86_64} /gevent/scripts/releases/$(basename $0) docker run --rm -e GEVENTSETUP_DISABLE_ARES -e GITHUB_ACTIONS -e GEVENTTEST_SKIP_ALL -e DOCKER_IMAGE -v "$(pwd):/gevent" -v "$LCACHE:/cache" -v "$HOME/.ccache:/ccache" ${DOCKER_IMAGE:-quay.io/pypa/manylinux2010_x86_64} /gevent/scripts/releases/$(basename $0)
ls -l wheelhouse ls -l wheelhouse
...@@ -21,6 +21,7 @@ from _setuputils import GeventClean ...@@ -21,6 +21,7 @@ from _setuputils import GeventClean
from _setuputils import BuildFailed from _setuputils import BuildFailed
from _setuputils import cythonize1 from _setuputils import cythonize1
from _setuputils import get_include_dirs from _setuputils import get_include_dirs
from _setuputils import bool_from_environ
# Environment variables that are intended to be used outside of our own # Environment variables that are intended to be used outside of our own
# CI should be documented in ``installing_from_source.rst`` # CI should be documented in ``installing_from_source.rst``
...@@ -170,6 +171,10 @@ EXT_MODULES = [ ...@@ -170,6 +171,10 @@ EXT_MODULES = [
TRACER, TRACER,
] ]
if bool_from_environ('GEVENTSETUP_DISABLE_ARES'):
print("c-ares module disabled, not building")
EXT_MODULES.remove(ARES)
LIBEV_CFFI_MODULE = 'src/gevent/libev/_corecffi_build.py:ffi' LIBEV_CFFI_MODULE = 'src/gevent/libev/_corecffi_build.py:ffi'
LIBUV_CFFI_MODULE = 'src/gevent/libuv/_corecffi_build.py:ffi' LIBUV_CFFI_MODULE = 'src/gevent/libuv/_corecffi_build.py:ffi'
cffi_modules = [] cffi_modules = []
......
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