From 21874ed653bd744ba5ce0d2549f3532f350d9f8e Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 18 Oct 2023 11:48:26 +0100 Subject: [PATCH] fix macos aarch64 release paths --- .github/workflows/ci.yml | 5 +++-- cht-llama-cpp/build-aarch64-apple-darwin.sh | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 302e4f8..9bb3c98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/cht-llama-cpp/build-aarch64-apple-darwin.sh b/cht-llama-cpp/build-aarch64-apple-darwin.sh index e4daa5c..dee77c1 100755 --- a/cht-llama-cpp/build-aarch64-apple-darwin.sh +++ b/cht-llama-cpp/build-aarch64-apple-darwin.sh @@ -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