Prepare v2.0.3 #37
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: Build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - '*' | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| publish: | |
| required: true | |
| type: boolean | |
| jobs: | |
| build-non-windows-wheel: | |
| strategy: | |
| matrix: | |
| include: | |
| - arch: linux_x86_64 | |
| runs-on: ubuntu-latest | |
| - arch: linux_aarch64 | |
| runs-on: ubuntu-24.04-arm | |
| - arch: macosx_x86_64 | |
| runs-on: macos-15-intel | |
| - arch: macosx_arm64 | |
| runs-on: macos-15 | |
| fail-fast: false | |
| runs-on: ${{ matrix.runs-on }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pypa/cibuildwheel@v3.4.1 | |
| with: | |
| output-dir: dist | |
| extras: uv | |
| - name: Fix tag | |
| run: | | |
| cd dist | |
| for whl in *.whl; do | |
| pipx run wheel tags --remove --python-tag py3 --abi-tag none $whl | |
| done | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: vs-placebo-${{ matrix.arch }} | |
| path: dist | |
| build-windows-wheel: | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup MSYS2 | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: UCRT64 | |
| update: true | |
| install: >- | |
| base-devel | |
| mingw-w64-ucrt-x86_64-git | |
| mingw-w64-ucrt-x86_64-jq | |
| mingw-w64-ucrt-x86_64-gcc | |
| mingw-w64-ucrt-x86_64-python-build | |
| mingw-w64-ucrt-x86_64-pkgconf | |
| mingw-w64-ucrt-x86_64-vapoursynth | |
| mingw-w64-ucrt-x86_64-meson | |
| mingw-w64-ucrt-x86_64-ninja | |
| mingw-w64-ucrt-x86_64-spirv-tools | |
| mingw-w64-ucrt-x86_64-spirv-cross | |
| mingw-w64-ucrt-x86_64-vulkan-headers | |
| mingw-w64-ucrt-x86_64-vulkan-loader | |
| mingw-w64-ucrt-x86_64-libdovi | |
| mingw-w64-ucrt-x86_64-lcms2 | |
| mingw-w64-ucrt-x86_64-shaderc | |
| mingw-w64-ucrt-x86_64-uv | |
| - name: Build vs-placebo | |
| run: | | |
| : # FIXME: uv does not want to work with subprojects | |
| python -m build --wheel -Csetup-args="--default-library=static" \ | |
| -Csetup-args="-Dprefer_static=true" \ | |
| -Csetup-args="-Dlibplacebo:demos=false" \ | |
| -Csetup-args="-Dlibplacebo:glslang=enabled" | |
| - name: Fix tag | |
| run: | | |
| cd dist | |
| for whl in *.whl; do | |
| uvx wheel tags --remove --python-tag py3 --abi-tag none --platform-tag win_amd64 $whl | |
| done | |
| - name: Build sdist | |
| run: python -m build --sdist | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: vs-placebo-sdist | |
| path: dist/*.tar.gz | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: vs-placebo-win_amd64 | |
| path: dist/*.whl | |
| publish: | |
| if: ${{ inputs.publish || startsWith(github.ref, 'refs/tags/') }} | |
| needs: [build-non-windows-wheel, build-windows-wheel] | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/vs-placebo | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| publish-to-testpypi: | |
| if: github.event.pull_request.head.repo.full_name == github.repository | |
| needs: [build-non-windows-wheel, build-windows-wheel] | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: testpypi | |
| url: https://pypi.org/p/vs-placebo | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ |