Debian Codegraph @

.github/workflows/goqemu.yml

raw
1 name: go-qemu
2 on: [push, pull_request]
3
4 jobs:
5 build:
6 runs-on: ubuntu-latest
7 strategy:
8 matrix:
9 # track upstream Go's currently supported stable versions.
10 gorelease: ['stable', 'oldstable']
11 steps:
12 - uses: actions/checkout@v4
13
14 - uses: actions/cache@v4
15 with:
16 path: |
17 ~/.cache/go-build
18 ~/go/pkg/mod
19 key: go-${{ matrix.gorelease }}-${{ hashFiles('**/go.sum') }}
20 restore-keys: |
21 go-${{ matrix.gorelease }}
22
23 - uses: actions/setup-go@v5
24 with:
25 go-version: ${{ matrix.gorelease }}
26
27 - name: build/go-${{ matrix.gorelease }}
28 run: go build -v ./...
29
30 - name: test/go-${{ matrix.gorelease }}
31 run: go test -v ./...
32
33 # disabled for now, seeing as it is complaining about things that seem like
34 # non-issues and that are helpful.
35 #
36 # I.e., it dislikes assert helpers:
37 #
38 # qmp/socket_test.go:238:4: call to (*T).Fatalf from a non-test goroutine
39 # - name: vet
40 # run: go vet ./...
41
42 # disabled for now, is incompatible with anything that doesn't have 2016 as
43 # the year. Might need fixing if we want to keep this.
44 #
45 # - name: check license
46 # run: ./scripts/licensecheck.sh
47
48 - name: check code generation
49 run: |
50 go install golang.org/x/tools/cmd/stringer@latest
51 ./scripts/codegeneration.sh
52
53 - name: golint
54 run: |
55 go install golang.org/x/lint/golint@latest
56 ./scripts/golint.sh