forked from AkarinVS/vapoursynth-plugin
-
Notifications
You must be signed in to change notification settings - Fork 7
116 lines (97 loc) · 2.89 KB
/
Copy pathci.yml
File metadata and controls
116 lines (97 loc) · 2.89 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
name: CI
on:
push:
branches: [master]
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: Upload
uses: actions/upload-artifact@v7.0.1
if: ${{ matrix.llvm == 22 }}
with:
name: wheel-${{ matrix.os }}
path: result-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
# HACK: only necessary for `libzstd.dll` for LLVM 17 and above.
- name: Repair Wheel (Copy dependencies)
run: |
WHEEL_FILE=$(ls dist/*.whl | head -n 1)
DLL_PATH=$(uvx delvewheel show "$WHEEL_FILE" --add-path /clang64/bin --include libzstd.dll | grep -oP '\(\K[^)]+')
if [ -z "$DLL_PATH" ]; then
echo "Error: Could not find libzstd.dll path via delvewheel."
exit 1
fi
echo "Found DLL at: $DLL_PATH"
echo "Targeting wheel: $WHEEL_FILE"
mkdir -p wheel_contents
7z x "$WHEEL_FILE" -owheel_contents
TARGET_DIR="wheel_contents/vapoursynth/plugins/akarin"
if [ -d "$TARGET_DIR" ]; then
cp "$DLL_PATH" "$TARGET_DIR/"
echo "Successfully injected libzstd.dll into $TARGET_DIR"
else
echo "Error: Target directory $TARGET_DIR not found in wheel."
exit 1
fi
rm "$WHEEL_FILE"
cd wheel_contents
7z a -tzip "../$WHEEL_FILE" *
cd ..
rm -rf wheel_contents
echo "Wheel successfully rebuilt without delvewheel init-patch."
- name: Upload
uses: actions/upload-artifact@v7.0.1
with:
name: wheel-win_amd64
path: |
dist/*.whl