-
Notifications
You must be signed in to change notification settings - Fork 6
154 lines (120 loc) · 3.26 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
---
name: CI
on:
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
Lint_Format:
name: Lint (Format)
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup (buf)
uses: wizhi/setup-buf@v1
with:
version: 0.44.0
- name: Lint
run: buf check lint
Lint_Breaking:
name: Lint (Breaking)
runs-on: ubuntu-22.04
steps:
- name: Checkout (current)
uses: actions/checkout@v2
with:
path: current
- name: Checkout (master)
uses: actions/checkout@v2
with:
ref: master
path: master
- name: Setup (buf)
uses: wizhi/setup-buf@v1
with:
version: 0.44.0
- name: Lint
run: |
buf breaking --against ./master/protos ./current/protos
Elixir:
runs-on: ubuntu-22.04
steps:
- name: Checkout (current)
uses: actions/checkout@v2
with:
path: current
- name: Checkout (elixir)
uses: actions/checkout@v2
with:
ref: elixir
path: elixir
- name: Setup (protoc)
uses: arduino/setup-protoc@v1
with:
version: 3.15.8
- name: Setup (buf)
uses: wizhi/setup-buf@v1
with:
version: 0.44.0
- name: Setup (elixir)
uses: erlef/setup-beam@v1
with:
elixir-version: "1.14.1"
otp-version: "25.1.1"
- name: Dependencies
run: |
cd ./elixir
mix deps.get
mix compile
mix escript.install --force hex protobuf 0.11.0
sudo cp /home/runner/.mix/escripts/protoc-gen-elixir /usr/local/bin/
sudo chmod +x /usr/local/bin/protoc-gen-elixir
- name: Generate
run: |
find ./elixir/lib/ -type f -name '*.pb.ex' -delete
cp -R ./current/protos/. ./elixir/priv/protos/
cd ./elixir/priv/protos
buf generate --template '{"version":"v1beta1","plugins":[{"name":"elixir","out":"../../lib"}]}'
- name: Format
run: |
cd ./elixir
mix format
Node:
runs-on: ubuntu-22.04
steps:
- name: Checkout (master)
uses: actions/checkout@v2
with:
path: master
- name: Checkout (node)
uses: actions/checkout@v2
with:
ref: node
path: node
- name: Setup (protoc)
uses: arduino/setup-protoc@v1
with:
version: 3.15.8
- name: Setup (buf)
uses: wizhi/setup-buf@v1
with:
version: 0.44.0
- name: Setup (node)
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Setup (ts-proto)
run: |
npm i [email protected]
- name: Generate
run: |
rm -rf ./node/bottle
rm -rf ./node/protos
mkdir -p ./node/bottle
mkdir -p ./node/protos
cp -R ./master/protos/. ./node/protos/
cd ./node/protos
buf generate --template '{"version":"v1beta1","plugins":[{"name":"js","out":"../","opt":"import_style=commonjs,binary"},{"name":"ts","path":"../../node_modules/.bin/protoc-gen-ts_proto","out":"../"}]}'