Skip to content

Commit

Permalink
ci: try to build for arm64
Browse files Browse the repository at this point in the history
Signed-off-by: Ettore Di Giacinto <[email protected]>
  • Loading branch information
mudler committed Jun 5, 2024
1 parent d072835 commit 2c24f02
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,68 @@ concurrency:
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
sudo apt-get install -qy binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
export CMAKE_SYSTEM_NAME=Linux
export TARGET=aarch64-linux-gnu
export TARGET_AR=aarch64-linux-gnu-ar
export TARGET_CC=aarch64-linux-gnu-gcc
export TARGET_CXX=aarch64-linux-gnu-g++
export TARGET_RANLIB=aarch64-linux-gnu-ranlib
export TARGET_CPP=aarch64-linux-gnu-cpp
export TARGET_LD=aarch64-linux-gnu-ld
- 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 && 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
- name: Build
id: build
run: |
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@8ba23be9613c672d40ae261d2a1335d639bdd59b
go install google.golang.org/protobuf/cmd/[email protected]
export PATH=$PATH:$GOPATH/bin
export PATH=/usr/local/cuda/bin:$PATH
export PATH=/opt/rocm/bin:$PATH
GO_TAGS=p2p make dist
- uses: actions/upload-artifact@v4
with:
name: LocalAI-linux-aarch64
path: release/
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
release/*
build-linux:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 2c24f02

Please sign in to comment.