-
Notifications
You must be signed in to change notification settings - Fork 18
333 lines (324 loc) · 12.8 KB
/
build.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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
name: build
on:
pull_request:
types: [ opened, synchronize ]
jobs:
build-vegafusion-server-linux-64:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # pin@v2
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # pin@v1
with:
toolchain: stable
override: true
- name: Cache rust dependencies
uses: Swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b # pin@v1
with:
cache-on-failure: True
- name: Build vegafusion-server (Mac/Linux)
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # pin@v1
with:
command: build
args: -p vegafusion-server --release --features=protobuf-src
- name: zip executable
uses: papeloto/action-zip@5f1c4aa587ea41db1110df6a99981dbe19cee310 # pin@v1
with:
files: target/release/vegafusion-server
dest: vegafusion-server-linux-64.zip
- name: Upload artifacts
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # pin@v2
with:
name: vegafusion-server
path: |
vegafusion-server-*
build-vegafusion-server-linux-arm64:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # pin@v2
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # pin@v1
with:
toolchain: stable
override: true
- name: Cache rust dependencies
uses: Swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b # pin@v1
with:
cache-on-failure: True
- name: Download arm64 toolchain
run: |
rustup target add aarch64-unknown-linux-gnu
- name: Download gcc for cross compilation
run: |
sudo apt-get update
sudo apt-get install gcc-aarch64-linux-gnu
- name: Build vegafusion-server
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # pin@v1
env:
RUSTFLAGS: "-C linker=aarch64-linux-gnu-gcc"
with:
command: build
args: -p vegafusion-server --release --features=protobuf-src --target=aarch64-unknown-linux-gnu
- name: zip executable
uses: papeloto/action-zip@5f1c4aa587ea41db1110df6a99981dbe19cee310 # pin@v1
with:
files: target/aarch64-unknown-linux-gnu/release/vegafusion-server
dest: vegafusion-server-linux-arm64.zip
- name: Upload artifacts
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # pin@v2
with:
name: vegafusion-server
path: |
vegafusion-server-*
build-vegafusion-server-win-64:
runs-on: windows-2022
steps:
- name: Check out repository code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # pin@v2
- name: Install protoc on Window
run: |
choco install --yes protoc
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # pin@v1
with:
toolchain: stable
override: true
- name: Build vegafusion-server (Windows)
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # pin@v1
with:
command: build
args: -p vegafusion-server --release
- name: zip executable
uses: papeloto/action-zip@5f1c4aa587ea41db1110df6a99981dbe19cee310 # pin@v1
with:
files: target/release/vegafusion-server.exe
dest: vegafusion-server-win-64.zip
- name: Upload artifacts
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # pin@v2
with:
name: vegafusion-server
path: |
vegafusion-server-*
build-vegafusion-server-osx-64:
runs-on: macos-11
steps:
- name: Check out repository code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # pin@v2
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # pin@v1
with:
toolchain: stable
override: true
- name: Cache rust dependencies
uses: Swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b # pin@v1
with:
cache-on-failure: True
- name: Build vegafusion-server
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # pin@v1
with:
command: build
args: -p vegafusion-server --release --features=protobuf-src
- name: zip executable
uses: papeloto/action-zip@5f1c4aa587ea41db1110df6a99981dbe19cee310 # pin@v1
with:
files: target/release/vegafusion-server
dest: vegafusion-server-osx-64.zip
- name: Upload artifacts
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # pin@v2
with:
name: vegafusion-server
path: |
vegafusion-server-*
build-vegafusion-server-osx-arm64:
runs-on: macos-11
steps:
- name: Check out repository code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # pin@v2
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # pin@v1
with:
toolchain: stable
override: true
- name: Cache rust dependencies
uses: Swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b # pin@v1
with:
cache-on-failure: True
- name: Download Apple Silicon toolchain
run: |
rustup target add aarch64-apple-darwin
- name: Build vegafusion-server
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # pin@v1
with:
command: build
args: -p vegafusion-server --release --target aarch64-apple-darwin --features=protobuf-src
- name: zip executable (Apple silicon)
uses: papeloto/action-zip@5f1c4aa587ea41db1110df6a99981dbe19cee310 # pin@v1
with:
files: target/aarch64-apple-darwin/release/vegafusion-server
dest: vegafusion-server-osx-arm64.zip
- name: Upload artifacts
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # pin@v2
with:
name: vegafusion-server
path: |
vegafusion-server-*
build-vegafusion-python-embed-linux-64:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # pin@v2
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # pin@v1
with:
toolchain: stable
override: true
- name: Cache rust dependencies
uses: Swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b # pin@v1
with:
cache-on-failure: True
- name: Build wheels (Linux)
uses: messense/maturin-action@6d52485c3b3044e20b4c8ee6ce6f61e20a7645b0 # pin@v1
with:
command: build
manylinux: 2014
rust-toolchain: stable
args: --release -m vegafusion-python-embed/Cargo.toml --features=protobuf-src --strip
- name: Upload artifacts
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # pin@v2
with:
name: vegafusion-python-embed-wheels
path: |
target/wheels/*.tar.gz
target/wheels/*.whl
build-vegafusion-python-embed-linux-arm64:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # pin@v2
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # pin@v1
with:
toolchain: stable
override: true
- name: Cache rust dependencies
uses: Swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b # pin@v1
with:
cache-on-failure: True
- name: Download arm64 toolchain
run: |
rustup target add aarch64-unknown-linux-gnu
- name: Build arm64 wheels
uses: messense/maturin-action@6d52485c3b3044e20b4c8ee6ce6f61e20a7645b0 # pin@v1
with:
command: build
manylinux: 2014
rust-toolchain: stable
args: --release -m vegafusion-python-embed/Cargo.toml --features=protobuf-src --strip --target aarch64-unknown-linux-gnu
- name: Upload artifacts
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # pin@v2
with:
name: vegafusion-python-embed-wheels
path: |
target/wheels/*.tar.gz
target/wheels/*.whl
build-vegafusion-python-embed-win-64:
runs-on: windows-latest
steps:
- name: Check out repository code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # pin@v2
- name: Install protoc
run: |
choco install --yes protoc
- name: Setup Python 3.10
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # pin@v4
with:
architecture: 'x64'
python-version: '3.10'
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # pin@v1
with:
toolchain: stable
override: true
- name: Cache rust dependencies
uses: Swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b # pin@v1
with:
cache-on-failure: True
- name: Build wheels
uses: messense/maturin-action@6d52485c3b3044e20b4c8ee6ce6f61e20a7645b0 # pin@v1
with:
command: build
manylinux: 2014
rust-toolchain: stable
args: --release -m vegafusion-python-embed/Cargo.toml --strip
- name: Upload artifacts
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # pin@v2
with:
name: vegafusion-python-embed-wheels
path: |
target/wheels/*.tar.gz
target/wheels/*.whl
build-vegafusion-python-embed-osx-64:
runs-on: macos-11
steps:
- name: Check out repository code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # pin@v2
- name: Install protoc
run: |
brew install protobuf
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # pin@v1
with:
toolchain: stable
override: true
- name: Cache rust dependencies
uses: Swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b # pin@v1
with:
cache-on-failure: True
- name: Build wheels
uses: messense/maturin-action@6d52485c3b3044e20b4c8ee6ce6f61e20a7645b0 # pin@v1
with:
command: build
rust-toolchain: stable
args: --release -m vegafusion-python-embed/Cargo.toml --strip
- name: Upload artifacts
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # pin@v2
with:
name: vegafusion-python-embed-wheels
path: |
target/wheels/*.tar.gz
target/wheels/*.whl
build-vegafusion-python-embed-osx-arm64:
runs-on: macos-11
steps:
- name: Check out repository code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # pin@v2
- name: Install protoc
run: |
brew install protobuf
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # pin@v1
with:
toolchain: stable
override: true
- name: Cache rust dependencies
uses: Swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b # pin@v1
with:
cache-on-failure: True
- name: Download Apple Silicon toolchain
run: |
rustup target add aarch64-apple-darwin
- name: Build Apple Silicon wheels
uses: messense/maturin-action@6d52485c3b3044e20b4c8ee6ce6f61e20a7645b0 # pin@v1
with:
command: build
rust-toolchain: stable
args: --release -m vegafusion-python-embed/Cargo.toml --strip --target aarch64-apple-darwin
- name: Upload artifacts
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # pin@v2
with:
name: vegafusion-python-embed-wheels
path: |
target/wheels/*.tar.gz
target/wheels/*.whl