cffi/ctypes wrappers #42
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.python }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-24.04] | |
# arch: [x86_64, aarch64] | |
arch: [x86_64] | |
python: [cp310, cp311, cp312] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
# - name: Set up QEMU | |
# if: matrix.arch == 'aarch64' | |
# uses: docker/setup-qemu-action@v3 | |
# with: | |
# platforms: arm64 | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# - name: Build wheels | |
# uses: pypa/cibuildwheel@v2.19.1 | |
# env: | |
# CIBW_ARCHS: ${{ matrix.arch }} | |
# CIBW_BUILD: ${{ matrix.python }}-* | |
# CIBW_SKIP_PYTHON_COMPATIBILITY_CHECK: 1 | |
# CIBW_BEFORE_BUILD: "pip install poetry && poetry run build-llama-cpp && poetry build" | |
# CIBW_BUILD_VERBOSITY: 1 | |
# CIBW_REPAIR_WHEEL_COMMAND: "" | |
- name: Install dependencies | |
env: | |
CIBW_ARCHS: ${{ matrix.arch }} | |
CIBW_BUILD: ${{ matrix.python }}-* | |
CIBW_SKIP_PYTHON_COMPATIBILITY_CHECK: 1 | |
CIBW_BUILD_VERBOSITY: 1 | |
CIBW_REPAIR_WHEEL_COMMAND: "" | |
run: | | |
python -m venv venv | |
source venv/bin/activate | |
pip install --upgrade pip | |
pip install poetry | |
poetry install --with dev | |
ls -l venv/bin/ | |
poetry run build-llama-cpp | |
poetry build | |
ls -l venv/bin/ | |
python -m cibuildwheel --output-dir wheelhouse | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.python }} | |
path: ./wheelhouse/*.whl | |
collect_wheels: | |
name: Collect all wheels | |
needs: build_wheels | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: ./wheelhouse | |
pattern: wheels-* | |
merge-multiple: true | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: all-wheels | |
path: ./wheelhouse/*.whl |