-
Notifications
You must be signed in to change notification settings - Fork 7
64 lines (61 loc) · 1.64 KB
/
build.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
52
53
54
55
56
57
58
59
60
61
62
63
64
on:
push:
pull_request:
name: build
jobs:
build-amd64:
name: build-amd64
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up golang
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install golang make
- name: Make machine binaries
run: |
make
mv bin/machine bin/machine-linux-amd64
mv bin/machined bin/machined-linux-amd64
- name: Test machine unittests
run: |
make test
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: binaries
path: bin/
if-no-files-found: error
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: bin/machine*
build-arm64:
name: build-arm64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: uraimo/run-on-arch-action@v2
with:
arch: aarch64
distro: ubuntu22.04
githubToken: ${{ github.token }}
install: |
apt-get -y update;
apt-get install -q -y git golang-go;
apt-get install -y golang make
run: |
make
mv bin/machine bin/machine-linux-arm64
mv bin/machined bin/machined-linux-arm64
make test
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: bin/machine*