File size: 1,553 Bytes
bd8cd88 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
name: Build wheel in Docker
on:
push:
branches:
- main
paths:
- 'Dockerfile-llama-cpp-wheel'
release:
types: [published]
jobs:
build:
runs-on: self-hosted
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build Docker image
run: docker build . -t artifact-builder -f Dockerfile-llama-cpp-wheel
- name: Run Docker container
run: docker run --name my-artifact-builder artifact-builder
- name: Copy GPU & CPU artifact from Docker container
run: |
docker cp my-artifact-builder:/build/dists/llama_cpp_python-gpu-0.1.50-cp38-cp38-linux_x86_64.whl ./llama_cpp_python-gpu-0.1.50-cp38-cp38-linux_x86_64.whl
docker cp my-artifact-builder:/build/dists/llama_cpp_python-cpu-0.1.50-cp38-cp38-linux_x86_64.whl ./llama_cpp_python-cpu-0.1.50-cp38-cp38-linux_x86_64.whl
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: wheels
path: |
*.whl
release:
needs: build
runs-on: self-hosted
if: github.event_name == 'release'
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: wheels
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
*.whl
token: ${{ secrets.GITHUB_TOKEN }} |