-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (49 loc) · 1.29 KB
/
go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Go
on:
push:
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v3
with:
go-version: 1.21
check-latest: true
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check version
run: DEBUG=true ./ci/version
- name: Test
run: make test
- name: Build
run: make build
- name: Print theo-agent -version
run: ./build/theo-agent -version
- name: Cross build
env:
CGO_ENABLED: 0
run: |
GOOS=linux GOARCH=amd64 make -e buildx
- name: Upload theo-agent
uses: actions/upload-artifact@v3
with:
name: theo-agent-Linux-x86_64
path: build/theo-agent-Linux-x86_64
test-build:
name: Test artifact on 20.04
needs: build
runs-on: ubuntu-20.04
steps:
- name: Download theo-agent
uses: actions/download-artifact@v3
with:
name: theo-agent-Linux-x86_64
- name: Add execution bit to downloaded file
run: chmod +x ./theo-agent-Linux-x86_64
- name: Print theo-agent -version
run: ./theo-agent-Linux-x86_64 -version