File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -173,3 +173,48 @@ jobs:
173173 VERSION : ${{ needs.create-release.outputs.version }}
174174 run : |
175175 gh release upload ${VERSION} mrbind-macos-$(uname -m).zip --clobber
176+
177+ build-windows :
178+ needs :
179+ - create-release
180+ runs-on : windows-2025
181+
182+ steps :
183+ - name : Checkout
184+ uses : actions/checkout@v6
185+ with :
186+ submodules : true
187+
188+ - name : Download and unpack LLVM
189+ env :
190+ LLVM_VERSION=22.1.8
191+ run : |
192+ curl.exe -fLO "https://github.com/llvm/llvm-project/releases/download/llvmorg-$LLVM_VERSION/clang+llvm-$LLVM_VERSION-x86_64-pc-windows-msvc.tar.xz"
193+ tar -xf "clang+llvm-$LLVM_VERSION-x86_64-pc-windows-msvc.tar.xz"
194+ mv "clang+llvm-$LLVM_VERSION-x86_64-pc-windows-msvc" C:\clang+llvm
195+ echo "C:\clang+llvm\bin" >> $env:GITHUB_PATH
196+
197+ - name : Patch LLVM
198+ if : false
199+ shell : bash
200+ run : |
201+ # more info: https://github.com/jklappenbach/cajeta/commit/17811cfd922f0715c68eb3459cd153760bc890f8
202+ expected="C:/Program Files/Microsoft Visual Studio/2022/Enterprise/DIA SDK/lib/amd64/diaguids.lib"
203+ actual="C:/Program Files/Microsoft Visual Studio/18/Enterprise/DIA SDK/lib/amd64/diaguids.lib"
204+ sed -i "s|${expected}|${actual}|" C:/clang+llvm/lib/cmake/llvm/LLVMExports.cmake
205+
206+ - name : Build
207+ run : |
208+ cmake -B build -G Ninja `
209+ -D Clang_DIR=C:\clang+llvm\lib\cmake\clang `
210+ -D CMAKE_BUILD_TYPE=Release `
211+ -D MRBIND_STATIC_BUILD=ON `
212+ -D CMAKE_C_COMPILER=clang `
213+ -D CMAKE_CXX_COMPILER=clang++ `
214+ -D CMAKE_RC_COMPILER=llvm-rc
215+ cmake --build build --parallel $env:NUMBER_OF_PROCESSORS
216+
217+ - name : Verify build
218+ run : |
219+ ls build\mrbind*.exe
220+ llvm-readobj --needed-libs build\mrbind*.exe
You can’t perform that action at this time.
0 commit comments