-
Notifications
You must be signed in to change notification settings - Fork 117
71 lines (69 loc) · 1.84 KB
/
ci.yaml
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
name: Continuous Integration
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- master
jobs:
report:
name: Report
runs-on: ubuntu-latest
steps:
- name: ref
run: echo ${{ github.ref }}
- name: event_name
run: echo ${{ github.event_name }}
build:
name: Build
strategy:
matrix:
target: [
# Tier 1
{arch: amd64, os: linux}, {arch: arm64, os: linux},
{arch: amd64, os: windows}, {arch: arm64, os: windows},
{arch: amd64, os: darwin}, {arch: arm64, os: darwin},
# Tier 2 (Best effort)
{arch: amd64, os: freebsd}, {arch: arm64, os: freebsd},
{arch: amd64, os: netbsd}, {arch: arm64, os: netbsd},
{arch: amd64, os: openbsd}, {arch: arm64, os: openbsd},
{arch: amd64, os: solaris},
{arch: amd64, os: illumos},
{arch: ppc64, os: aix},
]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ^1.16
- run: go build
env:
GOOS: ${{ matrix.target.os }}
GOARCH: ${{ matrix.target.arch }}
test:
name: Test
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ^1.16
- run: go build
- name: vet
if: matrix.os != 'windows-latest'
run: make vet
- name: lint
if: matrix.os != 'windows-latest'
run: make lint
- name: image
if: matrix.os == 'ubuntu-latest'
run: make image
- name: test
if: matrix.os == 'ubuntu-latest'
run: make test