Release v1.3.0 #56
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: CI | |
| on: | |
| push: | |
| branches: [master] | |
| tags: ["v*"] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, macos-26] | |
| llvm: [20, 21, 22] | |
| name: Build os=${{ matrix.os }} llvm=${{ matrix.llvm }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - name: Set up Nix cache | |
| uses: cachix/cachix-action@v17 | |
| with: | |
| name: vs-nix-overlay | |
| - name: Build | |
| run: nix build -L .#llvm_${{ matrix.llvm }}.dist | |
| - name: Upload | |
| uses: actions/upload-artifact@v7.0.1 | |
| if: ${{ matrix.llvm == 22 }} | |
| with: | |
| name: wheel-${{ matrix.os }} | |
| path: result-dist/*.whl | |
| build-windows: | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| - uses: msys2/setup-msys2@v2.31.0 | |
| with: | |
| msystem: CLANG64 | |
| update: true | |
| pacboy: >- | |
| toolchain:p | |
| meson:p | |
| ninja:p | |
| pkgconf:p | |
| libxml2:p | |
| 7zip:p | |
| uv:p | |
| - name: Configure and build | |
| env: | |
| MESON_ARGS: >- | |
| --buildtype release | |
| --prefer-static | |
| --default-library=static | |
| -Dcpp_link_args=-static | |
| run: uv build --wheel --verbose | |
| # HACK: only necessary for `libzstd.dll` for LLVM 17 and above. | |
| - name: Repair Wheel (Copy dependencies) | |
| run: | | |
| WHEEL_FILE=$(ls dist/*.whl | head -n 1) | |
| DLL_PATH=$(uvx delvewheel show "$WHEEL_FILE" --add-path /clang64/bin --include libzstd.dll | grep -oP '\(\K[^)]+') | |
| if [ -z "$DLL_PATH" ]; then | |
| echo "Error: Could not find libzstd.dll path via delvewheel." | |
| exit 1 | |
| fi | |
| echo "Found DLL at: $DLL_PATH" | |
| echo "Targeting wheel: $WHEEL_FILE" | |
| mkdir -p wheel_contents | |
| 7z x "$WHEEL_FILE" -owheel_contents | |
| TARGET_DIR="wheel_contents/vapoursynth/plugins/akarin" | |
| if [ -d "$TARGET_DIR" ]; then | |
| cp "$DLL_PATH" "$TARGET_DIR/" | |
| echo "Successfully injected libzstd.dll into $TARGET_DIR" | |
| else | |
| echo "Error: Target directory $TARGET_DIR not found in wheel." | |
| exit 1 | |
| fi | |
| rm "$WHEEL_FILE" | |
| cd wheel_contents | |
| 7z a -tzip "../$WHEEL_FILE" * | |
| cd .. | |
| rm -rf wheel_contents | |
| echo "Wheel successfully rebuilt without delvewheel init-patch." | |
| - name: Upload | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: wheel-win_amd64 | |
| path: | | |
| dist/*.whl | |
| build-sdist: | |
| name: Build sdist | |
| runs-on: ubuntu-24.04 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v8.1.0 | |
| - name: Build sdist | |
| run: uv build --sdist --verbose | |
| - name: Upload | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: sdist | |
| path: dist/*.tar.gz | |
| publish-pypi: | |
| name: Publish to PyPI | |
| runs-on: ubuntu-24.04 | |
| needs: [build, build-windows, build-sdist] | |
| if: startsWith(github.ref, 'refs/tags/') | |
| permissions: | |
| contents: read | |
| id-token: write | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/vapoursynth-akarin | |
| steps: | |
| - name: Download distributions | |
| uses: actions/download-artifact@v8.0.1 | |
| with: | |
| pattern: "{wheel-*,sdist}" | |
| path: dist | |
| merge-multiple: true | |
| - name: Publish distributions | |
| uses: pypa/gh-action-pypi-publish@release/v1 |