Build Test Koboldcpp-ROCm Windows #61
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Test Koboldcpp-ROCm Windows | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version tag of koboldcpp-rocm to build: v1.76.yr0-ROCm' | |
default: v1.76.yr0-ROCm | |
required: false | |
type: string | |
workflow_call: | |
inputs: | |
version: | |
description: 'Version tag of koboldcpp-rocm to build: v1.76.yr-ROCm' | |
default: v1.76.yr0-ROCm | |
required: false | |
type: string | |
permissions: | |
contents: write | |
jobs: | |
build_libs: | |
name: Build ROCm Lib | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: pwsh | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: 'YellowRoseCx/koboldcpp-rocm' | |
ref: Githubactionstest | |
submodules: 'recursive' | |
- name: Setup MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
install: >- | |
base-devel | |
mingw-w64-x86_64-toolchain | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10.11" | |
- name: Install Dependencies | |
run: | | |
python --version | |
python -m pip install cmake ninja | |
- name: Install LLVM and Clang | |
uses: KyleMayes/install-llvm-action@v2 | |
with: | |
version: "18.1.4" | |
force-url: "https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.4/LLVM-18.1.4-win64.exe" | |
- name: Install PyInstaller | |
run: pip --version | |
pip3 --version | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install pyinstaller==6.11.0 psutil | |
# Copy-Item 'D:\a\koboldcpp-rocm\koboldcpp-rocm\build\bin\koboldcpp_hipblas.dll' '..\..\build' | |
# build_wheel: | |
# name: Build ROCm | |
# runs-on: windows-latest | |
# needs: build_libs | |
# strategy: | |
# matrix: | |
# pyver: ["3.8", "3.9", "3.10", "3.11"] | |
# defaults: | |
# run: | |
# shell: pwsh | |
# env: | |
# PCKGVER: ${{ inputs.version }} | |
# steps: | |
# - uses: actions/checkout@v3 | |
# with: | |
# repository: 'YellowRoseCx/koboldcpp-rocm' | |
# ref: ${{ inputs.version }} | |
# - uses: actions/download-artifact@v3 | |
# with: | |
# name: 'win-rocm-lib' | |
# path: ./koboldcpp-rocm | |
# - uses: actions/setup-python@v3 | |
# with: | |
# python-version: ${{ matrix.pyver }} | |
# - name: Install Dependencies | |
# run: | | |
# python -m pip install build wheel cmake scikit-build ninja | |
# - name: Build Wheel | |
# run: | | |
# $packageVersion = [version]$env:PCKGVER.TrimStart('v') | |
# $setup = Get-Content 'setup.py' -raw | |
# if ($packageVersion -lt [version]'0.1.78') {$newsetup = $setup.Replace("packages=[`"llama_cpp`", `"llama_cpp.server`"],","packages=[`"llama_cpp`", `"llama_cpp.server`"],`n package_data={'llama_cpp': ['llama.dll']},")} | |
# if ($packageVersion -gt [version]'0.1.77') {$newsetup = $setup.Replace('package_data={"llama_cpp": ["py.typed"]},','package_data={"llama_cpp": ["py.typed", "llama.dll"]},')} | |
# New-Item 'setup.py' -itemType File -value $newsetup -force | |
# python setup.py --skip-cmake bdist_wheel egg_info --tag-build=+rocm5.5.1 | |
# - name: Upload files to a GitHub release | |
# id: upload-release | |
# uses: svenstaro/upload-release-action@2.6.1 | |
# continue-on-error: true | |
# with: | |
# file: ./dist/*.whl | |
# tag: rocm | |
# file_glob: true | |
# make_latest: false | |
# overwrite: true | |
# - uses: actions/upload-artifact@v3 | |
# if: steps.upload-release.outcome == 'failure' | |
# with: | |
# name: 'win-rocm-wheels' | |
# path: ./dist/*.whl |