-
Notifications
You must be signed in to change notification settings - Fork 352
187 lines (158 loc) · 4.96 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
name: CI
on:
pull_request:
merge_group:
push:
branches:
- 'staging'
- 'trying'
jobs:
generate-assets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
generate-assets/target/
key: ${{ runner.os }}-generate-assets-${{ hashFiles('generate-assets/Cargo.toml') }}
- name: Get cache key
id: cache-key
run: echo "::set-output name=key::$(date +'%Y-%m-%d')"
- name: Get crates.io datadump from cache
uses: actions/cache@v2
with:
path: generate-assets/data
key: ${{ runner.os }}-${{ steps.cache-key.outputs.key }}
- name: "Build Bevy Assets"
run: >
cd generate-assets &&
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} &&
./generate_assets.sh
- uses: actions/upload-artifact@master
with:
name: generated-assets
path: content/assets
retention-days: 1
generate-errors:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
generate-errors/target/
key: ${{ runner.os }}-generate-errors-${{ hashFiles('generate-errors/Cargo.toml') }}
- name: "Build Bevy Error Codes"
run: >
cd generate-errors &&
./generate_errors.sh
- uses: actions/upload-artifact@master
with:
name: generated-errors
path: content/learn/errors
retention-days: 1
generate-wasm-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-generate-wasm-examples-${{ hashFiles('generate-wasm-examples/bevy/Cargo.toml') }}
- uses: dtolnay/rust-toolchain@stable
with:
target: wasm32-unknown-unknown
- name: "Build Bevy Examples"
run: |
cd generate-wasm-examples &&
./generate_wasm_examples.sh
- uses: actions/upload-artifact@master
with:
name: generated-wasm-examples
path: content/examples
retention-days: 1
- uses: actions/upload-artifact@master
with:
name: generated-wasm-examples-webgpu
path: content/examples-webgpu
retention-days: 1
generate-community:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
generate-community/target/
key: ${{ runner.os }}-generate-community-${{ hashFiles('generate-community/Cargo.toml') }}
- name: "Build Bevy Community"
run: >
cd generate-community &&
./generate_community.sh
- uses: actions/upload-artifact@master
with:
name: generated-community
path: content/community/people
retention-days: 1
markdownlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
- name: Run Markdown Lint
uses: docker://ghcr.io/github/super-linter:slim-v4
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_MARKDOWN: true
DEFAULT_BRANCH: main
build-website:
runs-on: ubuntu-latest
needs: [markdownlint, generate-assets, generate-errors, generate-wasm-examples, generate-community]
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@master
with:
name: generated-assets
path: content/assets
- uses: actions/download-artifact@master
with:
name: generated-errors
path: content/learn/errors
- uses: actions/download-artifact@master
with:
name: generated-wasm-examples
path: content/examples
- uses: actions/download-artifact@master
with:
name: generated-wasm-examples-webgpu
path: content/examples-webgpu
- uses: actions/download-artifact@master
with:
name: generated-community
path: content/community/people
- name: "Build website"
uses: shalzz/[email protected]
env:
PAGES_BRANCH: gh-pages
BUILD_DIR: .
BUILD_ONLY: true
TOKEN: fake-secret