Skip to content

Commit 8ff16e8

Browse files
committed
feat: add vulkan build
1 parent b494575 commit 8ff16e8

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

.github/workflows/menlo-build.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV && echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
3939
env:
4040
GITHUB_REF: ${{ github.ref }}
41+
VULKAN_VERSION: 1.3.261.1
4142
- name: Create Draft Release
4243
id: create_release
4344
uses: softprops/action-gh-release@v2
@@ -144,7 +145,15 @@ jobs:
144145
run-e2e: false
145146
vulkan: false
146147
ccache: true
147-
ccache-dir: "/home/runner/.ccache"
148+
ccache-dir: "/home/runner/.ccache"
149+
- os: "linux"
150+
name: "vulkan-x64"
151+
runs-on: "ubuntu-22-04"
152+
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"
153+
run-e2e: false
154+
vulkan: true
155+
ccache: true
156+
ccache-dir: "/home/runner/.ccache"
148157
- os: "macos"
149158
name: "x64"
150159
runs-on: "macos-selfhosted-12"
@@ -257,6 +266,14 @@ jobs:
257266
vulkan: false
258267
ccache: false
259268
ccache-dir: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
269+
- os: "win"
270+
name: "vulkan-x64"
271+
runs-on: "windows-cuda-11-7"
272+
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"
273+
vulkan: true
274+
run-e2e: false
275+
ccache: false
276+
ccache-dir: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
260277

261278

262279
steps:
@@ -320,6 +337,23 @@ jobs:
320337
if: runner.os == 'macOS'
321338
run: |
322339
brew install coreutils
340+
341+
- name: Prepare Vulkan SDK Linux
342+
if: ${{ matrix.vulkan && (matrix.os == 'linux') }}
343+
run: |
344+
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
345+
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
346+
sudo apt-get update -y
347+
sudo apt-get install -y build-essential vulkan-sdk
348+
349+
- name: Prepare Vulkan SDK Windows
350+
if: ${{ matrix.vulkan && (matrix.os == 'windows') }}
351+
continue-on-error: true
352+
run: |
353+
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"
354+
& "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install
355+
Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\${env:VULKAN_VERSION}"
356+
Add-Content $env:GITHUB_PATH "C:\VulkanSDK\${env:VULKAN_VERSION}\bin"
323357
324358
- name: Get Cer for code signing
325359
if: runner.os == 'macOS'

0 commit comments

Comments
 (0)