-
Notifications
You must be signed in to change notification settings - Fork 1
280 lines (275 loc) · 7.72 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
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
name: CI
on:
pull_request:
branches: [ "main" ]
push:
branches: [ "main" ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
RUST_BACKTRACE: 1
RUSTFLAGS: '--codegen=debuginfo=0 --deny=warnings'
RUSTDOCFLAGS: '--deny=warnings'
CARGO_TERM_COLOR: always
ZNG_TP_LICENSES: false
NEXTEST_RETRIES: 3
jobs:
check-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: sudo apt install libfontconfig1-dev
- uses: Swatinem/rust-cache@v2
- run: cargo do version --verbose
- run: cargo do fmt --check
- run: cargo do check
- run: cargo do l10n --all --check
check-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo do version --verbose
- run: cargo do fmt --check
- run: cargo do check
check-windows:
runs-on: windows-latest
env:
CC: 'clang-cl'
CXX: 'clang-cl'
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo do version --verbose
- run: cargo do fmt --check
- run: cargo do check
check-release:
runs-on: ubuntu-latest
needs: [check-ubuntu]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: sudo apt install libfontconfig1-dev
- uses: Swatinem/rust-cache@v2
- run: cargo check --workspace --examples --tests --release
check-wasm:
runs-on: ubuntu-latest
needs: [check-ubuntu]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: install wasm-pack
uses: baptiste0928/cargo-install@v3
with:
crate: wasm-pack
- uses: Swatinem/rust-cache@v2
- run: cargo do run-wasm multi --no-serve
check-android:
runs-on: ubuntu-latest
needs: [check-ubuntu]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-linux-android, armv7-linux-androideabi
- name: install cargo-ndk
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-ndk
- uses: Swatinem/rust-cache@v2
- run: cargo do build-apk multi
check-android-windows:
runs-on: windows-latest
needs: [check-windows]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-linux-android, armv7-linux-androideabi
- name: install cargo-ndk
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-ndk
- uses: Swatinem/rust-cache@v2
- run: cargo do build-apk multi
check-android-macos:
runs-on: macos-latest
needs: [check-macos]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-linux-android, armv7-linux-androideabi
- name: install cargo-ndk
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-ndk
- uses: Swatinem/rust-cache@v2
- run: cargo do build-apk multi
# check-ios:
# runs-on: macos-latest
# needs: [check-macos]
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@stable
# with:
# targets: aarch64-apple-ios
# - name: install cargo-lipo
# uses: baptiste0928/cargo-install@v3
# with:
# crate: cargo-lipo
# - uses: Swatinem/rust-cache@v2
# - run: cargo do build-ios multi
doc:
runs-on: ubuntu-latest
needs: [check-ubuntu]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: sudo apt install libfontconfig1-dev
- uses: Swatinem/rust-cache@v2
with:
cache-targets: false # do doc needs a clean target/doc
- run: cargo do doc
test-ubuntu:
runs-on: ubuntu-latest
needs: [check-ubuntu]
env:
ZNG_TP_LICENSES: true
steps:
- uses: dtolnay/rust-toolchain@stable
- name: install cargo-about
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-about
- name: install cargo-nextest
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- run: sudo apt install libfontconfig1-dev
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- run: cargo do test --nextest
test-windows:
runs-on: windows-latest
needs: [check-windows]
env:
ZNG_TP_LICENSES: true
CC: 'clang-cl'
CXX: 'clang-cl'
steps:
- uses: dtolnay/rust-toolchain@stable
- name: install cargo-about
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-about
- name: install cargo-nextest
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- run: cargo do test --nextest
test-macos:
runs-on: macos-latest
needs: [check-macos]
env:
ZNG_TP_LICENSES: true
steps:
- uses: dtolnay/rust-toolchain@stable
- name: install cargo-about
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-about
- name: install cargo-nextest
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- run: cargo do test --nextest
test-doc:
runs-on: ubuntu-latest
needs: [check-ubuntu]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: sudo apt install libfontconfig1-dev
- uses: Swatinem/rust-cache@v2
- run: cargo do test --doc
test-macro:
runs-on: ubuntu-latest
needs: [check-ubuntu]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rust-src
- run: sudo apt install libfontconfig1-dev
- uses: Swatinem/rust-cache@v2
- run: cargo do test --macro --all
test-render-ubuntu:
runs-on: ubuntu-latest
needs: [check-ubuntu]
steps:
- uses: dtolnay/rust-toolchain@stable
- name: install winit deps
run: |
sudo apt-get update
sudo apt install libxkbcommon-x11-0
- uses: actions/checkout@v4
- run: sudo apt install libfontconfig1-dev
- uses: Swatinem/rust-cache@v2
- name: cargo do test --render --no-prebuilt
uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a
with:
run: cargo do test --render --no-prebuilt
test-render-windows:
runs-on: windows-latest
needs: [check-windows]
env:
ZNG_TP_LICENSES: true
CC: 'clang-cl'
CXX: 'clang-cl'
steps:
- uses: dtolnay/rust-toolchain@stable
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- run: cargo do test --render --no-prebuilt
test-render-macos:
runs-on: macos-latest
needs: [check-macos]
env:
ZNG_TP_LICENSES: true
steps:
- uses: dtolnay/rust-toolchain@stable
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- run: cargo do test --render --no-prebuilt
test-all:
runs-on: ubuntu-latest
needs: [
check-release,
check-wasm,
check-android,
check-android-windows,
check-android-macos,
doc,
test-ubuntu,
test-windows,
test-macos,
test-doc,
test-macro,
test-render-ubuntu,
test-render-windows,
test-render-macos
]
steps:
- run: exit 0