diff options
Diffstat (limited to '.github/workflows/tests.yml')
-rw-r--r-- | .github/workflows/tests.yml | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 116f04a..efb9837 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -61,8 +61,8 @@ env: PIP_NO_PYTHON_VERSION_WARNING: 1 PIP_NO_WARN_SCRIPT_LOCATION: 1 - CFLAGS: -Ofast -pipe - CXXFLAGS: -Ofast -pipe + CFLAGS: -O3 -pipe + CXXFLAGS: -O3 -pipe # Uploading built wheels for releases. # TWINE_PASSWORD is encrypted and stored directly in the # github repo settings. @@ -91,6 +91,7 @@ jobs: # Sigh. Note that the matrix must be kept in sync # with `test`, and `docs` must use a subset. runs-on: ${{ matrix.os }} + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name strategy: fail-fast: false matrix: @@ -104,7 +105,7 @@ jobs: - "3.8" - "3.9" - "3.10" - - "3.11.0-beta.3" + - "3.11.0-rc.1" os: [ubuntu-20.04, macos-latest] exclude: - os: macos-latest @@ -153,6 +154,16 @@ jobs: pip install -U pip pip install -U setuptools wheel twine cffi + - name: Build zope.security (3.11.0-rc.1) + if: ${{ startsWith(matrix.python-version, '3.11.0-rc.1') }} + 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: Build zope.security (Python 3.10 on MacOS) if: > startsWith(runner.os, 'Mac') @@ -166,7 +177,7 @@ jobs: 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] + pip install .[test] - name: Build zope.security (all other versions) if: > @@ -179,7 +190,7 @@ jobs: 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] + pip install .[test] - name: Check zope.security build run: | @@ -199,7 +210,7 @@ jobs: && startsWith(github.ref, 'refs/tags') && startsWith(runner.os, 'Mac') && !startsWith(matrix.python-version, 'pypy') - && !startsWith(matrix.python-version, '3.11.0-beta.3') + && !startsWith(matrix.python-version, '3.11.0-rc.1') env: TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} run: | @@ -221,7 +232,7 @@ jobs: - "3.8" - "3.9" - "3.10" - - "3.11.0-beta.3" + - "3.11.0-rc.1" os: [ubuntu-20.04, macos-latest] exclude: - os: macos-latest @@ -262,7 +273,8 @@ jobs: with: name: zope.security-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/ - - name: Install zope.security + - name: Install zope.security 3.11.0-rc.1 + if: ${{ startsWith(matrix.python-version, '3.11.0-rc.1') }} run: | pip install -U wheel setuptools # coverage has a wheel on PyPI for a future python version which is @@ -274,6 +286,17 @@ jobs: # might also save some build time? unzip -n dist/zope.security-*whl -d src pip install --pre -U -e .[test] + - name: Install zope.security + if: ${{ !startsWith(matrix.python-version, '3.11.0-rc.1') }} + run: | + pip install -U wheel setuptools + pip install -U coverage + pip install -U 'faulthandler; python_version == "2.7" and platform_python_implementation == "CPython"' + # Unzip into src/ so that testrunner can find the .so files + # when we ask it to load tests from that directory. This + # might also save some build time? + unzip -n dist/zope.security-*whl -d src + pip install -U -e .[test] - name: Run tests with C extensions if: ${{ !startsWith(matrix.python-version, 'pypy') }} run: | |