fix linux archive

This commit is contained in:
Michael Yang 2025-02-03 15:12:54 -08:00
parent 669dc31cf3
commit f9d2d89135
2 changed files with 7 additions and 10 deletions

View File

@ -326,7 +326,7 @@ jobs:
PLATFORM: ${{ matrix.os }}/${{ matrix.arch }} PLATFORM: ${{ matrix.os }}/${{ matrix.arch }}
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: dist-${{ matrix.os }}-${{ matrix.arch }} name: dist-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.target }}
path: | path: |
dist/*.tgz dist/*.tgz
@ -391,9 +391,6 @@ jobs:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ github.token }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set Version
shell: bash
run: |
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
name: dist-darwin name: dist-darwin
@ -406,11 +403,9 @@ jobs:
with: with:
pattern: dist-linux-* pattern: dist-linux-*
path: dist path: dist
- run: | merge-multiple: true
ls -lh dist/ - run: find . -type f -not -name 'sha256sum.txt' | xargs sha256sum | tee sha256sum.txt
(cd dist; find . -type f | xargs sha256sum > ../sha256sum.txt) working-directory: dist
mv sha256sum.txt dist/
cat dist/sha256sum.txt
- name: Create or update Release - name: Create or update Release
run: | run: |
RELEASE_VERSION=$(echo ${GITHUB_REF_NAME} | cut -f1 -d-)" RELEASE_VERSION=$(echo ${GITHUB_REF_NAME} | cut -f1 -d-)"

View File

@ -34,7 +34,8 @@ _build_darwin() {
-DCMAKE_OSX_ARCHITECTURES=x86_64 \ -DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.3 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.3
cmake --build build/darwin-$ARCH --target ggml-cpu -j cmake --build build/darwin-$ARCH --target ggml-cpu -j
install build/darwin-$ARCH/lib/ollama/*.{dylib,so} $INSTALL_PREFIX install -d $INSTALL_PREFIX/lib/ollama
install build/darwin-$ARCH/lib/ollama/*.{dylib,so} $INSTALL_PREFIX/lib/ollama
fi fi
done done
} }
@ -43,6 +44,7 @@ _sign_darwin() {
status "Creating universal binary..." status "Creating universal binary..."
mkdir -p dist/darwin mkdir -p dist/darwin
lipo -create -output dist/darwin/ollama dist/darwin-*/ollama lipo -create -output dist/darwin/ollama dist/darwin-*/ollama
chmod +x dist/darwin/ollama
if [ -n "$APPLE_IDENTITY" ]; then if [ -n "$APPLE_IDENTITY" ]; then
for F in dist/darwin/ollama dist/darwin-amd64/lib/ollama/*; do for F in dist/darwin/ollama dist/darwin-amd64/lib/ollama/*; do