-
Notifications
You must be signed in to change notification settings - Fork 3
82 lines (82 loc) · 2 KB
/
pull-request.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
79
80
81
82
name: Pull request
on:
- pull_request
jobs:
sanitize:
name: Sanitize
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.21.0"
- name: Go vet
run: |
make vet
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.21.0"
- name: Go vet
run: |
make vet
- name: Unit tests
run: |
make unit-tests
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check system storage
run: |
sudo df -h
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /opt/hostedtoolcache/Python
- name: Check system storage
run: |
sudo df -h
- name: Checkout
uses: actions/checkout@v4
- name: Get short commit hash
run: echo "SHORT_SHA=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.21.0"
- name: Check system storage
run: |
sudo df -h
- name: Build Linux AMD64
run: |
make embedded-cluster-linux-amd64 VERSION=dev-$SHORT_SHA
- name: Check system storage
run: |
sudo df -h
- name: Build Darwin AMD64
run: |
make embedded-cluster-darwin-amd64
- name: Check system storage
run: |
sudo df -h
- name: Build Darwin ARM64 VERSION=dev-$SHORT_SHA
run: |
make embedded-cluster-darwin-arm64 VERSION=dev-$SHORT_SHA