forked from AkarinVS/vapoursynth-plugin
-
Notifications
You must be signed in to change notification settings - Fork 7
205 lines (175 loc) · 5.69 KB
/
Copy pathci.yml
File metadata and controls
205 lines (175 loc) · 5.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
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@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Nix
uses: cachix/install-nix-action@630ae543ea3a38a9a4166f03376c02c50f408342 # 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@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.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@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1