diff --git a/.github/workflows/build-pedalboard.yml b/.github/workflows/build-pedalboard.yml index 5fda0543ec31..7c27d0531860 100644 --- a/.github/workflows/build-pedalboard.yml +++ b/.github/workflows/build-pedalboard.yml @@ -167,11 +167,14 @@ jobs: # test_type_hints needs mypy and pyright, neither of which runs on riscv64. # The other two modules load tests/plugins/effect/Linux/CHOWTapeModel.vst3 # while being imported, and that VST3 bundle ships an x86_64 binary only. + # test_linux_wheel_cpu_compatibility (new in 0.9.26) tests upstream's x86_64 + # AVX-boundary CI harness under scripts/, which CIBW_TEST_SOURCES doesn't stage. # The deselected test asserts threaded reads beat serial ones, a timing # race that also fails on macOS against upstream's own wheel. CIBW_TEST_COMMAND: >- python -m pytest tests --ignore=tests/test_type_hints.py --ignore=tests/test_external_plugins.py --ignore=tests/test_memory_leaks.py + --ignore=tests/test_linux_wheel_cpu_compatibility.py -k "not test_read_from_bytes_io_memoryview_without_gil" - name: Verify the wheel ships the extension and the bundled licences diff --git a/docs/packages/pedalboard.yaml b/docs/packages/pedalboard.yaml index 060936a8ea5c..1fcdee51bed6 100644 --- a/docs/packages/pedalboard.yaml +++ b/docs/packages/pedalboard.yaml @@ -42,3 +42,4 @@ versions: gpl-sources: filename: gpl-sources.tar description: gcc and the copyleft libraries bundled in the wheel +- version: 0.9.26 diff --git a/patches/pedalboard/0.9.26/0001-cmake-don-t-assume-x86-when-the-target-isn-t-ARM.patch b/patches/pedalboard/0.9.26/0001-cmake-don-t-assume-x86-when-the-target-isn-t-ARM.patch new file mode 100644 index 000000000000..a617b568e84c --- /dev/null +++ b/patches/pedalboard/0.9.26/0001-cmake-don-t-assume-x86-when-the-target-isn-t-ARM.patch @@ -0,0 +1,48 @@ +From: RISE Project +Subject: [PATCH] cmake: don't assume x86 when the target isn't ARM + +The Linux branch of CMakeLists.txt has two if/else pairs that treat +"not ARM" as "x86": one adds -mavx (or -march=native) and defines +HAVE_AVX, the other keeps FFTW's AVX/SSE codelets and drops only the +NEON ones. On any other architecture the build fails at +simd-support/simd-avx.h with "compiling simd-avx.h without -mavx". + +Make both conditions test for x86 explicitly, so architectures without a +vendored SIMD backend (riscv64, ppc64le, s390x) build the scalar FFTW +codelets and get no architecture-specific compiler flags. JUCE already +falls back to its scalar path when JUCE_USE_SIMD is 0. + +Upstream-Status: To upstream [not yet submitted; upstream builds no riscv64 wheels] +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d3150d5..fb9477e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -203,7 +203,7 @@ elseif(UNIX AND NOT APPLE) + # Processor-specific optimizations (x86 vs ARM) + if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm|aarch64") + add_compile_definitions(HAVE_NEON=1) +- else() ++ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64|i[3-6]86") + # Keep distributable builds compatible with AVX-capable x86_64 CPUs. + # Local builds may explicitly target the build machine for extra optimization. + if("$ENV{USE_MARCH_NATIVE}" STREQUAL "1") +@@ -213,6 +213,7 @@ elseif(UNIX AND NOT APPLE) + endif() + add_compile_definitions(HAVE_AVX) + endif() ++ # Any other architecture (riscv64, ppc64le, s390x, ...) builds without SIMD. + + # Additional Linux flags + list(APPEND ALL_INCLUDES "vendors/fftw3/api/" "vendors/fftw3/") +@@ -316,8 +317,10 @@ function(collect_sources) + # Exclude files depending on architecture + if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm|aarch64") + list(FILTER FFTW_SOURCES EXCLUDE REGEX ".*(avx|/sse).*") +- else() ++ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64|i[3-6]86") + list(FILTER FFTW_SOURCES EXCLUDE REGEX ".*neon.*") ++ else() ++ list(FILTER FFTW_SOURCES EXCLUDE REGEX ".*(avx|/sse|neon).*") + endif() + + # Exclude unused FFTW components