Skip to content

Commit 19ef0ae

Browse files
committed
fix(build): update Windows setup conditions and streamline Vulkan package installation
1 parent 07db5c9 commit 19ef0ae

1 file changed

Lines changed: 12 additions & 19 deletions

File tree

.github/workflows/main.yml

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
echo "basekit-url=$BASEKIT_URL_HASH" >> $GITHUB_OUTPUT
102102
103103
- uses: msys2/setup-msys2@v2.27.0
104-
if: matrix.os == 'windows-latest'
104+
if: matrix.name == 'windows'
105105
with:
106106
msystem: mingw64
107107
install: >-
@@ -110,12 +110,12 @@ jobs:
110110
sqlite
111111
mingw-w64-x86_64-cc
112112
mingw-w64-x86_64-cmake
113-
${{ matrix.name != 'windows-gpu' && 'mingw-w64-x86_64-vulkan-headers' || '' }}
114-
${{ matrix.name != 'windows-gpu' && 'mingw-w64-x86_64-vulkan-loader' || '' }}
115-
${{ matrix.name != 'windows-gpu' && 'mingw-w64-x86_64-shaderc' || '' }}
116-
${{ matrix.name != 'windows-gpu' && 'mingw-w64-x86_64-openblas' || '' }}
117-
${{ matrix.name != 'windows-gpu' && 'mingw-w64-x86_64-opencl-headers' || '' }}
118-
${{ matrix.name != 'windows-gpu' && 'mingw-w64-x86_64-opencl-icd' || '' }}
113+
mingw-w64-x86_64-vulkan-headers
114+
mingw-w64-x86_64-vulkan-loader
115+
mingw-w64-x86_64-shaderc
116+
mingw-w64-x86_64-openblas
117+
mingw-w64-x86_64-opencl-headers
118+
mingw-w64-x86_64-opencl-icd
119119
120120
- name: linux install openblas and opencl
121121
if: matrix.name == 'linux'
@@ -152,18 +152,7 @@ jobs:
152152
EOF
153153
154154
sudo apt-get update || true ;# Prevent failure due to missing URLs.
155-
156-
sudo apt-get install -y --no-install-recommends \
157-
build-essential \
158-
glslc \
159-
crossbuild-essential-arm64 \
160-
libvulkan-dev:arm64
161-
162-
- name: windows setup vulkan environment
163-
if: matrix.name == 'windows'
164-
run: |
165-
# MSYS2 Vulkan packages are already installed, just set up environment
166-
echo "VULKAN_SDK=C:/msys64/mingw64" >> $GITHUB_ENV
155+
sudo apt-get install -y --no-install-recommends build-essential glslc crossbuild-essential-arm64 libvulkan-dev:arm64
167156
168157
- name: cache cuda toolkit
169158
if: matrix.name == 'windows-gpu'
@@ -336,6 +325,8 @@ jobs:
336325
if: matrix.name == 'windows' && steps.cache-llama.outputs.cache-hit != 'true'
337326
shell: msys2 {0}
338327
run: make build/llama.cpp.stamp ${{ matrix.make && matrix.make || ''}}
328+
env:
329+
VULKAN_SDK: "C:/msys64/mingw64"
339330

340331
- name: build llama.cpp (mingw/unix)
341332
if: contains(matrix.os, 'windows') == false && steps.cache-llama.outputs.cache-hit != 'true'
@@ -362,6 +353,8 @@ jobs:
362353
if: matrix.name == 'windows' && steps.cache-whisper.outputs.cache-hit != 'true'
363354
shell: msys2 {0}
364355
run: make build/whisper.cpp.stamp ${{ matrix.make && matrix.make || ''}}
356+
env:
357+
VULKAN_SDK: "C:/msys64/mingw64"
365358

366359
- name: build whisper.cpp (mingw/unix)
367360
if: contains(matrix.os, 'windows') == false && steps.cache-whisper.outputs.cache-hit != 'true'

0 commit comments

Comments
 (0)