Skip to content

Configure Renovate (#17) #82

Configure Renovate (#17)

Configure Renovate (#17) #82

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@v6.0.2
- name: Set up uv
uses: astral-sh/setup-uv@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@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@v6.0.2
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixpkgs-26.05-darwin
- 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: 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@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@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
- 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-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@v8.0.1
with:
pattern: "{wheel-*,sdist}"
path: dist
merge-multiple: true
- name: Publish distributions
uses: pypa/gh-action-pypi-publish@release/v1