fix ci for cuda build

This commit is contained in:
fkunn1326
2024-09-14 09:25:24 +09:00
parent 3215fb7470
commit 28b327bbc4
2 changed files with 17 additions and 3 deletions

View File

@ -4,9 +4,7 @@
name: Swift Build and Test
on:
push:
branches: [ "main", "develop" ]
pull_request:
branches: [ "main", "develop" ]
jobs:
macos-build:
@ -59,9 +57,25 @@ jobs:
github-repo: thebrowsercompany/swift-build
release-asset-name: installer-amd64.exe
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: Jimver/cuda-toolkit@v0.2.16
id: cuda-toolkit
with:
cuda: '12.4.0'
- uses: actions/checkout@v4
with:
submodules: true
- name: Clone llama.cpp
run: git clone -b ku-nlp/gpt2-japanese-char https://github.com/fkunn1326/llama.cpp.git
- name: Build llama.cpp
run: |
cmake -B build -DBUILD_SHARED_LIBS=ON -DLLAMA_CUDA=ON
cmake --build build --config Release
working-directory: ./llama.cpp
- name: Copy built files
run: |
cp ./build/bin/Release/llama.dll ../
cp ./build/Release/llama.lib ../
working-directory: ./llama.cpp
- name: Build
run: swift build -Xswiftc -strict-concurrency=complete -v
- name: Run tests