diff --git a/.github/workflows/build-libdatachannel-py.yml b/.github/workflows/build-libdatachannel-py.yml index 7a90ee6a5da..04ada1d6773 100644 --- a/.github/workflows/build-libdatachannel-py.yml +++ b/.github/workflows/build-libdatachannel-py.yml @@ -54,17 +54,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(needs.setup.outputs.versions) }} - python: ["cp312", "cp313", "cp314", "cp314t"] - include: - - python: cp312 - python-version: '3.12' - - python: cp313 - python-version: '3.13' - - python: cp314 - python-version: '3.14' - - python: cp314t - python-version: '3.14t' + include: ${{ fromJSON(needs.setup.outputs.matrix) }} env: LIBDATACHANNEL_PY_VERSION: ${{ matrix.version }} diff --git a/.github/workflows/build-lz4.yml b/.github/workflows/build-lz4.yml index bcbfb115907..386013722d6 100644 --- a/.github/workflows/build-lz4.yml +++ b/.github/workflows/build-lz4.yml @@ -55,14 +55,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(needs.setup.outputs.versions) }} - python: ["cp312", "cp313", "cp314", "cp314t"] - include: - # Upstream runs the free-threaded suite under pytest-run-parallel, with - # one thread on its slower (arm) runners. - - python: "cp314t" - pytest_addopts: PYTEST_ADDOPTS=--parallel-threads=1 - tox_free_threading: -x testenv.deps+=pytest-run-parallel + include: ${{ fromJSON(needs.setup.outputs.matrix) }} env: LZ4_VERSION: ${{ matrix.version }} @@ -93,12 +86,13 @@ jobs: CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} # The patch dirties the checkout, so setuptools_scm would derive 4.4.6.dev0 # from `git describe` instead of the tag. - CIBW_ENVIRONMENT: PYLZ4_USE_SYSTEM_LZ4=False SETUPTOOLS_SCM_PRETEND_VERSION_FOR_LZ4=${{ env.LZ4_VERSION }} PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ ${{ matrix.pytest_addopts }} + CIBW_ENVIRONMENT: PYLZ4_USE_SYSTEM_LZ4=False SETUPTOOLS_SCM_PRETEND_VERSION_FOR_LZ4=${{ env.LZ4_VERSION }} PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ ${{ matrix.python == 'cp314t' && 'PYTEST_ADDOPTS=--parallel-threads=1' || '' }} CIBW_TEST_REQUIRES: tox # Upstream's `tox -c {project}` also runs flake8 and the sphinx docs env # against an editable install; `-e py --installpkg` runs the same suite - # against the wheel that was just built. - CIBW_TEST_COMMAND: tox -c {package} -e py --installpkg {wheel} ${{ matrix.tox_free_threading }} + # against the wheel that was just built. Upstream runs the free-threaded + # suite under pytest-run-parallel, with one thread on its slower (arm) runners. + CIBW_TEST_COMMAND: tox -c {package} -e py --installpkg {wheel} ${{ matrix.python == 'cp314t' && '-x testenv.deps+=pytest-run-parallel' || '' }} - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: diff --git a/.github/workflows/build-moviepilot-rust.yml b/.github/workflows/build-moviepilot-rust.yml index 9a51582f6d9..3d63596988c 100644 --- a/.github/workflows/build-moviepilot-rust.yml +++ b/.github/workflows/build-moviepilot-rust.yml @@ -57,15 +57,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(needs.setup.outputs.versions) }} - # requires-python is >=3.14; the default `abi3-py314` feature makes cp314 one abi3 wheel. - python: ["cp314", "cp314t"] - platform: ["manylinux", "musllinux"] - include: - - python: cp314 - environment: PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 - - python: cp314t - environment: MATURIN_PEP517_ARGS="--locked --no-default-features --features zhconv" + include: ${{ fromJSON(needs.setup.outputs.matrix) }} env: MOVIEPILOT_RUST_VERSION: ${{ matrix.version }} @@ -87,7 +79,12 @@ jobs: CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} CIBW_MUSLLINUX_RISCV64_IMAGE: ${{ env.MUSLLINUX_RISCV64_IMAGE }} CIBW_BEFORE_ALL_LINUX: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin" ${{ matrix.environment }} + # requires-python is >=3.14; the default `abi3-py314` feature makes cp314 one abi3 wheel. + CIBW_ENVIRONMENT_LINUX: >- + PATH="$PATH:$HOME/.cargo/bin" + ${{ matrix.python == 'cp314' && 'PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1' || + matrix.python == 'cp314t' && 'MATURIN_PEP517_ARGS="--locked --no-default-features --features zhconv"' || + '' }} CIBW_TEST_REQUIRES: pytest CIBW_TEST_SOURCES: tests CIBW_TEST_COMMAND: python -m pytest -q diff --git a/.github/workflows/build-onnxsim.yml b/.github/workflows/build-onnxsim.yml index 9b0156c9190..3d4ec71a8f9 100644 --- a/.github/workflows/build-onnxsim.yml +++ b/.github/workflows/build-onnxsim.yml @@ -45,6 +45,9 @@ jobs: with: package: onnxsim version: ${{ inputs.version }} + # cp310: onnx (the runtime dependency) has no riscv64 wheel on our registry, + # at any version, and no py3-none-any fallback either (it's a compiled extension). + python-exclude: 'cp39 cp310' build_wheels: needs: [setup] @@ -54,50 +57,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(needs.setup.outputs.versions) }} - # Upstream ships cp310/cp311/cp312-abi3 (no free-threaded wheel here). - # cp310 is dropped: onnx (the runtime dependency) has no riscv64 wheel - # for it on our registry, at any version, and no py3-none-any fallback - # either (it's a compiled extension). cp311 stays: onnx ships a - # riscv64 cp311 wheel, and nanobind/protobuf (the other build-time - # dependencies) resolve too, via their py3-none-any fallback wheels. - # `python` is a real matrix dimension (not folded into `include` - # alone) so both entries actually produce a job: an `include` list - # whose entries share no key with the base matrix collapses onto a - # single combination instead of adding one job per entry. - python: [cp311, cp312] - # pytest_k also drops four tests that cannot pass here, all outside what - # upstream's own wheel legs run: - # - test_symbolic_batch_dim_is_analysed_at_batch_one imports torch without - # the needs_torch guard its neighbours have (ModuleNotFoundError); - # - test_workaround_fixes_default_optimization_for_plain_matmul asserts that - # onnxruntime still has the MatMulNBits bug the workaround targets, and - # the onnxruntime on our registry is newer than that; - # - the two test_qat tests compare against a golden loss value and a golden - # model hash recorded on x86_64 (6.47 expected, 5.83 here). - include: - - python: cp311 - # No riscv64 onnxruntime wheel on cp311; the rest of the suite still - # runs (onnxsim falls back to onnx's reference evaluator). - onnxruntime: '' - # onnx's reference BatchNormalization_9 (opset 9-13) always takes its - # momentum branch (the attribute defaults to 0.9, never None) and mixes - # batch statistics into the inference output, so the equivalence check - # rejects the correctly fused Conv; same failure on x86_64 without - # onnxruntime. Upstream CI always installs onnxruntime. - pytest_k: >- - not test_fuse_conv_bn_into_conv and not test_fuse_convtranspose_bn - and not test_symbolic_batch_dim_is_analysed_at_batch_one - and not test_workaround_fixes_default_optimization_for_plain_matmul - and not test_the_full_batch_default_is_the_graph_it_always_was - and not test_activation_quantization_off_leaves_the_weight_only_pass_untouched - - python: cp312 - onnxruntime: onnxruntime - pytest_k: >- - not test_symbolic_batch_dim_is_analysed_at_batch_one - and not test_workaround_fixes_default_optimization_for_plain_matmul - and not test_the_full_batch_default_is_the_graph_it_always_was - and not test_activation_quantization_off_leaves_the_weight_only_pass_untouched + include: ${{ fromJSON(needs.setup.outputs.matrix) }} env: ONNXSIM_VERSION: ${{ matrix.version }} @@ -160,7 +120,7 @@ jobs: # sympy/onnxslim/ultralytics/rfdetr paths; most guard the import with # pytest.importorskip, so they collect fine and just skip without # riscv64 wheels for those. onnxruntime does have a riscv64 wheel on - # our registry, but only from cp312 (matrix.onnxruntime). These files + # our registry, but not from cp311 (the ternary below). These files # import torch/timm/onnxruntime unconditionally at module level # (no importorskip), which aborts collection outright rather than # skipping when the import fails - not just deselecting their tests, @@ -169,7 +129,7 @@ jobs: # test_rknn3_compat, test_tflite_export_torchvision, test_torch_export_integration). # pytest<9.2: from 9.2 pytest.approx() rejects a numpy float32 tolerance # (test_calibration_streaming's abs=2 * step). - CIBW_TEST_REQUIRES: pytest<9.2 pytest-xdist ${{ matrix.onnxruntime }} + CIBW_TEST_REQUIRES: pytest<9.2 pytest-xdist ${{ matrix.python == 'cp311' && '' || 'onnxruntime' }} # The build environment above does not reach the test stage, so the test # requirements resolved without the registry and compiled numpy from source # (about 20 minutes per leg, taken from the 6 hour job limit the extension @@ -187,14 +147,28 @@ jobs: # 0.8.0 over a hundred test files import it unguarded or rely on it (168 # failures and 91 collection errors on the leg without it). There is no # riscv64 onnxruntime wheel for cp311, so that leg cannot run the suite; the - # cp312 leg builds the same sources and runs all of it. Without onnxruntime + # other legs build the same sources and run all of it. Without onnxruntime # run what upstream's own wheel legs run after pytest: the import and the - # command line. + # command line. cp311 also drops test_fuse_conv_bn_into_conv and + # test_fuse_convtranspose_bn: onnx's reference BatchNormalization_9 + # (opset 9-13) always takes its momentum branch (the attribute defaults to + # 0.9, never None) and mixes batch statistics into the inference output, so + # the equivalence check rejects the correctly fused Conv; same failure on + # x86_64 without onnxruntime. CIBW_TEST_COMMAND: >- if python -c "import onnxruntime" 2>/dev/null; then pytest {project}/tests/ -n auto -m "not axera and not quantization and not pruning" - -k "${{ matrix.pytest_k }}" + -k "${{ matrix.python == 'cp311' && + 'not test_fuse_conv_bn_into_conv and not test_fuse_convtranspose_bn + and not test_symbolic_batch_dim_is_analysed_at_batch_one + and not test_workaround_fixes_default_optimization_for_plain_matmul + and not test_the_full_batch_default_is_the_graph_it_always_was + and not test_activation_quantization_off_leaves_the_weight_only_pass_untouched' || + 'not test_symbolic_batch_dim_is_analysed_at_batch_one + and not test_workaround_fixes_default_optimization_for_plain_matmul + and not test_the_full_batch_default_is_the_graph_it_always_was + and not test_activation_quantization_off_leaves_the_weight_only_pass_untouched' }}" --ignore={project}/tests/test_python_api.py --ignore={project}/tests/test_simple.py --ignore={project}/tests/test_timm.py diff --git a/.github/workflows/build-pgserver.yml b/.github/workflows/build-pgserver.yml index 248e221220e..d66ef9b127e 100644 --- a/.github/workflows/build-pgserver.yml +++ b/.github/workflows/build-pgserver.yml @@ -54,12 +54,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(needs.setup.outputs.versions) }} - python: ["cp312", "cp313", "cp314", "cp314t"] - include: - # The test extra's psycopg2-binary publishes no free-threaded wheel for any platform (gotcha 149). - - python: "cp314t" - test_skip: "*" + include: ${{ fromJSON(needs.setup.outputs.matrix) }} env: PGSERVER_VERSION: ${{ matrix.version }} @@ -92,7 +87,8 @@ jobs: CIBW_ENVIRONMENT: >- PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ LDFLAGS="-Wl,-Ttext-segment=0x200000" - CIBW_TEST_SKIP: ${{ matrix.test_skip }} + # The test extra's psycopg2-binary publishes no free-threaded wheel for any platform (gotcha 149). + CIBW_TEST_SKIP: ${{ matrix.python == 'cp314t' && '*' || '' }} # sqlalchemy-utils 0.42.1 (latest) still imports the removed # sqlalchemy.orm.attributes.ScalarAttributeImpl, so pgserver's unpinned # `sqlalchemy>=2` test extra resolves to a broken combo now that sqlalchemy 2.1 diff --git a/.github/workflows/build-picows.yml b/.github/workflows/build-picows.yml index 7fc946c0a2d..57e8b755354 100644 --- a/.github/workflows/build-picows.yml +++ b/.github/workflows/build-picows.yml @@ -48,20 +48,13 @@ jobs: build_wheels: needs: [setup] if: needs.setup.outputs.versions != '[]' - name: Build picows ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.libc }}_riscv64 + name: Build picows ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 runs-on: ubuntu-24.04-riscv timeout-minutes: 60 strategy: fail-fast: false matrix: - version: ${{ fromJSON(needs.setup.outputs.versions) }} - python: ["cp39", "cp310", "cp311", "cp312", "cp313", "cp314", "cp314t"] - libc: [manylinux, musllinux] - include: - # uvloop has no musllinux riscv64 wheel on the registry (same situation as - # build-aiofastnet.yml); skip tests on that leg rather than compile it from sdist. - - libc: musllinux - test_skip: "*" + include: ${{ fromJSON(needs.setup.outputs.matrix) }} env: PICOWS_VERSION: ${{ matrix.version }} @@ -78,23 +71,25 @@ jobs: uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 with: output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.libc }}_riscv64 + only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 env: CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} CIBW_MUSLLINUX_RISCV64_IMAGE: ${{ env.MUSLLINUX_RISCV64_IMAGE }} CIBW_ENVIRONMENT_LINUX: CFLAGS="$CFLAGS -O2 -g0 -DNDEBUG" PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ CIBW_TEST_REQUIRES: >- pytest pytest-asyncio async_timeout tiny-proxy websockets - ${{ matrix.libc == 'manylinux' && 'uvloop' || '' }} + ${{ matrix.platform == 'manylinux' && 'uvloop' || '' }} CIBW_TEST_SOURCES: tests pyproject.toml - CIBW_TEST_SKIP: ${{ matrix.test_skip }} + # uvloop has no musllinux riscv64 wheel on the registry (same situation as + # build-aiofastnet.yml); skip tests on that leg rather than compile it from sdist. + CIBW_TEST_SKIP: ${{ matrix.platform == 'musllinux' && '*' || '' }} # test_proxy_dns_resolution dials the real wss://echo.websocket.org; too flaky/ # network-dependent for this runner (same reasoning as docs/packages/uvloop.yaml's warning). CIBW_TEST_COMMAND: pytest -v tests -k "not test_proxy_dns_resolution" - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: picows-${{ env.PICOWS_VERSION }}-${{ matrix.python }}-${{ matrix.libc }}_riscv64 + name: picows-${{ env.PICOWS_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 path: wheelhouse/*.whl if-no-files-found: error