forked from karalabe/hid
-
Notifications
You must be signed in to change notification settings - Fork 13
50 lines (39 loc) · 986 Bytes
/
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
name: Go
on:
push:
branches:
- master
- v2
pull_request:
branches:
- master
- v2
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Install deps
run: sudo apt-get install -y pkg-config libudev-dev
if: startsWith(matrix.os,'ubuntu')
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
- name: Build hidraw
run: go build -tags hidraw -v ./...
if: startsWith(matrix.os,'ubuntu')
- name: Test hidraw
run: go test -tags hidraw -v ./...
if: startsWith(matrix.os,'ubuntu')
- name: Cross compile to win (hid disabled)
run: GOOS=windows go build -v ./...
if: startsWith(matrix.os,'ubuntu')