forked from cilium/cilium-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (58 loc) · 2.22 KB
/
go.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
name: Go
# Any change in triggers needs to be reflected in the concurrency group.
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
- name: Set up Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab
with:
go-version: 1.18.0
- name: Run static checks
run: make check
# TODO: uncomment config below and remove `run: make check` once a
# version of golangci-lint with support for Go 1.18 is released.
# uses: golangci/golangci-lint-action@b517f99ae23d86ecc4c0dec08dcf48d2336abc29
# with:
# version: v1.44.2
# args: --config=.golangci.yml --verbose
# skip-cache: true
- name: Check module vendoring
run: |
go mod tidy
go mod vendor
go mod verify
test -z "$(git status --porcelain)" || (echo "please run 'go mod tidy && go mod vendor', and submit your changes"; exit 1)
- name: Build
run: make
- name: Cross-build
run: |
# all GOOS/GOARCH combinations supported by `make local-release`
GOOS=linux GOARCH=386 go build ./cmd/cilium
GOOS=linux GOARCH=amd64 go build ./cmd/cilium
GOOS=linux GOARCH=arm go build ./cmd/cilium
GOOS=linux GOARCH=arm64 go build ./cmd/cilium
GOOS=darwin GOARCH=amd64 go build ./cmd/cilium
GOOS=darwin GOARCH=arm64 go build ./cmd/cilium
GOOS=windows GOARCH=386 go build ./cmd/cilium
GOOS=windows GOARCH=amd64 go build ./cmd/cilium
GOOS=windows GOARCH=arm64 go build ./cmd/cilium
- name: Test
run: make test
- name: Send slack notification
if: ${{ !success() && (github.event_name == 'schedule' || github.event_name == 'push') }}
uses: 8398a7/action-slack@a74b761b4089b5d730d813fbedcd2ec5d394f3af
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}