name: Tests for PyPI package on: workflow_dispatch jobs: build-linux: runs-on: ubuntu-latest strategy: matrix: python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: 'pip' - name: Install dependencies run: | python -m pip install --upgrade pip python -m pip install --verbose llama-cpp-python[all] - name: Test with pytest run: | python -c "import llama_cpp" build-windows: runs-on: windows-latest strategy: matrix: python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: 'pip' - name: Install dependencies run: | python -m pip install --upgrade pip python -m pip install --verbose llama-cpp-python[all] - name: Test with pytest run: | python -c "import llama_cpp" build-macos: runs-on: macos-latest strategy: matrix: python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: 'pip' - name: Install dependencies run: | python -m pip install --upgrade pip python -m pip install --verbose llama-cpp-python[all] - name: Test with pytest run: | python -c "import llama_cpp"