diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e88995d..554fa7a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -145,7 +145,10 @@ jobs: pip install -U pip pip install -U setuptools wheel twine cffi - - name: Build zope.security + - name: Build zope.security (Python 3.10 on MacOS) + if: > + startsWith(runner.os, 'Mac') + && startsWith(matrix.python-version, '3.10') env: _PYTHON_HOST_PLATFORM: macosx-11-x86_64 run: | @@ -157,6 +160,19 @@ jobs: pip install -U 'faulthandler; python_version == "2.7" and platform_python_implementation == "CPython"' pip install --pre .[test] + - name: Build zope.security (all other versions) + if: > + !startsWith(runner.os, 'Mac') + || !startsWith(matrix.python-version, '3.10') + run: | + # Next, build the wheel *in place*. This helps ccache, and also lets us cache the configure + # output (pip install uses a random temporary directory, making this difficult). + python setup.py build_ext -i + python setup.py bdist_wheel + # Also install it, so that we get dependencies in the (pip) cache. + pip install -U 'faulthandler; python_version == "2.7" and platform_python_implementation == "CPython"' + pip install --pre .[test] + - name: Check zope.security build run: | ls -l dist @@ -321,7 +337,7 @@ jobs: run: | pip install -U wheel pip install -U coverage - pip install -U "`ls dist/zope.security-${{ runner.os }}-${{ matrix.python-version }}.whl`[docs]" + pip install -U "`ls dist/zope.security-*.whl`[docs]" - name: Build docs env: ZOPE_INTERFACE_STRICT_IRO: 1 @@ -372,7 +388,7 @@ jobs: run: | pip install -U pip pip install -U wheel - pip install -U `ls dist/zope.security-${{ runner.os }}-${{ matrix.python-version }}`[test] + pip install -U `ls dist/zope.security-*`[test] - name: Lint # We only need to do this on one version, and it should be Python 3, because # pylint has stopped updating for Python 2.