-
Notifications
You must be signed in to change notification settings - Fork 17
107 lines (107 loc) · 3.32 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
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
99
100
101
102
103
104
105
106
107
name: ci
on:
push:
branches:
- main
pull_request:
workflow_dispatch: {} # support manual runs
permissions:
contents: read
jobs:
plugins:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- uses: bufbuild/[email protected]
with:
github_token: ${{ github.token }}
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build plugin
run: make buildplugin
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/[email protected]
with:
github_token: ${{ github.token }}
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate proto files for project
run: make generate
- name: Print diff
run: git diff
- name: Ensure no generated diff
run: |
# extensions/ uses checked in generated code to ensure correct protoc versioning for
# binaries. As of 30/12/2022, arduino/setup-protoc does not support the new protoc
# versioning scheme and is stuck on 3.20: https://github.com/arduino/setup-protoc/issues/33.
# The current protoc version used is 3.21.11 or 21.11.
# For now, just undo extensions and check other generated files.
git checkout extensions
git update-index --refresh --add --remove
git diff-index --quiet HEAD --
- name: Build project
run: make build
crosstests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/[email protected]
with:
github_token: ${{ github.token }}
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: docker-practice/actions-setup-docker@master
- uses: actions/setup-go@v4
- uses: bufbuild/[email protected]
with:
github_token: ${{ github.token }}
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate proto files for cross tests.
run: make generatecrosstests
- name: Start test server
run: make crosstestserverrun
- name: Run crosstests
run: make crosstestsrun
- name: Stop test server
run: make crosstestserverstop
license-headers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check license headers
run: |
make licenseheaders
git update-index --refresh --add --remove
git diff-index --quiet HEAD --
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/[email protected]
with:
github_token: ${{ github.token }}
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests
run: make test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/[email protected]
with:
github_token: ${{ github.token }}
- name: Run lint
run: make lint