Skip to content

Commit 20607fd

Browse files
authored
feat: add vulkan build (#105)
* feat: add vulkan build
1 parent b494575 commit 20607fd

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

.github/workflows/menlo-build.yml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ on:
2323
]
2424
workflow_dispatch:
2525

26+
env:
27+
VULKAN_VERSION: 1.3.261.1
28+
2629
jobs:
2730
create-draft-release:
2831
runs-on: ubuntu-latest
@@ -144,7 +147,15 @@ jobs:
144147
run-e2e: false
145148
vulkan: false
146149
ccache: true
147-
ccache-dir: "/home/runner/.ccache"
150+
ccache-dir: "/home/runner/.ccache"
151+
- os: "linux"
152+
name: "vulkan-x64"
153+
runs-on: "ubuntu-22-04"
154+
cmake-flags: "-DBUILD_SHARED_LIBS=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_VULKAN=ON -DLLAMA_CURL=OFF -DGGML_NATIVE=OFF -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE='Release' -GNinja"
155+
run-e2e: false
156+
vulkan: true
157+
ccache: true
158+
ccache-dir: "/home/runner/.ccache"
148159
- os: "macos"
149160
name: "x64"
150161
runs-on: "macos-selfhosted-12"
@@ -257,6 +268,14 @@ jobs:
257268
vulkan: false
258269
ccache: false
259270
ccache-dir: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
271+
- os: "win"
272+
name: "vulkan-x64"
273+
runs-on: "windows-cuda-11-7"
274+
cmake-flags: "-DBUILD_SHARED_LIBS=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_VULKAN=ON -DLLAMA_CURL=OFF -DGGML_NATIVE=OFF -DCMAKE_BUILD_TYPE='Release' -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl -GNinja"
275+
vulkan: true
276+
run-e2e: false
277+
ccache: false
278+
ccache-dir: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
260279

261280

262281
steps:
@@ -320,6 +339,23 @@ jobs:
320339
if: runner.os == 'macOS'
321340
run: |
322341
brew install coreutils
342+
343+
- name: Prepare Vulkan SDK Linux
344+
if: ${{ matrix.vulkan && (matrix.os == 'linux') }}
345+
run: |
346+
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
347+
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
348+
sudo apt-get update -y
349+
sudo apt-get install -y build-essential vulkan-sdk
350+
351+
- name: Prepare Vulkan SDK Windows
352+
if: ${{ matrix.vulkan && (matrix.os == 'win') }}
353+
# continue-on-error: true
354+
run: |
355+
curl.exe -o $env:RUNNER_TEMP/VulkanSDK-Installer.exe -L "https://sdk.lunarg.com/sdk/download/${env:VULKAN_VERSION}/windows/VulkanSDK-${env:VULKAN_VERSION}-Installer.exe"
356+
& "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install
357+
Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\${env:VULKAN_VERSION}"
358+
Add-Content $env:GITHUB_PATH "C:\VulkanSDK\${env:VULKAN_VERSION}\bin"
323359
324360
- name: Get Cer for code signing
325361
if: runner.os == 'macOS'

0 commit comments

Comments
 (0)