Skip to content

Update astral-sh/setup-uv action to v10.0.1 (#54) #135

Update astral-sh/setup-uv action to v10.0.1 (#54)

Update astral-sh/setup-uv action to v10.0.1 (#54) #135

Workflow file for this run

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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Nix
uses: cachix/install-nix-action@13d8dd58da0234aa297dedd986986ccb8e7f3e24 # 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- 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@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1