mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-09 04:14:59 +00:00

Some checks are pending
Explorer deployment / build-linux (push) Waiting to run
GPU tests / ubuntu-latest (1.21.x) (push) Waiting to run
generate and publish intel docker caches / generate_caches (intel/oneapi-basekit:2025.1.0-0-devel-ubuntu22.04, linux/amd64, ubuntu-latest) (push) Waiting to run
build container images / hipblas-jobs (-aio-gpu-hipblas, rocm/dev-ubuntu-22.04:6.1, hipblas, true, ubuntu:22.04, extras, latest-gpu-hipblas-extras, latest-aio-gpu-hipblas, --jobs=3 --output-sync=target, linux/amd64, arc-runner-set, auto, -hipblas-extras) (push) Waiting to run
build container images / hipblas-jobs (rocm/dev-ubuntu-22.04:6.1, hipblas, true, ubuntu:22.04, core, latest-gpu-hipblas, --jobs=3 --output-sync=target, linux/amd64, arc-runner-set, false, -hipblas) (push) Waiting to run
build container images / self-hosted-jobs (-aio-gpu-intel-f16, quay.io/go-skynet/intel-oneapi-base:latest, sycl_f16, true, ubuntu:22.04, extras, latest-gpu-intel-f16-extras, latest-aio-gpu-intel-f16, --jobs=3 --output-sync=target, linux/amd64, arc-runner-set, false, -sycl-f16-… (push) Waiting to run
build container images / self-hosted-jobs (-aio-gpu-intel-f32, quay.io/go-skynet/intel-oneapi-base:latest, sycl_f32, true, ubuntu:22.04, extras, latest-gpu-intel-f32-extras, latest-aio-gpu-intel-f32, --jobs=3 --output-sync=target, linux/amd64, arc-runner-set, false, -sycl-f32-… (push) Waiting to run
build container images / self-hosted-jobs (-aio-gpu-nvidia-cuda-11, ubuntu:22.04, cublas, 11, 7, true, extras, latest-gpu-nvidia-cuda-11-extras, latest-aio-gpu-nvidia-cuda-11, --jobs=3 --output-sync=target, linux/amd64, arc-runner-set, false, -cublas-cuda11-extras) (push) Waiting to run
build container images / self-hosted-jobs (-aio-gpu-nvidia-cuda-12, ubuntu:22.04, cublas, 12, 0, true, extras, latest-gpu-nvidia-cuda-12-extras, latest-aio-gpu-nvidia-cuda-12, --jobs=3 --output-sync=target, linux/amd64, arc-runner-set, false, -cublas-cuda12-extras) (push) Waiting to run
build container images / self-hosted-jobs (quay.io/go-skynet/intel-oneapi-base:latest, sycl_f16, true, ubuntu:22.04, core, latest-gpu-intel-f16, --jobs=3 --output-sync=target, linux/amd64, arc-runner-set, false, -sycl-f16) (push) Waiting to run
build container images / self-hosted-jobs (quay.io/go-skynet/intel-oneapi-base:latest, sycl_f32, true, ubuntu:22.04, core, latest-gpu-intel-f32, --jobs=3 --output-sync=target, linux/amd64, arc-runner-set, false, -sycl-f32) (push) Waiting to run
build container images / core-image-build (-aio-cpu, ubuntu:22.04, , true, core, latest-cpu, latest-aio-cpu, --jobs=4 --output-sync=target, linux/amd64,linux/arm64, arc-runner-set, false, auto, ) (push) Waiting to run
build container images / core-image-build (ubuntu:22.04, cublas, 11, 7, true, core, latest-gpu-nvidia-cuda-12, --jobs=4 --output-sync=target, linux/amd64, arc-runner-set, false, false, -cublas-cuda11) (push) Waiting to run
build container images / core-image-build (ubuntu:22.04, cublas, 12, 0, true, core, latest-gpu-nvidia-cuda-12, --jobs=4 --output-sync=target, linux/amd64, arc-runner-set, false, false, -cublas-cuda12) (push) Waiting to run
build container images / core-image-build (ubuntu:22.04, vulkan, true, core, latest-gpu-vulkan, --jobs=4 --output-sync=target, linux/amd64, arc-runner-set, false, false, -vulkan) (push) Waiting to run
build container images / gh-runner (nvcr.io/nvidia/l4t-jetpack:r36.4.0, cublas, 12, 0, true, core, latest-nvidia-l4t-arm64, --jobs=4 --output-sync=target, linux/arm64, ubuntu-24.04-arm, true, false, -nvidia-l4t-arm64) (push) Waiting to run
Security Scan / tests (push) Waiting to run
Tests extras backends / tests-transformers (push) Waiting to run
Tests extras backends / tests-rerankers (push) Waiting to run
Tests extras backends / tests-diffusers (push) Waiting to run
Tests extras backends / tests-coqui (push) Waiting to run
tests / tests-linux (1.21.x) (push) Waiting to run
tests / tests-aio-container (push) Waiting to run
tests / tests-apple (1.21.x) (push) Waiting to run
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
338 lines
16 KiB
YAML
338 lines
16 KiB
YAML
name: Build and Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags:
|
|
- 'v*'
|
|
pull_request:
|
|
|
|
env:
|
|
GRPC_VERSION: v1.65.0
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency:
|
|
group: ci-releases-${{ github.head_ref || github.ref }}-${{ github.repository }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
|
|
build-linux-arm:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Clone
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.21.x'
|
|
cache: false
|
|
- name: Dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install build-essential ffmpeg protobuf-compiler ccache upx-ucl gawk
|
|
sudo apt-get install -qy binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libgmock-dev
|
|
make install-go-tools
|
|
- name: Install CUDA Dependencies
|
|
run: |
|
|
curl -O https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/cross-linux-aarch64/cuda-keyring_1.1-1_all.deb
|
|
sudo dpkg -i cuda-keyring_1.1-1_all.deb
|
|
sudo apt-get update
|
|
sudo apt-get install -y cuda-cross-aarch64 cuda-nvcc-cross-aarch64-${CUDA_VERSION} libcublas-cross-aarch64-${CUDA_VERSION}
|
|
env:
|
|
CUDA_VERSION: 12-4
|
|
- name: Cache grpc
|
|
id: cache-grpc
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: grpc
|
|
key: ${{ runner.os }}-arm-grpc-${{ env.GRPC_VERSION }}
|
|
- name: Build grpc
|
|
if: steps.cache-grpc.outputs.cache-hit != 'true'
|
|
run: |
|
|
|
|
git clone --recurse-submodules -b ${{ env.GRPC_VERSION }} --depth 1 --shallow-submodules https://github.com/grpc/grpc && \
|
|
cd grpc && sed -i "216i\ TESTONLY" "third_party/abseil-cpp/absl/container/CMakeLists.txt" && mkdir -p cmake/build && \
|
|
cd cmake/build && cmake -DgRPC_INSTALL=ON \
|
|
-DgRPC_BUILD_TESTS=OFF \
|
|
../.. && sudo make --jobs 5 --output-sync=target
|
|
- name: Install gRPC
|
|
run: |
|
|
GNU_HOST=aarch64-linux-gnu
|
|
C_COMPILER_ARM_LINUX=$GNU_HOST-gcc
|
|
CXX_COMPILER_ARM_LINUX=$GNU_HOST-g++
|
|
|
|
CROSS_TOOLCHAIN=/usr/$GNU_HOST
|
|
CROSS_STAGING_PREFIX=$CROSS_TOOLCHAIN/stage
|
|
CMAKE_CROSS_TOOLCHAIN=/tmp/arm.toolchain.cmake
|
|
|
|
# https://cmake.org/cmake/help/v3.13/manual/cmake-toolchains.7.html#cross-compiling-for-linux
|
|
echo "set(CMAKE_SYSTEM_NAME Linux)" >> $CMAKE_CROSS_TOOLCHAIN && \
|
|
echo "set(CMAKE_SYSTEM_PROCESSOR arm)" >> $CMAKE_CROSS_TOOLCHAIN && \
|
|
echo "set(CMAKE_STAGING_PREFIX $CROSS_STAGING_PREFIX)" >> $CMAKE_CROSS_TOOLCHAIN && \
|
|
echo "set(CMAKE_SYSROOT ${CROSS_TOOLCHAIN}/sysroot)" >> $CMAKE_CROSS_TOOLCHAIN && \
|
|
echo "set(CMAKE_C_COMPILER /usr/bin/$C_COMPILER_ARM_LINUX)" >> $CMAKE_CROSS_TOOLCHAIN && \
|
|
echo "set(CMAKE_CXX_COMPILER /usr/bin/$CXX_COMPILER_ARM_LINUX)" >> $CMAKE_CROSS_TOOLCHAIN && \
|
|
echo "set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> $CMAKE_CROSS_TOOLCHAIN && \
|
|
echo "set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> $CMAKE_CROSS_TOOLCHAIN && \
|
|
echo "set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> $CMAKE_CROSS_TOOLCHAIN && \
|
|
echo "set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)" >> $CMAKE_CROSS_TOOLCHAIN
|
|
GRPC_DIR=$PWD/grpc
|
|
cd grpc && cd cmake/build && sudo make --jobs 5 --output-sync=target install && \
|
|
GRPC_CROSS_BUILD_DIR=$GRPC_DIR/cmake/cross_build && \
|
|
mkdir -p $GRPC_CROSS_BUILD_DIR && \
|
|
cd $GRPC_CROSS_BUILD_DIR && \
|
|
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CROSS_TOOLCHAIN \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=$CROSS_TOOLCHAIN/grpc_install \
|
|
../.. && \
|
|
sudo make -j`nproc` install
|
|
- name: Build
|
|
id: build
|
|
run: |
|
|
GNU_HOST=aarch64-linux-gnu
|
|
C_COMPILER_ARM_LINUX=$GNU_HOST-gcc
|
|
CXX_COMPILER_ARM_LINUX=$GNU_HOST-g++
|
|
|
|
CROSS_TOOLCHAIN=/usr/$GNU_HOST
|
|
CROSS_STAGING_PREFIX=$CROSS_TOOLCHAIN/stage
|
|
CMAKE_CROSS_TOOLCHAIN=/tmp/arm.toolchain.cmake
|
|
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@1958fcbe2ca8bd93af633f11e97d44e567e945af
|
|
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2
|
|
export PATH=$PATH:$GOPATH/bin
|
|
export PATH=/usr/local/cuda/bin:$PATH
|
|
sudo rm -rf /usr/aarch64-linux-gnu/lib/libstdc++.so.6
|
|
sudo cp -rf /usr/aarch64-linux-gnu/lib/libstdc++.so* /usr/aarch64-linux-gnu/lib/libstdc++.so.6
|
|
sudo cp /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 ld.so
|
|
BACKEND_LIBS="./grpc/cmake/cross_build/third_party/re2/libre2.a ./grpc/cmake/cross_build/libgrpc.a ./grpc/cmake/cross_build/libgrpc++.a ./grpc/cmake/cross_build/third_party/protobuf/libprotobuf.a /usr/aarch64-linux-gnu/lib/libc.so.6 /usr/aarch64-linux-gnu/lib/libstdc++.so.6 /usr/aarch64-linux-gnu/lib/libgomp.so.1 /usr/aarch64-linux-gnu/lib/libm.so.6 /usr/aarch64-linux-gnu/lib/libgcc_s.so.1 /usr/aarch64-linux-gnu/lib/libdl.so.2 /usr/aarch64-linux-gnu/lib/libpthread.so.0 ./ld.so" \
|
|
GOOS=linux \
|
|
GOARCH=arm64 \
|
|
CMAKE_ARGS="-DProtobuf_INCLUDE_DIRS=$CROSS_STAGING_PREFIX/include -DProtobuf_DIR=$CROSS_STAGING_PREFIX/lib/cmake/protobuf -DgRPC_DIR=$CROSS_STAGING_PREFIX/lib/cmake/grpc -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CROSS_TOOLCHAIN -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++" make dist-cross-linux-arm64
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: LocalAI-linux-arm64
|
|
path: release/
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: |
|
|
release/*
|
|
- name: Setup tmate session if tests fail
|
|
if: ${{ failure() }}
|
|
uses: mxschmitt/action-tmate@v3.22
|
|
with:
|
|
detached: true
|
|
connect-timeout-seconds: 180
|
|
limit-access-to-actor: true
|
|
build-linux:
|
|
runs-on: arc-runner-set
|
|
steps:
|
|
- name: Force Install GIT latest
|
|
run: |
|
|
sudo apt-get update \
|
|
&& sudo apt-get install -y software-properties-common \
|
|
&& sudo apt-get update \
|
|
&& sudo add-apt-repository -y ppa:git-core/ppa \
|
|
&& sudo apt-get update \
|
|
&& sudo apt-get install -y git
|
|
- name: Clone
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.21.x'
|
|
cache: false
|
|
- name: Dependencies
|
|
run: |
|
|
## XXX: This is a workaround to fix the build failure due to the network issues
|
|
# Configure apt to use French mirrors and add retry logic
|
|
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries
|
|
echo 'Acquire::http::Timeout "120";' | sudo tee -a /etc/apt/apt.conf.d/80-retries
|
|
echo 'Acquire::https::Timeout "120";' | sudo tee -a /etc/apt/apt.conf.d/80-retries
|
|
echo 'Acquire::ftp::Timeout "120";' | sudo tee -a /etc/apt/apt.conf.d/80-retries
|
|
|
|
# Add French mirrors
|
|
echo 'deb http://fr.archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse' | sudo tee /etc/apt/sources.list
|
|
echo 'deb http://fr.archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse' | sudo tee -a /etc/apt/sources.list
|
|
echo 'deb http://fr.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse' | sudo tee -a /etc/apt/sources.list
|
|
echo 'deb http://fr.archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse' | sudo tee -a /etc/apt/sources.list
|
|
## END of workaround
|
|
|
|
sudo apt-get update
|
|
sudo apt-get install -y wget curl build-essential ffmpeg protobuf-compiler ccache upx-ucl gawk cmake libgmock-dev
|
|
make install-go-tools
|
|
- name: Intel Dependencies
|
|
run: |
|
|
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
|
|
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
|
|
sudo apt update
|
|
sudo apt install -y intel-basekit
|
|
- name: Install CUDA Dependencies
|
|
run: |
|
|
curl -O https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
|
|
sudo dpkg -i cuda-keyring_1.1-1_all.deb
|
|
sudo apt-get update
|
|
sudo apt-get install -y cuda-nvcc-${CUDA_VERSION} libcublas-dev-${CUDA_VERSION}
|
|
env:
|
|
CUDA_VERSION: 12-5
|
|
- name: "Install Hipblas"
|
|
env:
|
|
ROCM_VERSION: "6.1"
|
|
AMDGPU_VERSION: "6.1"
|
|
run: |
|
|
set -ex
|
|
|
|
sudo apt-get update
|
|
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl libnuma-dev gnupg
|
|
|
|
curl -sL https://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add -
|
|
|
|
printf "deb [arch=amd64] https://repo.radeon.com/rocm/apt/$ROCM_VERSION/ jammy main" | sudo tee /etc/apt/sources.list.d/rocm.list
|
|
|
|
printf "deb [arch=amd64] https://repo.radeon.com/amdgpu/$AMDGPU_VERSION/ubuntu jammy main" | sudo tee /etc/apt/sources.list.d/amdgpu.list
|
|
printf 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600
|
|
sudo apt-get update
|
|
|
|
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
|
hipblas-dev rocm-dev \
|
|
rocblas-dev
|
|
|
|
sudo apt-get clean
|
|
sudo rm -rf /var/lib/apt/lists/*
|
|
sudo ldconfig
|
|
- name: Cache grpc
|
|
id: cache-grpc
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: grpc
|
|
key: ${{ runner.os }}-grpc-${{ env.GRPC_VERSION }}
|
|
- name: Build grpc
|
|
if: steps.cache-grpc.outputs.cache-hit != 'true'
|
|
run: |
|
|
git clone --recurse-submodules -b ${{ env.GRPC_VERSION }} --depth 1 --shallow-submodules https://github.com/grpc/grpc && \
|
|
cd grpc && sed -i "216i\ TESTONLY" "third_party/abseil-cpp/absl/container/CMakeLists.txt" && mkdir -p cmake/build && \
|
|
cd cmake/build && cmake -DgRPC_INSTALL=ON \
|
|
-DgRPC_BUILD_TESTS=OFF \
|
|
../.. && sudo make --jobs 5 --output-sync=target
|
|
- name: Install gRPC
|
|
run: |
|
|
cd grpc && cd cmake/build && sudo make --jobs 5 --output-sync=target install
|
|
# BACKEND_LIBS needed for gpu-workload: /opt/intel/oneapi/*/lib/libiomp5.so /opt/intel/oneapi/*/lib/libmkl_core.so /opt/intel/oneapi/*/lib/libmkl_core.so.2 /opt/intel/oneapi/*/lib/libmkl_intel_ilp64.so /opt/intel/oneapi/*/lib/libmkl_intel_ilp64.so.2 /opt/intel/oneapi/*/lib/libmkl_sycl_blas.so /opt/intel/oneapi/*/lib/libmkl_sycl_blas.so.4 /opt/intel/oneapi/*/lib/libmkl_tbb_thread.so /opt/intel/oneapi/*/lib/libmkl_tbb_thread.so.2 /opt/intel/oneapi/*/lib/libsycl.so /opt/intel/oneapi/*/lib/libsycl.so.7 /opt/intel/oneapi/*/lib/libsycl.so.7.1.0 /opt/rocm-*/lib/libamdhip64.so /opt/rocm-*/lib/libamdhip64.so.5 /opt/rocm-*/lib/libamdhip64.so.6 /opt/rocm-*/lib/libamdhip64.so.6.1.60100 /opt/rocm-*/lib/libhipblas.so /opt/rocm-*/lib/libhipblas.so.2 /opt/rocm-*/lib/libhipblas.so.2.1.60100 /opt/rocm-*/lib/librocblas.so /opt/rocm-*/lib/librocblas.so.4 /opt/rocm-*/lib/librocblas.so.4.1.60100 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libOpenCL.so.1 /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0 /usr/lib/x86_64-linux-gnu/libm.so.6 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 /usr/lib/x86_64-linux-gnu/libc.so.6 /usr/lib/x86_64-linux-gnu/librt.so.1 /usr/local/cuda-*/targets/x86_64-linux/lib/libcublas.so /usr/local/cuda-*/targets/x86_64-linux/lib/libcublasLt.so /usr/local/cuda-*/targets/x86_64-linux/lib/libcudart.so /usr/local/cuda-*/targets/x86_64-linux/lib/stubs/libcuda.so
|
|
- name: Build
|
|
id: build
|
|
run: |
|
|
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@1958fcbe2ca8bd93af633f11e97d44e567e945af
|
|
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2
|
|
export PATH=$PATH:$GOPATH/bin
|
|
export PATH=/usr/local/cuda/bin:$PATH
|
|
export PATH=/opt/rocm/bin:$PATH
|
|
source /opt/intel/oneapi/setvars.sh
|
|
sudo cp /lib64/ld-linux-x86-64.so.2 ld.so
|
|
BACKEND_LIBS="./ld.so ./sources/go-piper/piper/build/fi/lib/libfmt.a ./sources/go-piper/piper-phonemize/pi/lib/libonnxruntime.so.1.14.1 ./sources/go-piper/piper-phonemize/pi/src/libespeak-ng/libespeak-ng.so /usr/lib/x86_64-linux-gnu/libdl.so.2 /usr/lib/x86_64-linux-gnu/librt.so.1 /usr/lib/x86_64-linux-gnu/libpthread.so.0 ./sources/go-piper/piper-phonemize/pi/lib/libpiper_phonemize.so.1 ./sources/go-piper/piper/build/si/lib/libspdlog.a ./sources/go-piper/espeak/ei/lib/libucd.so" \
|
|
make -j4 dist
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: LocalAI-linux
|
|
path: release/
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: |
|
|
release/*
|
|
- name: Setup tmate session if tests fail
|
|
if: ${{ failure() }}
|
|
uses: mxschmitt/action-tmate@v3.22
|
|
with:
|
|
detached: true
|
|
connect-timeout-seconds: 180
|
|
limit-access-to-actor: true
|
|
|
|
|
|
build-macOS-x86_64:
|
|
runs-on: macos-13
|
|
steps:
|
|
- name: Clone
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.21.x'
|
|
cache: false
|
|
- name: Dependencies
|
|
run: |
|
|
brew install protobuf grpc
|
|
make install-go-tools
|
|
- name: Build
|
|
id: build
|
|
run: |
|
|
export C_INCLUDE_PATH=/usr/local/include
|
|
export CPLUS_INCLUDE_PATH=/usr/local/include
|
|
export PATH=$PATH:$GOPATH/bin
|
|
export SKIP_GRPC_BACKEND=backend-assets/grpc/whisper
|
|
make dist
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: LocalAI-MacOS-x86_64
|
|
path: release/
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: |
|
|
release/*
|
|
- name: Setup tmate session if tests fail
|
|
if: ${{ failure() }}
|
|
uses: mxschmitt/action-tmate@v3.22
|
|
with:
|
|
detached: true
|
|
connect-timeout-seconds: 180
|
|
limit-access-to-actor: true
|
|
|
|
build-macOS-arm64:
|
|
runs-on: macos-14
|
|
steps:
|
|
- name: Clone
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.21.x'
|
|
cache: false
|
|
- name: Dependencies
|
|
run: |
|
|
brew install protobuf grpc libomp llvm
|
|
make install-go-tools
|
|
- name: Build
|
|
id: build
|
|
run: |
|
|
export C_INCLUDE_PATH=/usr/local/include
|
|
export CPLUS_INCLUDE_PATH=/usr/local/include
|
|
export PATH=$PATH:$GOPATH/bin
|
|
export CC=/opt/homebrew/opt/llvm/bin/clang
|
|
make dist
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: LocalAI-MacOS-arm64
|
|
path: release/
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: |
|
|
release/*
|
|
- name: Setup tmate session if tests fail
|
|
if: ${{ failure() }}
|
|
uses: mxschmitt/action-tmate@v3.22
|
|
with:
|
|
detached: true
|
|
connect-timeout-seconds: 180
|
|
limit-access-to-actor: true
|