@@ -11,9 +11,116 @@ permissions:
1111 contents : write
1212
1313jobs :
14- build :
14+ build-windows-release :
15+ name : Windows x64 Release
16+ runs-on : windows-latest
17+ if : startsWith(github.ref, 'refs/tags/')
18+ strategy :
19+ fail-fast : false
20+ matrix :
21+ include :
22+ - name : Windows x64
23+ os : windows-latest
24+ libc : ' '
25+ artifact_name : llvmexpr-windows-x64-static-llvm20
26+ library_name : libllvmexpr.dll
27+
28+ steps :
29+ - name : Checkout
30+ uses : actions/checkout@v4
31+
32+ # Windows specific setup
33+ - name : Setup MSYS2 (Windows)
34+ uses : msys2/setup-msys2@v2
35+ with :
36+ update : true
37+ msystem : MINGW64
38+ install : >-
39+ base-devel
40+ git
41+ ninja
42+ mingw-w64-x86_64-meson
43+ mingw-w64-x86_64-python
44+ curl
45+ unzip
46+ zip
47+ mingw-w64-x86_64-toolchain
48+ mingw-w64-x86_64-pkg-config
49+ mingw-w64-x86_64-llvm
50+ mingw-w64-x86_64-vapoursynth
51+
52+ - name : Show tool versions (Windows)
53+ shell : msys2 {0}
54+ run : |
55+ clang --version || true
56+ g++ --version || true
57+ meson --version
58+ ninja --version
59+ llvm-config --version
60+ pkg-config --version
61+
62+ - name : Check LLVM version (>= 20) (Windows)
63+ shell : msys2 {0}
64+ run : |
65+ set -e
66+ ver=$(llvm-config --version | cut -d. -f1)
67+ if [ "$ver" -lt 20 ]; then
68+ echo "LLVM >= 20 is required, found: $(llvm-config --version)" >&2
69+ exit 1
70+ fi
71+
72+ - name : Configure (Meson) (Windows)
73+ shell : msys2 {0}
74+ run : |
75+ meson setup builddir \
76+ -Dstatic-llvm=true \
77+ --buildtype=release
78+
79+ - name : Build (Windows)
80+ shell : msys2 {0}
81+ run : |
82+ ninja -C builddir
83+
84+ - name : Check dependencies (Windows)
85+ shell : msys2 {0}
86+ run : ldd builddir/${{ matrix.library_name }}
87+
88+ - name : Install to staging dir (Windows)
89+ shell : msys2 {0}
90+ run : |
91+ DESTDIR="$PWD/stage" meson install -C builddir
92+ find stage -maxdepth 5 -type f -print
93+
94+ - name : Collect artifact (Windows)
95+ id : collect_windows
96+ shell : msys2 {0}
97+ run : |
98+ set -e
99+ libfile=$(find stage -type f -name '${{ matrix.library_name }}' | head -n 1)
100+ if [ -z "$libfile" ]; then
101+ echo "${{ matrix.library_name }} not found in install tree" >&2
102+ exit 1
103+ fi
104+ outdir=artifact
105+ mkdir -p "$outdir"
106+ cp "$libfile" "$outdir/${{ matrix.library_name }}"
107+ cp LICENSE "$outdir/" || true
108+ cp README.md "$outdir/" || true
109+ cp -r exprutils/ "$outdir/" || true
110+ cp pyproject.toml "$outdir/" || true
111+ echo "artifact_dir=$outdir" >> $GITHUB_OUTPUT
112+
113+ - name : Upload artifact
114+ uses : actions/upload-artifact@v4
115+ with :
116+ name : ${{ matrix.artifact_name }}
117+ path : ${{ steps.collect_windows.outputs.artifact_dir }}
118+ if-no-files-found : error
119+
120+ build-all :
15121 name : ${{ matrix.name }}
16122 runs-on : ${{ matrix.os }}
123+ if : ${{ !startsWith(github.ref, 'refs/tags/') }}
17124 strategy :
18125 fail-fast : false
19126 matrix :
@@ -366,7 +473,7 @@ jobs:
366473 release :
367474 name : Release
368475 runs-on : ubuntu-latest
369- needs : build
476+ needs : build-windows-release
370477 if : startsWith(github.ref, 'refs/tags/')
371478 permissions :
372479 contents : write
0 commit comments