Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a7aa7d9

Browse filesBrowse files
committed
gha: use matrix strategy, install with poetry
1 parent 91bf8fa commit a7aa7d9
Copy full SHA for a7aa7d9

File tree

Expand file treeCollapse file tree

2 files changed

+15
-95
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+15
-95
lines changed

‎.github/workflows/test-pypi.yaml

Copy file name to clipboardExpand all lines: .github/workflows/test-pypi.yaml
+6-44Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,13 @@ name: Tests for PyPI package
33
on: workflow_dispatch
44

55
jobs:
6-
build-linux:
7-
8-
runs-on: ubuntu-latest
9-
strategy:
10-
matrix:
11-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
12-
13-
steps:
14-
- name: Set up Python ${{ matrix.python-version }}
15-
uses: actions/setup-python@v4
16-
with:
17-
python-version: ${{ matrix.python-version }}
18-
- name: Install dependencies
19-
run: |
20-
python3 -m pip install --upgrade pip
21-
python3 -m pip install --verbose llama-cpp-python[server,test]
22-
- name: Test with pytest
23-
run: |
24-
python3 -c "import llama_cpp"
25-
26-
build-windows:
27-
28-
runs-on: windows-latest
6+
pypi-packages-tests:
7+
name: ${{ matrix.python-version }} // ${{ matrix.os }}
8+
runs-on: ${{ matrix.os }}
299
strategy:
10+
fail-fast: false
3011
matrix:
12+
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
3113
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
3214

3315
steps:
@@ -39,26 +21,6 @@ jobs:
3921
run: |
4022
python3 -m pip install --upgrade pip
4123
python3 -m pip install --verbose llama-cpp-python[server,test]
42-
- name: Test with pytest
24+
- name: Test import
4325
run: |
4426
python3 -c "import llama_cpp"
45-
46-
build-macos:
47-
48-
runs-on: macos-latest
49-
strategy:
50-
matrix:
51-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
52-
53-
steps:
54-
- name: Set up Python ${{ matrix.python-version }}
55-
uses: actions/setup-python@v4
56-
with:
57-
python-version: ${{ matrix.python-version }}
58-
- name: Install dependencies
59-
run: |
60-
python3 -m pip install --upgrade pip
61-
python3 -m pip install --verbose llama-cpp-python[server,test]
62-
- name: Test with pytest
63-
run: |
64-
python3 -c "import llama_cpp"

‎.github/workflows/test.yaml

Copy file name to clipboardExpand all lines: .github/workflows/test.yaml
+9-51Lines changed: 9 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,13 @@ on:
99
- main
1010

1111
jobs:
12-
build-linux:
13-
14-
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
18-
19-
steps:
20-
- uses: actions/checkout@v3
21-
with:
22-
submodules: "true"
23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v4
25-
with:
26-
python-version: ${{ matrix.python-version }}
27-
- name: Install dependencies
28-
run: |
29-
python -m pip install --upgrade pip pytest cmake scikit-build setuptools fastapi sse-starlette httpx uvicorn pydantic-settings
30-
pip install . -v
31-
- name: Test with pytest
32-
run: |
33-
pytest
34-
35-
build-windows:
36-
37-
runs-on: windows-latest
12+
tests:
13+
name: ${{ matrix.python-version }} // ${{ matrix.os }}
14+
runs-on: ${{ matrix.os }}
3815
strategy:
16+
fail-fast: false
3917
matrix:
18+
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
4019
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
4120

4221
steps:
@@ -47,33 +26,12 @@ jobs:
4726
uses: actions/setup-python@v4
4827
with:
4928
python-version: ${{ matrix.python-version }}
50-
- name: Install dependencies
51-
run: |
52-
python -m pip install --upgrade pip pytest cmake scikit-build setuptools fastapi sse-starlette httpx uvicorn pydantic-settings
53-
pip install . -v
54-
- name: Test with pytest
55-
run: |
56-
pytest
57-
58-
build-macos:
59-
60-
runs-on: macos-latest
61-
strategy:
62-
matrix:
63-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
6429

65-
steps:
66-
- uses: actions/checkout@v3
67-
with:
68-
submodules: "true"
69-
- name: Set up Python ${{ matrix.python-version }}
70-
uses: actions/setup-python@v4
71-
with:
72-
python-version: ${{ matrix.python-version }}
7330
- name: Install dependencies
7431
run: |
75-
python -m pip install --upgrade pip pytest cmake scikit-build setuptools fastapi sse-starlette httpx uvicorn pydantic-settings
76-
pip install . -v
32+
python -m pip install --upgrade pip poetry
33+
poetry install --no-root
34+
poetry run pip install '.[server,test]'
7735
- name: Test with pytest
7836
run: |
79-
pytest
37+
poetry run pytest

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.