-
Notifications
You must be signed in to change notification settings - Fork 10
55 lines (54 loc) · 1.37 KB
/
ci.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
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
go-version: ['1.18', '1.19']
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
prepare: |
sudo apt-get update
sudo apt-get install libudev-dev libusb-1.0-0-dev
tags: libusb
steps:
- uses: actions/checkout@v3
- name: Install dependencies
if: ${{ matrix.prepare }}
run: ${{ matrix.prepare }}
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Run tests
run: go test ./...
- name: Run tagged tests
if: ${{ matrix.tags }}
run: go test -tags ${{ matrix.tags }} ./...
test-freebsd:
runs-on: macos-12
strategy:
fail-fast: false
matrix:
go-version: ['1.18', '1.19']
include:
- go-version: '1.18'
go-pkg: go118
- go-version: '1.19'
go-pkg: go119
steps:
- uses: actions/checkout@v3
- uses: vmactions/freebsd-vm@v0
with:
copyback: false
release: '13.1'
prepare: |
pkg install -y ${{ matrix.go-pkg }} libiconv
run: |
${{ matrix.go-pkg }} test ./...