-
Notifications
You must be signed in to change notification settings - Fork 103
56 lines (54 loc) · 1.27 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
52
53
54
55
56
name: Golang
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- contrib
- docs
- 'lc-admin/**'
- 'lc-lib/**'
- 'lc-tlscert/**'
- 'log-carver/**'
- log-courier.go
- go.mod
- go.sum
pull_request:
branches: [ main ]
paths:
- contrib
- docs
- 'lc-admin/**'
- 'lc-lib/**'
- 'lc-tlscert/**'
- 'log-carver/**'
- log-courier.go
- go.mod
- go.sum
jobs:
build:
strategy:
matrix:
# Red Hat we compile inside COPR using the version of Golang for the target OS.
# - RHEL9 = 1.22 (Appstream as of 2025-02-28)
# Ubuntu we cross-compile in our builder image using Golang 1.24 (latest stable as of 2025-02-28).
go: ['1.22', '1.24']
name: Build Go ${{ matrix.go }}
# Use latest Ubuntu to try work around https://github.com/golang/go/issues/37362
runs-on: ubuntu-20.04
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
id: go
- name: Checkout
uses: actions/checkout@v3
- name: Get dependencies
run: go get -v -t -d ./...
- name: Generate
run: go generate -v ./...
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...