Skip to content

Commit 70b62d1

Browse files
authored
Merge branch 'main' into 0.13-blog
2 parents e9756e6 + a960b54 commit 70b62d1

File tree

205 files changed

+16343
-8208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+16343
-8208
lines changed

.gitattributes

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# From: https://docs.github.com/en/github/getting-started-with-github/configuring-git-to-handle-line-endings
2+
# Set the default behavior, in case people don't have core.autocrlf set.
3+
* text=auto
4+
5+
# Explicitly declare text files you want to always be normalized and converted
6+
# to native line endings on checkout.
7+
*.rs text eol=lf
8+
*.toml text eol=lf
9+
*.frag text eol=lf
10+
*.vert text eol=lf
11+
*.wgsl text eol=lf
12+
*.md text eof=lf
13+
*.html text eof=lf
14+
*.scss text eof=lf
15+
*.js text eof=lf
16+
*.mjs text eof=lf
17+
*.svg text eof=lf
18+
*.txt text eof=lf
19+
*.xml text eof=lf
20+
*.yml text eof=lf
21+
*.sh text eof=lf
22+
23+
# Denote all files that are truly binary and should not be modified.
24+
*.png binary
25+
*.jpg binary
26+
*.gif binary
27+
*.webp binary
28+
*.ttf binary
29+
*.woff binary
30+
*.woff2 binary
31+
*.eot binary
32+
*.mp4 binary

.github/bors.toml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/linters/.markdown-lint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Keep synced with duplicate in project root
2-
3-
line-length: false
4-
no-inline-html: false
5-
no-trailing-punctuation: false
1+
# Keep synced with duplicate in project root
2+
3+
line-length: false
4+
no-inline-html: false
5+
no-trailing-punctuation: false

.github/workflows/build-wasm-examples.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ jobs:
1818
steps:
1919

2020
- name: Checkout Bevy latest tag
21-
uses: actions/checkout@master
21+
uses: actions/checkout@v4
2222
with:
2323
repository: 'bevyengine/bevy'
2424
ref: 'latest'
2525

2626
# temporary: fetch tools from main branch
2727
- name: Checkout Bevy Tools
28-
uses: actions/checkout@master
28+
uses: actions/checkout@v4
2929
with:
3030
repository: 'bevyengine/bevy'
3131
ref: 'main'
@@ -52,7 +52,7 @@ jobs:
5252
cargo run -p example-showcase -- --per-page ${{ env.PER_PAGE }} --page ${{ matrix.page }} build-wasm-examples --content-folder wasm-examples --api ${{ matrix.api }} --website-hacks --optimize-size
5353
5454
- name: Upload Generated Files
55-
uses: actions/upload-artifact@v3
55+
uses: actions/upload-artifact@v4
5656
with:
5757
name: ${{ matrix.api }}-examples-${{ matrix.page }}
5858
path: wasm-examples
@@ -67,7 +67,7 @@ jobs:
6767
steps:
6868

6969
- name: Download all artifacts
70-
uses: actions/download-artifact@v3
70+
uses: actions/download-artifact@v4
7171

7272
- name: Group examples in one folder
7373
run: |

.github/workflows/ci.yml

Lines changed: 108 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,88 @@ on:
99
- 'trying'
1010

1111
jobs:
12+
markdownlint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
# Full git history is needed to get a proper list of changed files within `super-linter`
18+
fetch-depth: 0
19+
- name: Run Markdown Lint
20+
uses: docker://ghcr.io/github/super-linter:slim-v4
21+
env:
22+
VALIDATE_ALL_CODEBASE: false
23+
VALIDATE_MARKDOWN: true
24+
DEFAULT_BRANCH: main
25+
26+
test-code-examples:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Install Rust
32+
uses: dtolnay/rust-toolchain@stable
33+
34+
- name: Install alsa and udev
35+
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
36+
37+
- name: Build & run doc tests
38+
run: cd code-validation && cargo test
39+
40+
check-hide-lines:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- name: Install Rust
46+
uses: dtolnay/rust-toolchain@stable
47+
48+
- name: Check hide-lines
49+
run: cd write-rustdoc-hide-lines && cargo run --release -- check ../content
50+
51+
lint-tools:
52+
runs-on: ubuntu-latest
53+
env:
54+
TOOLS: |
55+
code-validation generate-assets generate-community generate-errors generate-release write-rustdoc-hide-lines
56+
steps:
57+
- uses: actions/checkout@v4
58+
59+
- name: Install Rust
60+
uses: dtolnay/rust-toolchain@stable
61+
62+
- name: Install alsa and udev
63+
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
64+
65+
- name: Check formatting
66+
run: |
67+
for CRATE in $TOOLS; do
68+
cd $CRATE
69+
70+
echo Checking $CRATE
71+
cargo fmt --check
72+
73+
cd ..
74+
done
75+
76+
- name: Check clippy
77+
run: |
78+
for CRATE in $TOOLS; do
79+
cd $CRATE
80+
81+
echo Checking $CRATE
82+
cargo clippy -- -Dwarnings
83+
84+
cd ..
85+
done
86+
1287
generate-assets:
88+
needs: [markdownlint, test-code-examples, lint-tools, check-hide-lines]
1389
runs-on: ubuntu-latest
1490
steps:
15-
- uses: actions/checkout@master
91+
- uses: actions/checkout@v4
1692

17-
- uses: actions/cache@v3
93+
- uses: actions/cache@v4
1894
with:
1995
path: |
2096
~/.cargo/bin/
@@ -26,10 +102,10 @@ jobs:
26102

27103
- name: Get cache key
28104
id: cache-key
29-
run: echo "::set-output name=key::$(date +'%Y-%m-%d')"
105+
run: echo "key=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
30106

31107
- name: Get crates.io datadump from cache
32-
uses: actions/cache@v2
108+
uses: actions/cache@v4
33109
with:
34110
path: generate-assets/data
35111
key: ${{ runner.os }}-${{ steps.cache-key.outputs.key }}
@@ -40,18 +116,19 @@ jobs:
40116
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} &&
41117
./generate_assets.sh
42118
43-
- uses: actions/upload-artifact@master
119+
- uses: actions/upload-artifact@v4
44120
with:
45121
name: generated-assets
46122
path: content/assets
47123
retention-days: 1
48124

49125
generate-errors:
126+
needs: [markdownlint, test-code-examples, lint-tools, check-hide-lines]
50127
runs-on: ubuntu-latest
51128
steps:
52-
- uses: actions/checkout@master
129+
- uses: actions/checkout@v4
53130

54-
- uses: actions/cache@v3
131+
- uses: actions/cache@v4
55132
with:
56133
path: |
57134
~/.cargo/bin/
@@ -66,24 +143,32 @@ jobs:
66143
cd generate-errors &&
67144
./generate_errors.sh
68145
69-
- uses: actions/upload-artifact@master
146+
- uses: actions/upload-artifact@v4
70147
with:
71148
name: generated-errors
72149
path: content/learn/errors
73150
retention-days: 1
74151

75152
generate-wasm-examples:
153+
needs: [markdownlint, test-code-examples, lint-tools, check-hide-lines]
76154
runs-on: ubuntu-latest
77155
steps:
78-
- uses: actions/checkout@master
156+
- uses: actions/checkout@v4
157+
158+
- name: "Clone Bevy"
159+
run: >
160+
cd generate-wasm-examples &&
161+
./clone_bevy.sh
79162
80-
- uses: actions/cache@v3
163+
- uses: actions/cache@v4
81164
with:
82165
path: |
83166
~/.cargo/bin/
84167
~/.cargo/registry/index/
85168
~/.cargo/registry/cache/
86169
~/.cargo/git/db/
170+
generate-wasm-examples/bevy/target/
171+
content/examples/**/*.wasm
87172
key: ${{ runner.os }}-generate-wasm-examples-${{ hashFiles('generate-wasm-examples/bevy/Cargo.toml') }}
88173

89174
- uses: dtolnay/rust-toolchain@stable
@@ -95,24 +180,25 @@ jobs:
95180
cd generate-wasm-examples &&
96181
./generate_wasm_examples.sh
97182
98-
- uses: actions/upload-artifact@master
183+
- uses: actions/upload-artifact@v4
99184
with:
100185
name: generated-wasm-examples
101186
path: content/examples
102187
retention-days: 1
103188

104-
- uses: actions/upload-artifact@master
189+
- uses: actions/upload-artifact@v4
105190
with:
106191
name: generated-wasm-examples-webgpu
107192
path: content/examples-webgpu
108193
retention-days: 1
109194

110195
generate-community:
196+
needs: [markdownlint, test-code-examples, lint-tools, check-hide-lines]
111197
runs-on: ubuntu-latest
112198
steps:
113-
- uses: actions/checkout@master
199+
- uses: actions/checkout@v4
114200

115-
- uses: actions/cache@v3
201+
- uses: actions/cache@v4
116202
with:
117203
path: |
118204
~/.cargo/bin/
@@ -127,53 +213,39 @@ jobs:
127213
cd generate-community &&
128214
./generate_community.sh
129215
130-
- uses: actions/upload-artifact@master
216+
- uses: actions/upload-artifact@v4
131217
with:
132218
name: generated-community
133219
path: content/community/people
134220
retention-days: 1
135221

136-
markdownlint:
137-
runs-on: ubuntu-latest
138-
steps:
139-
- uses: actions/checkout@v2
140-
with:
141-
# Full git history is needed to get a proper list of changed files within `super-linter`
142-
fetch-depth: 0
143-
- name: Run Markdown Lint
144-
uses: docker://ghcr.io/github/super-linter:slim-v4
145-
env:
146-
VALIDATE_ALL_CODEBASE: false
147-
VALIDATE_MARKDOWN: true
148-
DEFAULT_BRANCH: main
149-
150222
build-website:
151223
runs-on: ubuntu-latest
152-
needs: [markdownlint, generate-assets, generate-errors, generate-wasm-examples, generate-community]
224+
needs: [markdownlint, test-code-examples, lint-tools, check-hide-lines, generate-assets, generate-errors, generate-wasm-examples, generate-community]
153225

154226
steps:
155-
- uses: actions/checkout@master
156-
- uses: actions/download-artifact@master
227+
- uses: actions/checkout@v4
228+
- uses: actions/download-artifact@v4
157229
with:
158230
name: generated-assets
159231
path: content/assets
160232

161-
- uses: actions/download-artifact@master
233+
- uses: actions/download-artifact@v4
162234
with:
163235
name: generated-errors
164236
path: content/learn/errors
165237

166-
- uses: actions/download-artifact@master
238+
- uses: actions/download-artifact@v4
167239
with:
168240
name: generated-wasm-examples
169241
path: content/examples
170242

171-
- uses: actions/download-artifact@master
243+
- uses: actions/download-artifact@v4
172244
with:
173245
name: generated-wasm-examples-webgpu
174246
path: content/examples-webgpu
175247

176-
- uses: actions/download-artifact@master
248+
- uses: actions/download-artifact@v4
177249
with:
178250
name: generated-community
179251
path: content/community/people

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ jobs:
1111
build_and_deploy:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@master
14+
- uses: actions/checkout@v4
1515

1616
- name: Get current date
1717
id: date
18-
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
18+
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
1919

2020
- name: Cache multiple crates.io datadump
21-
uses: actions/cache@v2
21+
uses: actions/cache@v4
2222
with:
2323
path: generate-assets/data
2424
key: ${{ runner.os }}-${{ steps.date.outputs.date }}

0 commit comments

Comments
 (0)