-
Notifications
You must be signed in to change notification settings - Fork 77
99 lines (94 loc) · 2.34 KB
/
pr_build.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
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
name: PR Build
on:
pull_request: {}
workflow_dispatch: {}
env:
GO_VERSION: 1.21
jobs:
lint-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
cache: true
cache-dependency-path: v2/go.sum
go-version: ${{ env.GO_VERSION }}
- name: Lint
run: make lint
test-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
cache: true
cache-dependency-path: v2/go.sum
go-version: ${{ env.GO_VERSION }}
- name: Test
run: make test
lint-windows:
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
cache: true
cache-dependency-path: v2/go.sum
go-version: ${{ env.GO_VERSION }}
- name: Install msys2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
git
base-devel
mingw-w64-x86_64-toolchain
unzip
- name: Lint
run: make lint
test-windows:
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
cache: true
cache-dependency-path: v2/go.sum
go-version: ${{ env.GO_VERSION }}
- name: Install msys2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
git
base-devel
mingw-w64-x86_64-toolchain
unzip
- name: Test
run: make test
# This job is just here to make sure that the other jobs have completed
# and is used as a single job to block PR merge from. GH doesn't have a
# way to say "all jobs from this action", which would be ideal.
success:
needs: [lint-linux, test-linux, lint-windows, test-windows]
runs-on: ubuntu-latest
steps:
- name: Shout it out
run: echo SUCCESS