forked from nannou-org/nannou
-
Notifications
You must be signed in to change notification settings - Fork 0
262 lines (254 loc) · 8.02 KB
/
nannou.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
name: nannou
on: [push, pull_request]
jobs:
rustfmt-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
cargo-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update apt
run: sudo apt update
- name: Install alsa dev tools
run: sudo apt-get install libasound2-dev
- name: Install libxcb dev tools
run: sudo apt-get install libxcb-composite0-dev
- name: Install stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- name: Run default features
uses: actions-rs/cargo@v1
with:
command: test
args: --lib --bins --verbose
- name: Test docs
uses: actions-rs/cargo@v1
with:
command: test
args: --doc --verbose
cargo-test-all-features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update apt
run: sudo apt update
- name: Install alsa dev tools
run: sudo apt-get install libasound2-dev
- name: Install libxcb dev tools
run: sudo apt-get install libxcb-composite0-dev
- name: Install stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- name: Run all features
uses: actions-rs/cargo@v1
with:
command: test
args: --lib --bins --all-features --verbose
- name: Test docs all features
uses: actions-rs/cargo@v1
with:
command: test
args: --doc --all-features --verbose
cargo-test-core-no-std:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update apt
run: sudo apt update
- name: Install libxcb dev tools
run: sudo apt-get install libxcb-composite0-dev
- name: Install stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- name: Text no_std
uses: actions-rs/cargo@v1
with:
command: test
args: -p nannou_core --no-default-features --features "libm" --verbose
- name: Test no_std serde
uses: actions-rs/cargo@v1
with:
command: test
args: -p nannou_core --no-default-features --features "libm serde" --verbose
cargo-check-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update apt
run: sudo apt update
- name: Install alsa dev tools
run: sudo apt-get install libasound2-dev
- name: Install libxcb dev tools
run: sudo apt-get install libxcb-composite0-dev
- name: Install stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v1
- name: Run check
uses: actions-rs/cargo@v1
with:
command: check
args: --examples --verbose
- name: Check nannou package builds against wasm32-unknown-unknown
uses: actions-rs/cargo@v1
with:
command: build
args: -p nannou --features wasm-experimental --target wasm32-unknown-unknown
cargo-publish:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
env:
CRATESIO_TOKEN: ${{ secrets.CRATESIO_TOKEN }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update apt
run: sudo apt update
- name: Install alsa dev tools
run: sudo apt-get install libasound2-dev
- name: Install libxcb dev tools
run: sudo apt-get install libxcb-composite0-dev
- name: Install stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Cargo publish nannou_core
continue-on-error: true
run: cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_core/Cargo.toml
- name: Cargo publish nannou_wgpu
continue-on-error: true
run: cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_wgpu/Cargo.toml
- name: Wait for crates.io
run: sleep 30
- name: Cargo publish nannou_mesh
continue-on-error: true
run: cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_mesh/Cargo.toml
- name: Wait for crates.io
run: sleep 30
- name: Cargo publish nannou
continue-on-error: true
run: cargo publish --token $CRATESIO_TOKEN --manifest-path nannou/Cargo.toml
- name: Cargo publish nannou_audio
continue-on-error: true
run: cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_audio/Cargo.toml
# TODO: Add this once `nannou_isf` is ready.
# - name: Cargo publish nannou_isf
# continue-on-error: true
# run: cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_isf/Cargo.toml
- name: Cargo publish nannou_laser
continue-on-error: true
run: cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_laser/Cargo.toml
- name: Cargo publish nannou_osc
continue-on-error: true
run: cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_osc/Cargo.toml
- name: Wait for crates.io
run: sleep 15
- name: Cargo publish nannou_egui
continue-on-error: true
run: cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_egui/Cargo.toml
guide-build-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update apt
run: sudo apt update
- name: Install stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- name: Install mdbook
uses: actions-rs/cargo@v1
with:
command: install
args: mdbook
- name: Build book
run: mdbook build guide/
guide-test-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update apt
run: sudo apt update
- name: Install alsa dev tools
run: sudo apt-get install libasound2-dev
- name: Install libxcb dev tools
run: sudo apt-get install libxcb-composite0-dev
- name: Install stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- name: Run guide tests
uses: actions-rs/cargo@v1
with:
command: test
args: -p book_tests --verbose
guide-push-to-deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rust stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install mdbook
uses: actions-rs/cargo@v1
with:
command: install
args: mdbook
- name: Build book
run: mdbook build guide/
- name: Commit book to deploy branch
run: |
git config user.email "[email protected]"
git config user.name "GitHub Action"
git remote add nannou-org https://${{ secrets.DEPLOY_GUIDE_TOKEN }}@github.com/${{ github.repository }}.git
git fetch nannou-org &&
git config credential.helper "store --file=.git/credentials" &&
echo "https://${{ secrets.DEPLOY_GUIDE_TOKEN }}:@github.com" > .git/credentials &&
git checkout deploy &&
cp -r guide/book/* . &&
git add -A . &&
git commit -m "Automated commit in preparation for deployment: $GITHUB_RUN_NUMBER" || true
- name: Push changes to deploy branch
run: |
git push --force --quiet nannou-org deploy &>/dev/null