Skip to content

Commit c4c6a2f

Browse files
Adding github action to build ai services go binary
1 parent f4c845c commit c4c6a2f

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and archive Go Binary
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
branches:
10+
- main
11+
12+
jobs:
13+
build:
14+
name: Build
15+
runs-on: ubuntu-24.04-ppc64le
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v5
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Setup Go
24+
run: |
25+
GO_VERSION="1.24.1"
26+
wget https://go.dev/dl/go${GO_VERSION}.linux-ppc64le.tar.gz
27+
sudo tar -C /usr/local -xzf go${GO_VERSION}.linux-ppc64le.tar.gz
28+
echo "/usr/local/go/bin" >> $GITHUB_PATH
29+
30+
- run: go version
31+
32+
- name: Go Vet
33+
run: |
34+
cd ai-services
35+
apt-get update -y
36+
apt-get install -y gpgme-devel libassuan-devel libgpg-error-devel btrfs-progs-devel
37+
go vet ./...
38+
39+
- name: Build Go binary
40+
run: |
41+
cd ai-services
42+
make build
43+
44+
- name: Archive binary
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: ai-services-binary
48+
path: ai-services/bin/ai-services

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ nohup.out
55
.venv
66
env
77
venv
8+
vendor

0 commit comments

Comments
 (0)