-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (67 loc) · 2.19 KB
/
devbuild.yaml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Development build
on:
push:
branches: [ dev ]
jobs:
cross-compile:
strategy:
fail-fast: false
matrix:
os: [ linux, freebsd ]
arch: [ 386, amd64, arm, arm64 ]
name: ${{matrix.os}} (${{matrix.arch}})
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: compile
id: compile
run: |
VER=$(cat Makefile | sed -n 's/^PROGRAM_VERSION\s*\??=\s*//p')
GOOS=${{matrix.os}} GOARCH=${{matrix.arch}} PROGRAM_VERSION="${VER}-$(echo $GITHUB_SHA | cut -b -8)" make build tools
- name: Upload thalos-server
uses: actions/upload-artifact@v4
with:
name: thalos-server-${{github.sha}}-${{matrix.os}}-${{matrix.arch}}
path: build/thalos-server
retention-days: 7
- name: Upload thalos-tools
uses: actions/upload-artifact@v4
with:
name: thalos-tools-${{github.sha}}-${{matrix.os}}-${{matrix.arch}}
path: build/thalos-tools
retention-days: 7
# Build thalos binaries that are linked with musl libc.
musl:
strategy:
fail-fast: false
matrix:
arch: [ 386, amd64, arm, arm64 ]
runs-on: ubuntu-latest
name: musl (${{ matrix.arch }})
container:
image: golang:1.21-alpine3.19
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: apk add make
- name: compile
id: compile
run: |
VER=$(cat Makefile | sed -n 's/^PROGRAM_VERSION\s*\??=\s*//p')
GOOS=${{matrix.os}} GOARCH=${{matrix.arch}} PROGRAM_VERSION="${VER}-$(echo $GITHUB_SHA | cut -b -8)" make build tools
- name: Upload thalos-server
uses: actions/upload-artifact@v4
with:
name: thalos-server-${{github.sha}}-linux-${{matrix.arch}}-musl
path: build/thalos-server
retention-days: 7
- name: Upload thalos-tools
uses: actions/upload-artifact@v4
with:
name: thalos-tools-${{github.sha}}-linux-${{matrix.arch}}-musl
path: build/thalos-tools
retention-days: 7