Skip to content

Commit cb8516c

Browse files
Adding github actions to build go binaries
1 parent 31c6435 commit cb8516c

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build and archive Go Binary
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
branches:
10+
- main
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-24.04-ppc64le
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v3
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v6
22+
with:
23+
go-version: '1.24'
24+
25+
- name: Check Go code linting
26+
uses: golangci/golangci-lint-action@v8
27+
with:
28+
version: latest
29+
working-directory: ai-services
30+
31+
- name : Run go unit tests
32+
run: |
33+
cd ai-services
34+
go test -v ./...
35+
36+
- name: Build Go binary
37+
run: |
38+
cd ai-services
39+
make build
40+
41+
- name: Archive binary
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: ai-services-binary
45+
path: ai-services/bin/ai-services

0 commit comments

Comments
 (0)