Skip to content

Commit d2b26f8

Browse files
committed
Merge branch 'main' into Linters
2 parents 6fd538c + 4744551 commit d2b26f8

29 files changed

+1774
-2186
lines changed

.github/workflows/build-and-release.yaml

+39-9
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,28 @@ jobs:
2121
# Used to host cibuildwheel
2222
- uses: actions/setup-python@v5
2323
with:
24-
python-version: "3.8"
24+
python-version: "3.9"
2525

26-
- name: Install dependencies
26+
- name: Install dependencies (Linux/MacOS)
27+
if: runner.os != 'Windows'
2728
run: |
2829
python -m pip install --upgrade pip
29-
python -m pip install -e .[all]
30+
python -m pip install uv
31+
RUST_LOG=trace python -m uv pip install -e .[all] --verbose
32+
shell: bash
33+
34+
- name: Install dependencies (Windows)
35+
if: runner.os == 'Windows'
36+
env:
37+
RUST_LOG: trace
38+
run: |
39+
python -m pip install --upgrade pip
40+
python -m pip install uv
41+
python -m uv pip install -e .[all] --verbose
42+
shell: cmd
3043

3144
- name: Build wheels
32-
uses: pypa/cibuildwheel@v2.20.0
45+
uses: pypa/cibuildwheel@v2.21.1
3346
env:
3447
# disable repair
3548
CIBW_REPAIR_WHEEL_COMMAND: ""
@@ -56,7 +69,7 @@ jobs:
5669
platforms: linux/arm64
5770

5871
- name: Build wheels
59-
uses: pypa/cibuildwheel@v2.20.0
72+
uses: pypa/cibuildwheel@v2.21.1
6073
env:
6174
CIBW_SKIP: "*musllinux* pp*"
6275
CIBW_REPAIR_WHEEL_COMMAND: ""
@@ -79,16 +92,33 @@ jobs:
7992
- uses: actions/checkout@v4
8093
with:
8194
submodules: "recursive"
95+
8296
- uses: actions/setup-python@v5
8397
with:
84-
python-version: "3.8"
85-
- name: Install dependencies
98+
python-version: "3.9"
99+
100+
- name: Install dependencies (Linux/MacOS)
101+
if: runner.os != 'Windows'
86102
run: |
87-
python -m pip install --upgrade pip build
88-
python -m pip install -e .[all]
103+
python -m pip install --upgrade pip
104+
python -m pip install uv
105+
RUST_LOG=trace python -m uv pip install -e .[all] --verbose
106+
shell: bash
107+
108+
- name: Install dependencies (Windows)
109+
if: runner.os == 'Windows'
110+
env:
111+
RUST_LOG: trace
112+
run: |
113+
python -m pip install --upgrade pip
114+
python -m pip install uv
115+
python -m uv pip install -e .[all] --verbose
116+
shell: cmd
117+
89118
- name: Build source distribution
90119
run: |
91120
python -m build --sdist
121+
92122
- uses: actions/upload-artifact@v4
93123
with:
94124
name: sdist

.github/workflows/build-wheels-cuda.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
$matrix = @{
2323
'os' = @('ubuntu-latest', 'windows-2019')
2424
'pyver' = @("3.9", "3.10", "3.11", "3.12")
25-
'cuda' = @("12.1.1", "12.2.2", "12.3.2", "12.4.1")
25+
'cuda' = @("12.1.1", "12.2.2", "12.3.2", "12.4.1", "12.5.0")
2626
'releasetag' = @("basic")
2727
}
2828
@@ -72,7 +72,7 @@ jobs:
7272
- name: VS Integration Cache
7373
id: vs-integration-cache
7474
if: runner.os == 'Windows'
75-
uses: actions/cache@v4.0.2
75+
uses: actions/cache@v4
7676
with:
7777
path: ./MSBuildExtensions
7878
key: cuda-${{ matrix.cuda }}-vs-integration

.github/workflows/build-wheels-metal.yaml

+16-3
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,27 @@ jobs:
2323
with:
2424
python-version: "3.12"
2525
cache: 'pip'
26+
27+
- name: Install dependencies (Linux/MacOS)
28+
if: runner.os != 'Windows'
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install uv
32+
RUST_LOG=trace python -m uv pip install -e .[all] --verbose
33+
shell: bash
2634

27-
- name: Install dependencies
35+
- name: Install dependencies (Windows)
36+
if: runner.os == 'Windows'
37+
env:
38+
RUST_LOG: trace
2839
run: |
2940
python -m pip install --upgrade pip
30-
python -m pip install -e .[all]
41+
python -m pip install uv
42+
python -m uv pip install -e .[all] --verbose
43+
shell: cmd
3144

3245
- name: Build wheels
33-
uses: pypa/cibuildwheel@v2.20.0
46+
uses: pypa/cibuildwheel@v2.21.1
3447
env:
3548
# disable repair
3649
CIBW_REPAIR_WHEEL_COMMAND: ""

.github/workflows/generate-index-from-release.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,16 @@ jobs:
3535
- name: Setup Pages
3636
uses: actions/configure-pages@v5
3737
- name: Build
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3840
run: |
41+
./scripts/get-releases.sh
3942
./scripts/releases-to-pep-503.sh index/whl/cpu '^[v]?[0-9]+\.[0-9]+\.[0-9]+$'
4043
./scripts/releases-to-pep-503.sh index/whl/cu121 '^[v]?[0-9]+\.[0-9]+\.[0-9]+-cu121$'
4144
./scripts/releases-to-pep-503.sh index/whl/cu122 '^[v]?[0-9]+\.[0-9]+\.[0-9]+-cu122$'
4245
./scripts/releases-to-pep-503.sh index/whl/cu123 '^[v]?[0-9]+\.[0-9]+\.[0-9]+-cu123$'
4346
./scripts/releases-to-pep-503.sh index/whl/cu124 '^[v]?[0-9]+\.[0-9]+\.[0-9]+-cu124$'
47+
./scripts/releases-to-pep-503.sh index/whl/cu125 '^[v]?[0-9]+\.[0-9]+\.[0-9]+-cu125$'
4448
./scripts/releases-to-pep-503.sh index/whl/metal '^[v]?[0-9]+\.[0-9]+\.[0-9]+-metal$'
4549
- name: Upload artifact
4650
uses: actions/upload-pages-artifact@v3

.github/workflows/publish-to-test.yaml

+21-3
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,42 @@ jobs:
1919
- uses: actions/checkout@v4
2020
with:
2121
submodules: "recursive"
22+
2223
- name: Set up Python
2324
uses: actions/setup-python@v5
2425
with:
2526
python-version: "3.11"
2627
cache: 'pip'
28+
2729
- name: Append Dev Version to __version__
2830
run: |
2931
DEV_VERSION=${{ github.event.inputs.dev_version }}
3032
CURRENT_VERSION=$(awk -F= '/__version__ =/ {print $2}' llama_cpp/__init__.py | tr -d ' "')
3133
NEW_VERSION="${CURRENT_VERSION}.dev${DEV_VERSION}"
3234
sed -i 's/__version__ = \".*\"/__version__ = \"'"${NEW_VERSION}"'\"/' llama_cpp/__init__.py
33-
- name: Install dependencies
35+
36+
- name: Install dependencies (Linux/MacOS)
37+
if: runner.os != 'Windows'
3438
run: |
35-
python -m pip install --upgrade pip build
36-
python -m pip install -e .[all]
39+
python -m pip install --upgrade pip
40+
python -m pip install uv
41+
RUST_LOG=trace python -m uv pip install -e .[all] --verbose
42+
shell: bash
43+
44+
- name: Install dependencies (Windows)
45+
if: runner.os == 'Windows'
46+
env:
47+
RUST_LOG: trace
48+
run: |
49+
python -m pip install --upgrade pip
50+
python -m pip install uv
51+
python -m uv pip install -e .[all] --verbose
52+
shell: cmd
53+
3754
- name: Build source distribution
3855
run: |
3956
python -m build --sdist
57+
4058
- name: Publish to Test PyPI
4159
uses: pypa/gh-action-pypi-publish@release/v1
4260
with:

.github/workflows/publish.yaml

+20-3
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,34 @@ jobs:
1313
- uses: actions/checkout@v4
1414
with:
1515
submodules: "recursive"
16+
1617
- name: Set up Python
1718
uses: actions/setup-python@v5
1819
with:
1920
python-version: "3.9"
20-
- name: Install dependencies
21+
22+
- name: Install dependencies (Linux/MacOS)
23+
if: runner.os != 'Windows'
2124
run: |
22-
python -m pip install --upgrade pip build
23-
python -m pip install -e .[all]
25+
python -m pip install --upgrade pip
26+
python -m pip install uv
27+
RUST_LOG=trace python -m uv pip install -e .[all] --verbose
28+
shell: bash
29+
30+
- name: Install dependencies (Windows)
31+
if: runner.os == 'Windows'
32+
env:
33+
RUST_LOG: trace
34+
run: |
35+
python -m pip install --upgrade pip
36+
python -m pip install uv
37+
python -m uv pip install -e .[all] --verbose
38+
shell: cmd
39+
2440
- name: Build source distribution
2541
run: |
2642
python -m build --sdist
43+
2744
- name: Publish distribution to PyPI
2845
# TODO: move to tag based releases
2946
# if: startsWith(github.ref, 'refs/tags')

.github/workflows/test-pypi.yaml

+52-7
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,25 @@ jobs:
1616
with:
1717
python-version: ${{ matrix.python-version }}
1818
cache: 'pip'
19-
- name: Install dependencies
19+
20+
- name: Install dependencies (Linux/MacOS)
21+
if: runner.os != 'Windows'
22+
run: |
23+
python -m pip install --upgrade pip
24+
python -m pip install uv
25+
RUST_LOG=trace python -m uv pip install llama-cpp-python[all] --verbose
26+
shell: bash
27+
28+
- name: Install dependencies (Windows)
29+
if: runner.os == 'Windows'
30+
env:
31+
RUST_LOG: trace
2032
run: |
2133
python -m pip install --upgrade pip
22-
python -m pip install --verbose llama-cpp-python[all]
34+
python -m pip install uv
35+
python -m uv pip install llama-cpp-python[all] --verbose
36+
shell: cmd
37+
2338
- name: Test with pytest
2439
run: |
2540
python -c "import llama_cpp"
@@ -37,10 +52,25 @@ jobs:
3752
with:
3853
python-version: ${{ matrix.python-version }}
3954
cache: 'pip'
40-
- name: Install dependencies
55+
56+
- name: Install dependencies (Linux/MacOS)
57+
if: runner.os != 'Windows'
58+
run: |
59+
python -m pip install --upgrade pip
60+
python -m pip install uv
61+
RUST_LOG=trace python -m uv pip install llama-cpp-python[all] --verbose
62+
shell: bash
63+
64+
- name: Install dependencies (Windows)
65+
if: runner.os == 'Windows'
66+
env:
67+
RUST_LOG: trace
4168
run: |
4269
python -m pip install --upgrade pip
43-
python -m pip install --verbose llama-cpp-python[all]
70+
python -m pip install uv
71+
python -m uv pip install llama-cpp-python[all] --verbose
72+
shell: cmd
73+
4474
- name: Test with pytest
4575
run: |
4676
python -c "import llama_cpp"
@@ -57,11 +87,26 @@ jobs:
5787
uses: actions/setup-python@v5
5888
with:
5989
python-version: ${{ matrix.python-version }}
60-
cache: 'pip'
61-
- name: Install dependencies
90+
cache: 'pip'
91+
92+
- name: Install dependencies (Linux/MacOS)
93+
if: runner.os != 'Windows'
94+
run: |
95+
python -m pip install --upgrade pip
96+
python -m pip install uv
97+
RUST_LOG=trace python -m uv pip install llama-cpp-python[all] --verbose
98+
shell: bash
99+
100+
- name: Install dependencies (Windows)
101+
if: runner.os == 'Windows'
102+
env:
103+
RUST_LOG: trace
62104
run: |
63105
python -m pip install --upgrade pip
64-
python -m pip install --verbose llama-cpp-python[all]
106+
python -m pip install uv
107+
python -m uv pip install llama-cpp-python[all] --verbose
108+
shell: cmd
109+
65110
- name: Test with pytest
66111
run: |
67112
python -c "import llama_cpp"

0 commit comments

Comments
 (0)