-
Notifications
You must be signed in to change notification settings - Fork 182
159 lines (137 loc) · 3.69 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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
name: CI tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# see: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
jobs:
# tier 0: system-independent checks
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: set up golang
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: format
run: ./hack/check-format.sh
lint:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Verify
uses: golangci/golangci-lint-action@v2
with:
version: v1.41.1
args: --timeout=15m0s --verbose
# tier-1
# main development platform, gets features first and it's most tested
build-ubuntu-2204:
runs-on: ubuntu-22.04
strategy:
matrix:
go: [ '1.19', '1.20']
steps:
- uses: actions/checkout@v2
- name: set up go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: run unit-tests
env:
GHW_TESTING_SKIP_BLOCK: "1"
GHW_TESTING_SKIP_GPU: "1"
run: go test -v ./...
build-ubuntu-2004:
runs-on: ubuntu-20.04
strategy:
matrix:
go: [ '1.18', '1.19']
steps:
- uses: actions/checkout@v2
- name: set up go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: run unit-tests
env:
GHW_TESTING_SKIP_BLOCK: "1"
GHW_TESTING_SKIP_GPU: "1"
run: go test -v ./...
build-windows-2022:
runs-on: windows-2022
strategy:
matrix:
go: [ '1.19' ]
steps:
- uses: actions/checkout@v2
- name: set up go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: run unit-tests
env:
GHW_TESTING_SKIP_BLOCK: "1"
GHW_TESTING_SKIP_GPU: "1"
GHW_TESTING_SKIP_CPU: "1"
GHW_TESTING_SKIP_MEMORY: "1"
GHW_TESTING_SKIP_HOST: "1"
GHW_TESTING_SKIP_NET: "1"
GHW_TESTING_SKIP_PCI: "1"
GHW_TESTING_SKIP_TOPOLOGY: "1"
run: go test -v ./...
build-windows-2019:
runs-on: windows-2019
strategy:
matrix:
go: [ '1.18' ]
steps:
- uses: actions/checkout@v2
- name: set up go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: run unit-tests
env:
GHW_TESTING_SKIP_BLOCK: "1"
GHW_TESTING_SKIP_CPU: "1"
GHW_TESTING_SKIP_GPU: "1"
GHW_TESTING_SKIP_HOST: "1"
GHW_TESTING_SKIP_MEMORY: "1"
GHW_TESTING_SKIP_NET: "1"
GHW_TESTING_SKIP_PCI: "1"
GHW_TESTING_SKIP_TOPOLOGY: "1"
run: go test -v ./...
# tier-2
# best-effort support, limited to most recent platforms (OS+go)
# NOTE(jaypipes): We currently only support block information on MacOS, and
# the tests have block skipped because we cannot get meaningful information
# about the block devices in the Github Actions Runner virtual machines. So
# this is really just a test of whether the library builds on MacOS 12.
build-macos-12:
runs-on: macos-12
strategy:
matrix:
go: [ '1.18' ]
steps:
- uses: actions/checkout@v2
- name: set up go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: run unit-tests
env:
GHW_TESTING_SKIP_BLOCK: "1"
GHW_TESTING_SKIP_CPU: "1"
GHW_TESTING_SKIP_GPU: "1"
GHW_TESTING_SKIP_HOST: "1"
GHW_TESTING_SKIP_MEMORY: "1"
GHW_TESTING_SKIP_NET: "1"
GHW_TESTING_SKIP_PCI: "1"
GHW_TESTING_SKIP_TOPOLOGY: "1"
run: go test -v ./...