mirror of
https://github.com/abetlen/llama-cpp-python.git
synced 2026-03-26 07:21:25 +00:00
* Update build-wheels-cuda.yaml * Update build-wheels-cuda.yaml * revert * Bump pyhton from 3.8 to 3.9 * Remove python 3.8 * Remove Python 3.7 and 3.8 deprecated * Bump python from 3.8 to 3.9 * Add python 3.9 * Add python 3.9, remove macos-11 deprecated, add macos-14 * Bump python 3.8 to 3.9 * Add python 3.13 * Add python 3.13 * python 3.13 remove * remove python 3.13 * remove python 3.8 * Bump macos-13 to macos-14 * Update build-wheels-metal.yaml * Update build-wheels-metal.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-wheels-metal.yaml * Update generate-index-from-release.yaml Add avx, avx2 and avx512 * Update test.yaml * Update test-pypi.yaml * Update publish.yaml * Update publish-to-test.yaml * Update build-wheels-cuda.yaml Cuda with AVX2 by default * Update build-wheels-cuda.yaml * remove DEPRECATED 32 bits * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml Upgrade matrix os to latest version * Update build-wheels-metal.yaml * Update build-wheels-cuda.yaml * Update test.yaml * Update test-pypi.yaml * Update test.yaml Add cache: 'pip' * Update publish-to-test.yaml * Update build-wheels-metal.yaml Add cache: 'pip' * Update build-wheels-cuda.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-wheels-metal.yaml remove x86_64 * Update build-wheels-metal.yaml * Update build-and-release.yaml * Update build-wheels-metal.yaml * Update build-wheels-metal.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-wheels-metal.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-and-release.yaml * Update build-wheels-metal.yaml * revert * Remove cpu variants * Update build-wheels-metal.yaml * Update build-and-release.yaml * Update publish-to-test.yaml * Update build-and-release.yaml * Update build-wheels-metal.yaml * Update publish.yaml * Update test-pypi.yaml * Update test.yaml * Update build-and-release.yaml * Update build-wheels-metal.yaml * Update publish.yaml * Update test-pypi.yaml * Update publish-to-test.yaml * Update test.yaml * Update build-and-release.yaml * Update build-wheels-metal.yaml * Update publish-to-test.yaml * Update publish.yaml * Update test-pypi.yaml * Update test.yaml * Update test.yaml * Update build-and-release.yaml * Update publish-to-test.yaml * Update build-wheels-metal.yaml * Update test-pypi.yaml * Update test.yaml * Update build-and-release.yaml * Update build-wheels-metal.yaml * Update build-wheels-metal.yaml * Update publish.yaml * Update publish-to-test.yaml * Update test-pypi.yaml * Update test.yaml * Update build-wheels-cuda.yaml * Update generate-index-from-release.yaml * Update README.md * Update README.md * Update test.yaml --------- Co-authored-by: Andrei Betlen <abetlen@gmail.com>
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
# Based on: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
|
|
|
|
name: Publish to TestPyPI
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
dev_version:
|
|
description: 'Dev version N'
|
|
required: true
|
|
|
|
|
|
jobs:
|
|
build-n-publish:
|
|
name: Build and publish
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: "recursive"
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
cache: 'pip'
|
|
|
|
- name: Append Dev Version to __version__
|
|
run: |
|
|
DEV_VERSION=${{ github.event.inputs.dev_version }}
|
|
CURRENT_VERSION=$(awk -F= '/__version__ =/ {print $2}' llama_cpp/__init__.py | tr -d ' "')
|
|
NEW_VERSION="${CURRENT_VERSION}.dev${DEV_VERSION}"
|
|
sed -i 's/__version__ = \".*\"/__version__ = \"'"${NEW_VERSION}"'\"/' llama_cpp/__init__.py
|
|
|
|
- name: Install dependencies (Linux/MacOS)
|
|
if: runner.os != 'Windows'
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install uv
|
|
RUST_LOG=trace python -m uv pip install -e .[all] --verbose
|
|
shell: bash
|
|
|
|
- name: Install dependencies (Windows)
|
|
if: runner.os == 'Windows'
|
|
env:
|
|
RUST_LOG: trace
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install uv
|
|
python -m uv pip install -e .[all] --verbose
|
|
shell: cmd
|
|
|
|
- name: Build source distribution
|
|
run: |
|
|
python -m build --sdist
|
|
|
|
- name: Publish to Test PyPI
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
with:
|
|
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
repository-url: https://test.pypi.org/legacy/
|