Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Commit

Permalink
fix macos aarch64 release paths
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Oct 18, 2023
1 parent beb0aab commit 21874ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,13 @@ jobs:
./build-aarch64-apple-darwin.sh $(python -c 'import sys; print(".".join(map(str,sys.version_info[:2])))')
working-directory: ${{ matrix.model }}
- uses: actions/upload-artifact@v3
with: {path: dist/*}
with:
path: ${{ matrix.model }}/dist/*
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
name: Update release assets
run: |
tag="${GITHUB_REF#refs/tags/}"
gh release upload --clobber "${tag%%.*}" dist/*
gh release upload --clobber "${tag%%.*}" ${{ matrix.model }}/dist/*
env:
GH_TOKEN: ${{ github.token }}
pass: # convenient single job to apply branch protection to
Expand Down
4 changes: 2 additions & 2 deletions cht-llama-cpp/build-aarch64-apple-darwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ source ./venv/bin/activate
pip install -r requirements.txt pyinstaller
LLAMA_CPP_PATH=$(python -c 'import llama_cpp; print(llama_cpp.__path__[0])')
# macOS (dylib) package
NAME=mistral-${VERSION}-aarch64-apple-darwin
NAME=cht-llama-cpp-mistral-${VERSION}-aarch64-apple-darwin
pyinstaller --onefile \
--target-arch arm64 \
--add-binary "$LLAMA_CPP_PATH/libllama.dylib:llama_cpp" \
--name=$NAME \
--paths ./venv/lib/python${1:-3.11}/site-packages \
main.py
cp dist/$NAME dist/mistral-${VERSION%%.*}-aarch64-apple-darwin
cp dist/$NAME dist/cht-llama-cpp-mistral-${VERSION%%.*}-aarch64-apple-darwin

0 comments on commit 21874ed

Please sign in to comment.