Repository navigation
Koboldcpp Linux OldPC #251
This file contains hidden or 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: Koboldcpp Linux OldPC | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| commit_hash: | |
| description: 'Optional commit hash to build from' | |
| required: false | |
| default: '' | |
| env: | |
| BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
| NOAVX2: 1 | |
| ARCHES_CU11: 1 | |
| KCPP_CUDA: 11.4.0 | |
| KCPP_PORTABLE: 1 | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-22.04 | |
| permissions: write-all | |
| container: | |
| image: ubuntu:20.04 | |
| options: --privileged | |
| steps: | |
| - name: Show runner hardware | |
| shell: bash | |
| run: | | |
| echo "::group::GitHub runner" | |
| echo "Name: ${RUNNER_NAME:-unknown}" | |
| echo "OS/architecture: ${RUNNER_OS:-unknown} / ${RUNNER_ARCH:-unknown}" | |
| echo "Image: ${ImageOS:-unknown} ${ImageVersion:-unknown}" | |
| echo "::endgroup::" | |
| echo "::group::Machine and operating system" | |
| uname -a | |
| for item in sys_vendor product_name product_version; do | |
| file="/sys/class/dmi/id/$item" | |
| if [ -r "$file" ]; then printf '%s: ' "$item"; cat "$file"; fi | |
| done | |
| echo "::endgroup::" | |
| echo "::group::CPU" | |
| if command -v lscpu >/dev/null 2>&1; then lscpu; else cat /proc/cpuinfo; fi | |
| echo "Online processors: $(getconf _NPROCESSORS_ONLN)" | |
| echo "::endgroup::" | |
| echo "::group::Memory" | |
| grep -E '^Mem(Total|Available|Free):' /proc/meminfo | |
| awk '/^MemTotal:/ { printf "RAM visible to the OS: %d KiB (%.2f GiB)\n", $2, $2 / 1048576 }' /proc/meminfo | |
| for file in /sys/fs/cgroup/memory.max /sys/fs/cgroup/memory/memory.limit_in_bytes; do | |
| if [ -r "$file" ]; then printf 'Cgroup memory limit (%s): ' "$file"; cat "$file"; fi | |
| done | |
| echo "::endgroup::" | |
| - name: Clone | |
| id: checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ inputs.commit_hash != '' && inputs.commit_hash || github.head_ref || github.ref_name }} | |
| - name: Show Commit Used | |
| run: | | |
| echo "Building from ref: ${{ inputs.commit_hash != '' && inputs.commit_hash || github.head_ref || github.ref_name }}" | |
| - name: Dependencies | |
| id: depends | |
| run: | | |
| apt-get update | |
| apt-get install -y sudo | |
| export DEBIAN_FRONTEND=noninteractive | |
| sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime | |
| echo "tzdata tzdata/Areas select Etc" | sudo debconf-set-selections | |
| echo "tzdata tzdata/Zones/Etc select UTC" | sudo debconf-set-selections | |
| sudo apt-get -y install git curl bzip2 python3-tk tcl tk | |
| - name: Set Tcl/Tk Paths | |
| run: | | |
| echo "TCL_LIBRARY=$(find /usr/lib/ -name 'tcl8*' | head -n 1)" >> $GITHUB_ENV | |
| echo "TK_LIBRARY=$(find /usr/lib/ -name 'tk8*' | head -n 1)" >> $GITHUB_ENV | |
| - name: Build | |
| id: make_build | |
| run: | | |
| ./koboldcpp.sh dist | |
| - name: Rename file before upload | |
| run: mv dist/koboldcpp-linux-x64-cuda1140 dist/koboldcpp-linux-x64-oldpc | |
| - name: Save artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: kcpp_linux_binary | |
| path: dist/ | |
| - name: Install GitHub CLI | |
| run: | | |
| apt-get update | |
| apt-get install -y curl | |
| curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \ | |
| | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg | |
| chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg | |
| echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \ | |
| | tee /etc/apt/sources.list.d/github-cli.list > /dev/null | |
| apt-get update | |
| apt-get install -y gh | |
| - name: Upload to GitHub Rolling Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload rolling dist/koboldcpp-linux-x64-oldpc --clobber --repo ${{ github.repository }} |