diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index d10768a..9c81d4f 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -59,6 +59,21 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: seanmiddleditch/gha-setup-ninja@v5 + if: ${{ matrix.os == 'windows-latest' }} + + - name: Build libmusly + if: ${{ matrix.os == 'windows-latest' }} + shell: bash + run: | + curl -SL https://github.com/andban/musly/archive/1f98bf8af82f4e1f87581e274854d1d20e1603d5.zip -o $RUNNER_TEMP/musly.zip + cd $RUNNER_TEMP + 7z x musly.zip + cd musly-1f98bf8af82f4e1f87581e274854d1d20e1603d5 + cmake -G Ninja -S . -B build -DMUSLY_USE_OWN_LIBRESAMPLE=TRUE -DMUSLY_USE_OWN_LIBKISSFFT=TRUE + cmake --build build --config Release + cmake --install build + - name: Build wheels uses: pypa/cibuildwheel@v2.21.3 env: @@ -66,7 +81,6 @@ jobs: CIBW_ARCHS_MACOS: auto CIBW_ARCHS_LINUX: x86_64 CIBW_ARCHS_WINDOWS: AMD64 - CIBW_ENVIRIONMENT: "RUNNER_TEMP=${{ runner.temp }}" - name: Upload wheels uses: actions/upload-artifact@v4 with: diff --git a/native/CMakeLists.txt b/native/CMakeLists.txt index 07f6951..2f3d550 100644 --- a/native/CMakeLists.txt +++ b/native/CMakeLists.txt @@ -29,10 +29,12 @@ include(FetchContent) find_package(Python REQUIRED COMPONENTS Interpreter Development.Module) find_package(pybind11 CONFIG REQUIRED) +set(MUSLY_USE_OWN_LIBRESAMPLE TRUE) +set(MUSLY_USE_OWN_LIBKISSFFT TRUE) FetchContent_Declare( Musly GIT_REPOSITORY https://github.com/andban/musly.git - GIT_TAG origin/feat/modernized-build-scripts + GIT_TAG 1f98bf8af82f4e1f87581e274854d1d20e1603d5 DOWNLOAD_EXTRACT_TIMESTAMP TRUE EXCLUDE_FROM_ALL FIND_PACKAGE_ARGS ) diff --git a/native/pymusly/CMakeLists.txt b/native/pymusly/CMakeLists.txt index e3b73c1..9c01362 100644 --- a/native/pymusly/CMakeLists.txt +++ b/native/pymusly/CMakeLists.txt @@ -26,7 +26,7 @@ if(DEFINED musly_SOURCE_DIR AND ${SKBUILD_STATE} STREQUAL "wheel") RENAME LICENSE.resample.txt ) install( - FILES ${musly_SOURCE_DIR}/libmusly/src/kissfft/COPYING + FILES ${musly_SOURCE_DIR}/libkissfft/COPYING DESTINATION ${SKBUILD_METADATA_DIR}/licenses RENAME LICENSE.kissfft.txt ) diff --git a/pyproject.toml b/pyproject.toml index 9d53ded..268ccd4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,31 +63,6 @@ manylinux-aarch64-image = "manylinux_2_28" musllinux-x86_64-image = "musllinux_1_2" musllinux-aarch64-image = "musllinux_1_2" -[tool.cibuildwheel.linux] -before-all = [ - "RUNNER_TEMP=$(bash -c 'echo $RUNNER_TEMP')", - "curl -SL https://github.com/andban/musly/archive/refs/heads/feat/modernized-build-scripts.tar.gz | tar -xzC $RUNNER_TEMP", - "cd $RUNNER_TEMP/musly-feat-modernized-build-scripts", - "cmake -S . -B build", - "cmake --build build", - "cmake --install build" -] - -[tool.cibuildwheel.macos] -before-all = [ - "RUNNER_TEMP=$(bash -c 'echo $RUNNER_TEMP')", - "curl -SL https://github.com/andban/musly/archive/refs/heads/feat/modernized-build-scripts.tar.gz | tar -xzC $RUNNER_TEMP", - "cd $RUNNER_TEMP/musly-feat-modernized-build-scripts", - "cmake -S . -B build", - "cmake --build build", - "cmake --install build" -] - -[tool.cibuildwheel.windows] -before-all = [ - "pwsh -Command { curl -SL https://github.com/andban/musly/archive/refs/heads/feat/modernized-build-scripts.tar.gz | tar -f - -xzC $env:RUNNER_TEMP ; cd $env:RUNNER_TEMP/musly-feat-modernized-build-scripts && cmake -S . -B build && cmake --build build && cmake --install build }" -] - [tool.pytest.ini_options] minversion = 8.0 addopts = [