forked from AkarinVS/vapoursynth-plugin
-
Notifications
You must be signed in to change notification settings - Fork 7
139 lines (117 loc) · 3.25 KB
/
Copy pathci.yml
File metadata and controls
139 lines (117 loc) · 3.25 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
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: Repair wheel (Linux)
if: runner.os == 'Linux'
run: |
nix shell .#llvm_${{ matrix.llvm }}.dist nixpkgs#uv nixpkgs#patchelf \
--command uvx --with patchelf auditwheel repair --strip result-dist/*.whl -w dist
- name: Repair wheel (macOS)
if: runner.os == 'macOS'
run: |
nix shell .#llvm_${{ matrix.llvm }}.dist nixpkgs#uv \
--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: wheel-${{ matrix.os }}
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, 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