Repository navigation
v0.9.0: nanobind 2.14, GIL release during rendering, Python 3.11-3.14, new wheels, docs overhaul #555
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Compile, Test, and Deploy | |
| on: | |
| pull_request: {} | |
| workflow_dispatch: {} # Allow manual trigger | |
| push: | |
| tags: | |
| - 'v*' # Pushing a version tag (e.g. v0.8.6) builds wheels and uploads to PyPI | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build-ubuntu: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # x86_64 (native) | |
| - { os: ubuntu-22.04, python-version: "3.11", pythonLibPath: "/opt/python/cp311-cp311/lib", pythonInclude: "/opt/python/cp311-cp311/include/python3.11", cibwbuild: "cp311-manylinux_x86_64"} | |
| - { os: ubuntu-22.04, python-version: "3.12", pythonLibPath: "/opt/python/cp312-cp312/lib", pythonInclude: "/opt/python/cp312-cp312/include/python3.12", cibwbuild: "cp312-manylinux_x86_64"} | |
| - { os: ubuntu-22.04, python-version: "3.13", pythonLibPath: "/opt/python/cp313-cp313/lib", pythonInclude: "/opt/python/cp313-cp313/include/python3.13", cibwbuild: "cp313-manylinux_x86_64"} | |
| - { os: ubuntu-22.04, python-version: "3.14", pythonLibPath: "/opt/python/cp314-cp314/lib", pythonInclude: "/opt/python/cp314-cp314/include/python3.14", cibwbuild: "cp314-manylinux_x86_64"} | |
| # aarch64 (native arm64 runners; libfaust-ubuntu-aarch64.zip is | |
| # downloaded by download_libfaust.py based on the host architecture) | |
| - { os: ubuntu-24.04-arm, python-version: "3.11", pythonLibPath: "/opt/python/cp311-cp311/lib", pythonInclude: "/opt/python/cp311-cp311/include/python3.11", cibwbuild: "cp311-manylinux_aarch64"} | |
| - { os: ubuntu-24.04-arm, python-version: "3.12", pythonLibPath: "/opt/python/cp312-cp312/lib", pythonInclude: "/opt/python/cp312-cp312/include/python3.12", cibwbuild: "cp312-manylinux_aarch64"} | |
| - { os: ubuntu-24.04-arm, python-version: "3.13", pythonLibPath: "/opt/python/cp313-cp313/lib", pythonInclude: "/opt/python/cp313-cp313/include/python3.13", cibwbuild: "cp313-manylinux_aarch64"} | |
| - { os: ubuntu-24.04-arm, python-version: "3.14", pythonLibPath: "/opt/python/cp314-cp314/lib", pythonInclude: "/opt/python/cp314-cp314/include/python3.14", cibwbuild: "cp314-manylinux_aarch64"} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: clean faust libraries | |
| run: | | |
| rm -rf dawdreamer/faustlibraries/.git | |
| rm thirdparty/faust/architecture/android/app/lib/libsndfile/lib/armeabi-v7a/libsndfile.so | |
| rm thirdparty/faust/architecture/android/app/lib/libsndfile/lib/arm64-v8a/libsndfile.so | |
| - name: Download libfaust | |
| run: | | |
| cd thirdparty/libfaust | |
| python download_libfaust.py | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.3.0 | |
| env: | |
| CIBW_PLATFORM: linux | |
| CIBW_BUILD: ${{ matrix.cibwbuild }} | |
| CIBW_BUILD_VERBOSITY: 3 | |
| CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_34_x86_64 | |
| CIBW_MANYLINUX_AARCH64_IMAGE: quay.io/pypa/manylinux_2_34_aarch64 | |
| CIBW_BEFORE_BUILD_LINUX: > | |
| yum install -y ncurses-devel libX11-devel libXrandr-devel libXinerama-devel | |
| libXrender-devel libXcomposite-devel libXcursor-devel freetype-devel | |
| alsa-lib-devel && | |
| export PYTHONLIBPATH=${{ matrix.pythonLibPath }} && | |
| export PYTHONINCLUDEPATH=${{ matrix.pythonInclude }} && | |
| cd thirdparty/libsamplerate && | |
| cmake -DCMAKE_BUILD_TYPE=Release -Bbuild_release -DCMAKE_POSITION_INDEPENDENT_CODE=ON && | |
| cmake --build build_release --config Release && | |
| cd ../.. && | |
| cd Builds/LinuxMakefile && | |
| make CONFIG=Release LIBS="-lstdc++fs" LDFLAGS="-L$PYTHONLIBPATH -L../../thirdparty/libfaust/ubuntu-$(uname -m)/Release/lib" CXXFLAGS="-I$PYTHONINCLUDEPATH" && | |
| strip --strip-unneeded build/libdawdreamer.so && | |
| mv build/libdawdreamer.so ../../dawdreamer/dawdreamer.so && | |
| cd ../.. | |
| CIBW_REPAIR_WHEEL_COMMAND_LINUX: > | |
| LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/dawdreamer:$PWD/thirdparty/libfaust/ubuntu-$(uname -m)/Release/lib && pip install auditwheel-symbols && (auditwheel repair -w {dest_dir} {wheel} || auditwheel-symbols --manylinux 2_34 {wheel}) | |
| CIBW_TEST_REQUIRES: -r test-requirements.txt soundfile | |
| CIBW_TEST_COMMAND: "rm -rf dawdreamer/*.so* && cd {project}/tests && python -m pytest -v . --ignore=test_jax.py" | |
| CIBW_ARCHS: auto64 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact-${{ matrix.cibwbuild}} | |
| path: ./wheelhouse/*.whl | |
| build-ubuntu-docker: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Build Docker image | |
| run: docker build -t dawdreamer . | |
| build-windows: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { os: windows-2025, python-version: "3.11", CIBW-BUILD: "cp311*"} | |
| - { os: windows-2025, python-version: "3.12", CIBW-BUILD: "cp312*"} | |
| - { os: windows-2025, python-version: "3.13", CIBW-BUILD: "cp313*"} | |
| - { os: windows-2025, python-version: "3.14", CIBW-BUILD: "cp314*"} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v2 | |
| with: | |
| # The projects are Projucer-generated for VS2022 (v143 toolset), so | |
| # select VS2022's MSBuild. The windows-2025 image also carries VS2026, | |
| # whose MSBuild would otherwise be picked up as the newest. | |
| vs-version: '[17.0,18.0)' | |
| - name: Get CMake | |
| uses: lukka/get-cmake@latest | |
| - name: clean faust libraries | |
| run: | | |
| Remove-Item -Recurse -Force "dawdreamer/faustlibraries/.git" | |
| - name: Download libfaust | |
| shell: cmd | |
| run: | | |
| cd thirdparty/libfaust | |
| python download_libfaust.py | |
| - name: Build libsamplerate | |
| run: | | |
| cd thirdparty/libsamplerate | |
| cmake -DCMAKE_BUILD_TYPE=Release -Bbuild_release | |
| cmake --build build_release --config Release | |
| - name: Build Windows (Release) | |
| run: | | |
| msbuild Builds/VisualStudio2022/DawDreamer.sln /property:Configuration=Release | |
| - name: Install cibuildwheel | |
| run: python -m pip install "cibuildwheel==3.3.0" | |
| - name: Build Wheels | |
| run: | | |
| python -m cibuildwheel --output-dir wheelhouse | |
| env: | |
| PYTHONMAJOR: ${{ matrix.python-version }} | |
| CIBW_BUILD_VERBOSITY: 1 | |
| CIBW_TEST_REQUIRES: -r test-requirements.txt | |
| CIBW_TEST_COMMAND: "cd /D {project}\\tests && python -m pytest -v ." | |
| CIBW_ARCHS: auto64 | |
| CIBW_BUILD: ${{matrix.CIBW-BUILD}} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact-windows-${{ matrix.python-version}} | |
| path: ./wheelhouse/*.whl | |
| build-macos: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Apple Silicon | |
| - { os: macos-15, build: cp311-macosx_arm64, python-version: "3.11", ARCHS: "arm64" } | |
| - { os: macos-15, build: cp312-macosx_arm64, python-version: "3.12", ARCHS: "arm64" } | |
| - { os: macos-15, build: cp313-macosx_arm64, python-version: "3.13", ARCHS: "arm64" } | |
| - { os: macos-15, build: cp314-macosx_arm64, python-version: "3.14", ARCHS: "arm64" } | |
| # Intel | |
| - { os: macos-15-intel, build: cp311-macosx_x86_64, python-version: "3.11", ARCHS: "x86_64" } | |
| - { os: macos-15-intel, build: cp312-macosx_x86_64, python-version: "3.12", ARCHS: "x86_64" } | |
| - { os: macos-15-intel, build: cp313-macosx_x86_64, python-version: "3.13", ARCHS: "x86_64" } | |
| - { os: macos-15-intel, build: cp314-macosx_x86_64, python-version: "3.14", ARCHS: "x86_64" } | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Get CMake | |
| uses: lukka/get-cmake@latest | |
| - name: Build libsamplerate | |
| run: | | |
| cd thirdparty/libsamplerate | |
| cmake -DCMAKE_BUILD_TYPE=Release -Bbuild_release -DCMAKE_OSX_ARCHITECTURES="${{matrix.ARCHS}}" -DLIBSAMPLERATE_EXAMPLES=off -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 | |
| make --directory=build_release | |
| cd ../.. | |
| - name: clean faust libraries | |
| run: | | |
| rm -rf dawdreamer/faustlibraries/.git | |
| - name: Download libfaust | |
| run: | | |
| cd thirdparty/libfaust | |
| python download_libfaust.py | |
| - name: Build wheels ${{ matrix.python-version }} | |
| uses: pypa/cibuildwheel@v3.3.0 | |
| env: | |
| # note that the Projucer project refers to PYTHONMAJOR and pythonLocation, so they must be set here | |
| PYTHONMAJOR: ${{ matrix.python-version }} | |
| MACOSX_DEPLOYMENT_TARGET: 11.0 | |
| CIBW_BUILD_VERBOSITY: 1 | |
| CIBW_BEFORE_BUILD: | | |
| export pythonLocation=$(python${{matrix.python-version}}-config --prefix) | |
| otool -L $pythonLocation/bin/python3 | |
| xcodebuild ARCHS="${{matrix.ARCHS}}" ONLY_ACTIVE_ARCH=NO -configuration Release-${{matrix.ARCHS}} -project Builds/MacOSX/DawDreamer.xcodeproj/ CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED="NO" CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO" | |
| cd Builds/MacOSX/build/Release-${{matrix.ARCHS}} | |
| mv dawdreamer.so.dylib dawdreamer.so | |
| CIBW_TEST_REQUIRES: -r test-requirements.txt | |
| CIBW_TEST_COMMAND: "cd {project}/tests; python -m pytest -v ." | |
| CIBW_BUILD: ${{matrix.build}} | |
| CIBW_ARCHS: ${{matrix.ARCHS}} | |
| CIBW_ARCHS_MACOS: ${{matrix.ARCHS}} | |
| CIBW_ENVIRONMENT_MACOS: ARCHS="${{matrix.ARCHS}}" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact-macos-${{ matrix.build}} | |
| path: ./wheelhouse/*.whl | |
| upload-pypi: | |
| needs: [build-windows, build-ubuntu, build-macos] | |
| runs-on: ubuntu-latest | |
| name: "Upload wheels to PyPI" | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: artifact-* | |
| merge-multiple: true | |
| path: dist | |
| - name: Verify tag matches wheel version | |
| run: | | |
| TAG_VERSION="${GITHUB_REF_NAME#v}" | |
| for whl in dist/*.whl; do | |
| if [[ "$(basename "$whl")" != "dawdreamer-${TAG_VERSION}-"* ]]; then | |
| echo "Tag v${TAG_VERSION} does not match wheel $(basename "$whl")." >&2 | |
| echo "Update the version in DawDreamer.jucer before tagging." >&2 | |
| exit 1 | |
| fi | |
| done | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_API_TOKEN }} |