Skip to content

Commit 1b513dc

Browse files
committed
Merge branch 'main' into debug-draw
2 parents 2319cc8 + 7d5f89c commit 1b513dc

File tree

301 files changed

+8288
-4560
lines changed

Some content is hidden

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

301 files changed

+8288
-4560
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# These are supported funding model platforms
22

3-
github: cart
3+
custom: https://bevyengine.org/community/donate/

.github/bors.toml

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

.github/workflows/ci-comment-failures.yml

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,65 @@ jobs:
117117
owner: context.repo.owner,
118118
repo: context.repo.repo,
119119
issue_number: issue_number,
120-
body: 'You added a new example but didn\'t update the readme. Please run `cargo run -p build-example-pages -- update` to update it, and commit the file change.'
120+
body: 'You added a new example but didn\'t update the readme. Please run `cargo run -p build-templated-pages -- update examples` to update it, and commit the file change.'
121+
});
122+
}
123+
124+
missing-features:
125+
runs-on: ubuntu-latest
126+
if: >
127+
github.event.workflow_run.event == 'pull_request' &&
128+
github.event.workflow_run.conclusion == 'failure'
129+
steps:
130+
- name: 'Download artifact'
131+
id: find-artifact
132+
uses: actions/github-script@v6
133+
with:
134+
result-encoding: string
135+
script: |
136+
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
137+
owner: context.repo.owner,
138+
repo: context.repo.repo,
139+
run_id: ${{github.event.workflow_run.id }},
140+
});
141+
var matchArtifacts = artifacts.data.artifacts.filter((artifact) => {
142+
return artifact.name == "missing-features"
143+
});
144+
if (matchArtifacts.length == 0) { return "false" }
145+
var matchArtifact = matchArtifacts[0];
146+
var download = await github.rest.actions.downloadArtifact({
147+
owner: context.repo.owner,
148+
repo: context.repo.repo,
149+
artifact_id: matchArtifact.id,
150+
archive_format: 'zip',
151+
});
152+
var fs = require('fs');
153+
fs.writeFileSync('${{github.workspace}}/missing-features.zip', Buffer.from(download.data));
154+
return "true"
155+
- run: unzip missing-features.zip
156+
if: ${{ steps.find-artifact.outputs.result == 'true' }}
157+
- name: 'Comment on PR'
158+
if: ${{ steps.find-artifact.outputs.result == 'true' }}
159+
uses: actions/github-script@v6
160+
with:
161+
github-token: ${{ secrets.GITHUB_TOKEN }}
162+
script: |
163+
var fs = require('fs');
164+
var issue_number = Number(fs.readFileSync('./NR'));
165+
if (fs.existsSync('./missing-features')) {
166+
await github.rest.issues.createComment({
167+
owner: context.repo.owner,
168+
repo: context.repo.repo,
169+
issue_number: issue_number,
170+
body: 'You added a new feature but didn\'t add a description for it. Please update the root Cargo.toml file.'
171+
});
172+
}
173+
if (fs.existsSync('./missing-update')) {
174+
await github.rest.issues.createComment({
175+
owner: context.repo.owner,
176+
repo: context.repo.repo,
177+
issue_number: issue_number,
178+
body: 'You added a new feature but didn\'t update the readme. Please run `cargo run -p build-templated-pages -- update features` to update it, and commit the file change.'
121179
});
122180
}
123181

.github/workflows/ci.yml

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: CI
22

33
on:
4+
merge_group:
45
pull_request:
56
push:
6-
branches-ignore:
7-
- 'dependabot/**'
8-
- staging-squash-merge.tmp
7+
branches:
8+
- main
99

1010
env:
1111
CARGO_TERM_COLOR: always
@@ -146,7 +146,7 @@ jobs:
146146
markdownlint:
147147
runs-on: ubuntu-latest
148148
timeout-minutes: 30
149-
needs: check-missing-examples-in-docs
149+
needs: check-missing-features-in-docs
150150
if: always()
151151
steps:
152152
- uses: actions/checkout@v3
@@ -257,14 +257,14 @@ jobs:
257257
- uses: actions/checkout@v3
258258
- name: check for missing metadata
259259
id: missing-metadata
260-
run: cargo run -p build-example-pages -- check-missing
260+
run: cargo run -p build-templated-pages -- check-missing examples
261261
- name: check for missing update
262262
id: missing-update
263-
run: cargo run -p build-example-pages -- update
263+
run: cargo run -p build-templated-pages -- update examples
264264
- name: Check for modified files
265265
run: |
266266
echo "if this step fails, run the following command and commit the changed file on your PR."
267-
echo " > cargo run -p build-example-pages -- update"
267+
echo " > cargo run -p build-templated-pages -- update examples"
268268
git diff --quiet HEAD --
269269
- name: Save PR number
270270
if: ${{ failure() && github.event_name == 'pull_request' }}
@@ -283,29 +283,39 @@ jobs:
283283
name: missing-examples
284284
path: missing-examples/
285285

286-
check-unused-dependencies:
286+
check-missing-features-in-docs:
287287
runs-on: ubuntu-latest
288288
timeout-minutes: 30
289+
needs: check-missing-examples-in-docs
289290
steps:
290291
- uses: actions/checkout@v3
291-
- uses: actions/cache@v3
292-
with:
293-
path: |
294-
~/.cargo/bin/
295-
~/.cargo/registry/index/
296-
~/.cargo/registry/cache/
297-
~/.cargo/git/db/
298-
target/
299-
key: ${{ runner.os }}-cargo-check-unused-dependencies-${{ hashFiles('**/Cargo.toml') }}
300-
- uses: dtolnay/rust-toolchain@master
292+
- name: check for missing features
293+
id: missing-features
294+
run: cargo run -p build-templated-pages -- check-missing features
295+
- name: check for missing update
296+
id: missing-update
297+
run: cargo run -p build-templated-pages -- update features
298+
- name: Check for modified files
299+
run: |
300+
echo "if this step fails, run the following command and commit the changed file on your PR."
301+
echo " > cargo run -p build-templated-pages -- update features"
302+
git diff --quiet HEAD --
303+
- name: Save PR number
304+
if: ${{ failure() && github.event_name == 'pull_request' }}
305+
run: |
306+
mkdir -p ./missing-features
307+
echo ${{ github.event.number }} > ./missing-features/NR
308+
- name: log failed task - missing features
309+
if: ${{ failure() && github.event_name == 'pull_request' && steps.missing-features.conclusion == 'failure' }}
310+
run: touch ./missing-features/missing-features
311+
- name: log failed task - missing update
312+
if: ${{ failure() && github.event_name == 'pull_request' && steps.missing-update.conclusion == 'failure' }}
313+
run: touch ./missing-features/missing-update
314+
- uses: actions/upload-artifact@v2
315+
if: ${{ failure() && github.event_name == 'pull_request' }}
301316
with:
302-
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
303-
- name: Installs cargo-udeps
304-
run: cargo install --force cargo-udeps
305-
- name: Install alsa and udev
306-
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
307-
- name: Run cargo udeps
308-
run: cargo udeps
317+
name: missing-features
318+
path: missing-features/
309319

310320
msrv:
311321
runs-on: ubuntu-latest

.github/workflows/dependencies.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@ on:
99
paths:
1010
- '**/Cargo.toml'
1111
- 'deny.toml'
12-
branches-ignore:
13-
- 'dependabot/**'
14-
- staging-squash-merge.tmp
15-
schedule:
16-
- cron: "0 0 * * 0"
12+
branches:
13+
- main
1714

1815
env:
1916
CARGO_TERM_COLOR: always

.github/workflows/validation-jobs.yml

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
name: validation jobs
22

33
on:
4+
merge_group:
5+
pull_request:
46
push:
57
branches:
6-
- staging
7-
- trying
88
- main
99

1010
env:
1111
CARGO_TERM_COLOR: always
12+
NIGHTLY_TOOLCHAIN: nightly
1213

1314
jobs:
1415
build-and-install-on-iOS:
16+
if: ${{ github.event_name == 'merge_group' }}
1517
runs-on: macos-latest
1618
timeout-minutes: 30
1719
steps:
@@ -32,6 +34,7 @@ jobs:
3234
run: cd examples/mobile && make install
3335

3436
build-android:
37+
if: ${{ github.event_name == 'merge_group' }}
3538
runs-on: ubuntu-latest
3639
timeout-minutes: 30
3740
steps:
@@ -59,6 +62,7 @@ jobs:
5962
run: ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME cargo apk build --package bevy_mobile_example
6063

6164
run-examples-on-windows-dx12:
65+
if: ${{ github.event_name == 'merge_group' }}
6266
runs-on: windows-latest
6367
timeout-minutes: 60
6468
steps:
@@ -93,6 +97,7 @@ jobs:
9397
done
9498
9599
run-examples-on-wasm:
100+
if: ${{ github.event_name == 'merge_group' }}
96101
runs-on: ubuntu-latest
97102
timeout-minutes: 60
98103
steps:
@@ -149,8 +154,10 @@ jobs:
149154
path: .github/start-wasm-example/screenshot-*.png
150155

151156
build-without-default-features:
157+
if: ${{ github.event_name == 'merge_group' }}
152158
timeout-minutes: 30
153159
strategy:
160+
max-parallel: 1
154161
matrix:
155162
crate: [bevy_ecs, bevy_reflect, bevy]
156163
runs-on: ubuntu-latest
@@ -164,3 +171,42 @@ jobs:
164171
env:
165172
CARGO_INCREMENTAL: 0
166173
RUSTFLAGS: "-C debuginfo=0 -D warnings"
174+
175+
build-without-default-features-status:
176+
if: |
177+
always() &&
178+
github.event_name == 'merge_group'
179+
needs: build-without-default-features
180+
runs-on: ubuntu-latest
181+
steps:
182+
- name: Successful
183+
if: ${{ !(contains(needs.*.result, 'failure')) }}
184+
run: exit 0
185+
- name: Failing
186+
if: ${{ contains(needs.*.result, 'failure') }}
187+
run: exit 1
188+
189+
check-unused-dependencies:
190+
if: ${{ github.event_name == 'merge_group' }}
191+
runs-on: ubuntu-latest
192+
timeout-minutes: 30
193+
steps:
194+
- uses: actions/checkout@v3
195+
- uses: actions/cache@v3
196+
with:
197+
path: |
198+
~/.cargo/bin/
199+
~/.cargo/registry/index/
200+
~/.cargo/registry/cache/
201+
~/.cargo/git/db/
202+
target/
203+
key: ${{ runner.os }}-cargo-check-unused-dependencies-${{ hashFiles('**/Cargo.toml') }}
204+
- uses: dtolnay/rust-toolchain@master
205+
with:
206+
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
207+
- name: Installs cargo-udeps
208+
run: cargo install --force cargo-udeps
209+
- name: Install alsa and udev
210+
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
211+
- name: Run cargo udeps
212+
run: cargo udeps

0 commit comments

Comments
 (0)