build-cpu-wheel-hf #9
This file contains hidden or 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-cpu-wheel-hf | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: ["v*"] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: v0.2.90 | |
| submodules: recursive | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install cibuildwheel | |
| run: | | |
| python -m pip install -U pip | |
| python -m pip install -U cibuildwheel | |
| - name: Build wheel (CPU only, static build) | |
| env: | |
| CIBW_BUILD: "cp310-manylinux_x86_64" | |
| CIBW_SKIP: "*-musllinux_*" | |
| CIBW_BUILD_VERBOSITY: 1 | |
| CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | |
| # Build everything statically to avoid separate .so files | |
| CIBW_ENVIRONMENT_LINUX: >- | |
| CMAKE_ARGS="-DGGML_CUDA=OFF -DGGML_METAL=OFF -DGGML_VULKAN=OFF -DGGML_BLAS=OFF -DGGML_NATIVE=OFF -DBUILD_SHARED_LIBS=OFF -DLLAMA_BUILD_SHARED=OFF" | |
| run: | | |
| python -m cibuildwheel --output-dir wheelhouse | |
| - name: Show wheel info | |
| run: | | |
| ls -lh wheelhouse/ | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheelhouse | |
| path: wheelhouse/*.whl | |
| - name: Upload to Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: wheelhouse/*.whl |