Update actions/checkout action to v6.0.3 (#28) #89
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-linux: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: glibc | |
| llvm: 20 | |
| - target: glibc | |
| llvm: 21 | |
| - target: glibc | |
| llvm: 22 | |
| artifact: "wheel-manylinux-x86-64" | |
| - target: glibc arm | |
| llvm: 22 | |
| artifact: "wheel-manylinux-aarch64" | |
| os: ubuntu-22.04-arm | |
| - target: musl | |
| llvm: 22 | |
| artifact: "wheel-musllinux-x86-64" | |
| container: alpine:edge | |
| name: Build ${{ matrix.target }} llvm=${{ matrix.llvm }} | |
| runs-on: ${{ matrix.os || 'ubuntu-22.04' }} | |
| container: ${{ matrix.container }} | |
| steps: | |
| - name: Install LLVM (glibc) | |
| if: startsWith(matrix.target, 'glibc') | |
| run: | | |
| wget -qO /tmp/llvm.sh https://apt.llvm.org/llvm.sh | |
| chmod +x /tmp/llvm.sh | |
| sudo /tmp/llvm.sh ${{ matrix.llvm }} | |
| sudo apt-get install -y --no-install-recommends \ | |
| llvm-${{ matrix.llvm }}-dev \ | |
| libxml2-dev \ | |
| pkg-config | |
| - name: Install system dependencies (musl) | |
| if: matrix.target == 'musl' | |
| run: | | |
| apk update | |
| apk add --no-cache git build-base pkgconf llvm llvm-dev llvm-static libxml2-dev bash curl | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| - name: Build wheel | |
| env: | |
| MESON_ARGS: --buildtype release | |
| run: uv build --wheel --verbose | |
| - name: Repair wheel | |
| run: uvx --with patchelf auditwheel repair --strip dist/*.whl -w dist-repaired | |
| - name: Upload | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: ${{ matrix.llvm == 22 }} | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: dist-repaired/*.whl | |
| build-macos: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: macos-26 | |
| llvm: 20 | |
| - target: macos-26 | |
| llvm: 21 | |
| - target: macos-26 | |
| llvm: 22 | |
| artifact: "wheel-macos-arm64" | |
| - target: macos-26-intel | |
| llvm: 22 | |
| artifact: "wheel-macos-x86_64" | |
| name: Build ${{ matrix.target }} llvm=${{ matrix.llvm }} | |
| runs-on: ${{ matrix.target }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@a49548c11d9846ad46ecc0115273879b045f001c # v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixpkgs-26.05-darwin | |
| - name: Set up Nix cache | |
| uses: cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17 | |
| with: | |
| name: vs-nix-overlay | |
| - name: Build | |
| run: nix build -L .#llvm_${{ matrix.llvm }}.dist | |
| - name: Repair wheel | |
| run: | | |
| nix shell .#llvm_${{ matrix.llvm }}.dist \ | |
| --command nix develop --command uvx --from delocate delocate-wheel -v -w dist result-dist/*.whl | |
| - name: Upload | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: ${{ matrix.llvm == 22 }} | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: dist/*.whl | |
| build-windows: | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - uses: msys2/setup-msys2@cafece8e6baf9247cf9b1bf95097b0b983cc558d # 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 | |
| - name: Upload | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # 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@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| - name: Build sdist | |
| run: uv build --sdist --verbose | |
| - name: Upload | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: sdist | |
| path: dist/*.tar.gz | |
| publish-pypi: | |
| name: Publish to PyPI | |
| runs-on: ubuntu-24.04 | |
| needs: [build-linux, build-macos, 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@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| pattern: "{wheel-*,sdist}" | |
| path: dist | |
| merge-multiple: true | |
| - name: Publish distributions | |
| uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1 |