2023-06-09 20:52:40 +00:00
|
|
|
name: Tests for PyPI package
|
|
|
|
|
2023-06-09 21:08:42 +00:00
|
|
|
on: workflow_dispatch
|
2023-06-09 20:52:40 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-linux:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-06-13 14:19:57 +00:00
|
|
|
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
2023-06-09 20:52:40 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2024-04-30 02:52:23 +00:00
|
|
|
uses: actions/setup-python@v5
|
2023-06-09 20:52:40 +00:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2024-06-13 14:19:57 +00:00
|
|
|
cache: 'pip'
|
2023-06-09 20:52:40 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2024-06-13 14:19:57 +00:00
|
|
|
python -m pip install --upgrade pip
|
|
|
|
python -m pip install --verbose llama-cpp-python[all]
|
2023-06-09 20:52:40 +00:00
|
|
|
- name: Test with pytest
|
|
|
|
run: |
|
2024-06-13 14:19:57 +00:00
|
|
|
python -c "import llama_cpp"
|
2023-06-09 20:52:40 +00:00
|
|
|
|
|
|
|
build-windows:
|
|
|
|
|
|
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-06-13 14:19:57 +00:00
|
|
|
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
2023-06-09 20:52:40 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2024-04-30 02:52:23 +00:00
|
|
|
uses: actions/setup-python@v5
|
2023-06-09 20:52:40 +00:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2024-06-13 14:19:57 +00:00
|
|
|
cache: 'pip'
|
2023-06-09 20:52:40 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2024-06-13 14:19:57 +00:00
|
|
|
python -m pip install --upgrade pip
|
|
|
|
python -m pip install --verbose llama-cpp-python[all]
|
2023-06-09 20:52:40 +00:00
|
|
|
- name: Test with pytest
|
|
|
|
run: |
|
2024-06-13 14:19:57 +00:00
|
|
|
python -c "import llama_cpp"
|
2023-06-09 20:52:40 +00:00
|
|
|
|
|
|
|
build-macos:
|
|
|
|
|
|
|
|
runs-on: macos-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-06-13 14:19:57 +00:00
|
|
|
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
2023-06-09 20:52:40 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2024-04-30 02:52:23 +00:00
|
|
|
uses: actions/setup-python@v5
|
2023-06-09 20:52:40 +00:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2024-06-13 14:19:57 +00:00
|
|
|
cache: 'pip'
|
2023-06-09 20:52:40 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2024-06-13 14:19:57 +00:00
|
|
|
python -m pip install --upgrade pip
|
|
|
|
python -m pip install --verbose llama-cpp-python[all]
|
2023-06-09 20:52:40 +00:00
|
|
|
- name: Test with pytest
|
|
|
|
run: |
|
2024-06-13 14:19:57 +00:00
|
|
|
python -c "import llama_cpp"
|