fix build
This commit is contained in:
parent
d4d338c224
commit
669dc31cf3
32
.github/workflows/release.yaml
vendored
32
.github/workflows/release.yaml
vendored
@ -273,6 +273,8 @@ jobs:
|
|||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
- run: |
|
- run: |
|
||||||
& .\scripts\build_windows.ps1 gatherDependencies sign buildInstaller distZip
|
& .\scripts\build_windows.ps1 gatherDependencies sign buildInstaller distZip
|
||||||
|
env:
|
||||||
|
KEY_CONTAINER: ${{ vars.KEY_CONTAINER }}
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: dist-windows
|
name: dist-windows
|
||||||
@ -286,10 +288,13 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: linux
|
- os: linux
|
||||||
arch: amd64
|
arch: amd64
|
||||||
targets: 'archive rocm'
|
target: archive
|
||||||
|
- os: linux
|
||||||
|
arch: amd64
|
||||||
|
target: rocm
|
||||||
- os: linux
|
- os: linux
|
||||||
arch: arm64
|
arch: arm64
|
||||||
targets: archive
|
target: archive
|
||||||
runs-on: ${{ matrix.arch == 'arm64' && format('{0}-{1}', matrix.os, matrix.arch) || matrix.os }}
|
runs-on: ${{ matrix.arch == 'arm64' && format('{0}-{1}', matrix.os, matrix.arch) || matrix.os }}
|
||||||
environment: release
|
environment: release
|
||||||
needs: setup-environment
|
needs: setup-environment
|
||||||
@ -300,15 +305,30 @@ jobs:
|
|||||||
- uses: docker/setup-buildx-action@v3
|
- uses: docker/setup-buildx-action@v3
|
||||||
- run: |
|
- run: |
|
||||||
sudo apt-get update && sudo apt-get install pigz
|
sudo apt-get update && sudo apt-get install pigz
|
||||||
for TARGET in ${{ matrix.targets }}; do docker buildx build --platform $PLATFORM --target $TARGET --build-arg GOFLAGS --build-arg CGO_CFLAGS --build-arg CGO_CXXFLAGS --output type=local,dest=dist/$PLATFORM .; done
|
docker buildx build --platform $PLATFORM --target ${{ matrix.target }} --build-arg GOFLAGS --build-arg CGO_CFLAGS --build-arg CGO_CXXFLAGS --output type=local,dest=dist/$PLATFORM .
|
||||||
tar c -C dist/$PLATFORM . | pigz -9cv >dist/ollama-${PLATFORM//\//-}.tgz
|
|
||||||
|
for COMPONENTS in dist/$PLATFORM/* dist/$PLATFORM/lib/ollama/*; do
|
||||||
|
if [ -d "$COMPONENTS" ]; then
|
||||||
|
case "$COMPONENTS" in
|
||||||
|
*/bin) echo $COMPONENTS >>dist/ollama-${PLATFORM//\//-}.tar.in ;;
|
||||||
|
*/lib/ollama) echo $COMPONENTS >>dist/ollama-${PLATFORM//\//-}.tar.in;;
|
||||||
|
*/lib/ollama/cuda_v11) echo $COMPONENTS >>dist/ollama-${PLATFORM//\//-}.tar.in;;
|
||||||
|
*/lib/ollama/cuda_v12) echo $COMPONENTS >>dist/ollama-${PLATFORM//\//-}.tar.in;;
|
||||||
|
*/lib/ollama/cuda_jetpack5) echo $COMPONENTS >>dist/ollama-${PLATFORM//\//-}-jetpack5.tar.in ;;
|
||||||
|
*/lib/ollama/cuda_jetpack6) echo $COMPONENTS >>dist/ollama-${PLATFORM//\//-}-jetpack6.tar.in ;;
|
||||||
|
*/lib/ollama/rocm) echo $COMPONENTS >>dist/ollama-${PLATFORM//\//-}-rocm.tar.in ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for ARCHIVE in dist/*.tar.in; do tar c -T $ARCHIVE --strip-components 3 | pigz -9cv >${ARCHIVE//.*/}.tgz; done
|
||||||
env:
|
env:
|
||||||
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 }}
|
||||||
path: |
|
path: |
|
||||||
dist/ollama-${{ matrix.os }}-${{ matrix.arch }}.tgz
|
dist/*.tgz
|
||||||
|
|
||||||
docker-build:
|
docker-build:
|
||||||
strategy:
|
strategy:
|
||||||
@ -320,7 +340,7 @@ jobs:
|
|||||||
CGO_CFLAGS
|
CGO_CFLAGS
|
||||||
CGO_CXXFLAGS
|
CGO_CXXFLAGS
|
||||||
GOFLAGS
|
GOFLAGS
|
||||||
- flavor: 'latest=false,suffix=rocm'
|
- flavor: 'latest=false,suffix=-rocm'
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
build-args: |
|
build-args: |
|
||||||
CGO_CFLAGS
|
CGO_CFLAGS
|
||||||
|
@ -52,7 +52,7 @@ _sign_darwin() {
|
|||||||
# create a temporary zip for notarization
|
# create a temporary zip for notarization
|
||||||
TEMP=$(mktemp -u).zip
|
TEMP=$(mktemp -u).zip
|
||||||
ditto -c -k --keepParent dist/darwin/ollama "$TEMP"
|
ditto -c -k --keepParent dist/darwin/ollama "$TEMP"
|
||||||
xcrun notarytool submit dist/darwin/temp.zip --wait --timeout 10m --apple-id $APPLE_ID --password $APPLE_PASSWORD --team-id $APPLE_TEAM_ID
|
xcrun notarytool submit "$TEMP" --wait --timeout 10m --apple-id $APPLE_ID --password $APPLE_PASSWORD --team-id $APPLE_TEAM_ID
|
||||||
rm -f "$TEMP"
|
rm -f "$TEMP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user