diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bd1cff83..b2139b56 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -88,7 +88,7 @@ jobs: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.0 export PATH=$PATH:$GOPATH/bin export PATH=/usr/local/cuda/bin:$PATH - GO_TAGS=p2p GOOS=linux GOARCH=arm64 CMAKE_ARGS="-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++" DIST_SKIP_HIPBLAS=true make dist + GO_TAGS=p2p GOOS=linux GOARCH=arm64 CMAKE_ARGS="-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++" make dist-aarch64 - uses: actions/upload-artifact@v4 with: name: LocalAI-linux-aarch64 diff --git a/Makefile b/Makefile index d57c37c8..41bef790 100644 --- a/Makefile +++ b/Makefile @@ -324,13 +324,24 @@ build-api: dist: STATIC=true $(MAKE) backend-assets/grpc/llama-cpp-avx2 ifeq ($(OS),Darwin) - $(info ${GREEN}I Skip CUDA build on MacOS${RESET}) + $(info ${GREEN}I Skip CUDA/hipblas build on MacOS${RESET}) else $(MAKE) backend-assets/grpc/llama-cpp-cuda -ifneq ($(DIST_SKIP_HIPBLAS),true) $(MAKE) backend-assets/grpc/llama-cpp-hipblas endif + $(MAKE) build + mkdir -p release +# if BUILD_ID is empty, then we don't append it to the binary name +ifeq ($(BUILD_ID),) + cp $(BINARY_NAME) release/$(BINARY_NAME)-$(OS)-$(ARCH) + shasum -a 256 release/$(BINARY_NAME)-$(OS)-$(ARCH) > release/$(BINARY_NAME)-$(OS)-$(ARCH).sha256 +else + cp $(BINARY_NAME) release/$(BINARY_NAME)-$(BUILD_ID)-$(OS)-$(ARCH) + shasum -a 256 release/$(BINARY_NAME)-$(BUILD_ID)-$(OS)-$(ARCH) > release/$(BINARY_NAME)-$(BUILD_ID)-$(OS)-$(ARCH).sha256 endif + +dist-aarch64: + CMAKE_ARGS="$(CMAKE_ARGS) -DLLAMA_NATIVE=off" GRPC_BACKENDS="backend-assets/grpc/llama-cpp-fallback backend-assets/grpc/llama-cpp-cuda backend-assets/grpc/huggingface backend-assets/grpc/bert-embeddings backend-assets/grpc/llama-ggml backend-assets/grpc/llama-cpp-grpc backend-assets/util/llama-cpp-rpc-server backend-assets/grpc/gpt4all backend-assets/grpc/rwkv backend-assets/grpc/whisper backend-assets/grpc/local-store" \ $(MAKE) build mkdir -p release # if BUILD_ID is empty, then we don't append it to the binary name