Skip to content

Commit 8244b42

Browse files
Merge remote-tracking branch 'upstream/main' into pr/TheRawMeatball/1290
2 parents 2714a80 + 85ab55a commit 8244b42

File tree

433 files changed

+30772
-14980
lines changed

Some content is hidden

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

433 files changed

+30772
-14980
lines changed

.cargo/config_fast_builds

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Rename this file to `config.toml` to enable "fast build" configuration. Please read the notes below.
1+
# Add the contents of this file to `config.toml` to enable "fast build" configuration. Please read the notes below.
22

33
# NOTE: For maximum performance, build using a nightly compiler
44
# If you are using rust stable, remove the "-Zshare-generics=y" below.
@@ -10,7 +10,7 @@ rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zshare-generics=y"]
1010
# NOTE: you must manually install https://github.com/michaeleisel/zld on mac. you can easily do this with the "brew" package manager:
1111
# `brew install michaeleisel/zld/zld`
1212
[target.x86_64-apple-darwin]
13-
rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/bin/zld", "-Zshare-generics=y", "-Zrun-dsymutil=no"]
13+
rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/bin/zld", "-Zshare-generics=y"]
1414

1515
[target.x86_64-pc-windows-msvc]
1616
linker = "rust-lld.exe"

.github/CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Contributing
2+
3+
Please see the [Contributing Code](https://bevyengine.org/learn/book/contributing/code/) section of
4+
[The Book](https://bevyengine.org/learn/book/introduction/).

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,31 @@
22
name: Bug Report
33
about: Report a bug to help us improve!
44
title: ''
5-
labels: ''
5+
labels: bug, needs-triage
66
assignees: ''
77
---
88

9-
**Bevy version**
9+
## Bevy version
1010

1111
The release number or commit hash of the version you're using.
1212

13-
**Operating system & version**
13+
## Operating system & version
1414

1515
Ex: Windows 10, Ubuntu 18.04, iOS 14.
1616

17-
**What you did**
17+
## What you did
1818

1919
The steps you took to uncover this bug. Please list full reproduction steps if
2020
feasible.
2121

22-
**What you expected to happen**
22+
## What you expected to happen
2323

2424
What you think should've happened if everything was working properly.
2525

26-
**What actually happened**
26+
## What actually happened
2727

2828
The actual result of the actions you described.
2929

30-
**Additional information**
30+
## Additional information
3131

3232
Any additional information you would like to add such as screenshots, logs, etc.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
name: Docs Improvement
3+
about: Help us write better docs to catch common issues!
4+
title: ''
5+
labels: documentation, needs-triage
6+
assignees: ''
7+
---
8+
9+
## How can Bevy's documentation be improved?
10+
11+
Provide a link to the documentation and describe how it could be improved. In what ways is it incomplete, incorrect, or misleading?
12+
13+
If you have suggestions on exactly what the new docs should say, feel free to include them here. Or alternatively, make the changes yourself and [create a pull request](https://bevyengine.org/learn/book/contributing/code/) instead.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22
name: Feature Request
33
about: Propose a new feature!
44
title: ''
5-
labels: ''
5+
labels: enhancement, needs-triage
66
assignees: ''
77
---
88

9-
**What problem does this solve or what need does it fill?**
9+
## What problem does this solve or what need does it fill?
1010

1111
A description of why this particular feature should be added.
1212

13-
**What solution would you like?**
13+
## What solution would you like?
1414

1515
The solution you propose for the problem presented.
1616

17-
**What alternative(s) have you considered?**
17+
## What alternative(s) have you considered?
1818

1919
Other solutions to solve and/or work around the problem presented.
2020

21-
**Additional context**
21+
## Additional context
2222

2323
Any other information you would like to add such as related previous work,
2424
screenshots, benchmarks, etc.

.github/bors.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
status = [
2+
"build (stable, windows-latest)",
3+
"build (stable, ubuntu-latest)",
4+
"build (stable, macos-latest)",
5+
"build (nightly, ubuntu-latest)",
6+
"build-wasm (stable, ubuntu-latest)",
7+
"build-wasm (nightly, ubuntu-latest)",
8+
"build-android",
9+
"markdownlint",
10+
"run-examples",
11+
"check-doc",
12+
]
13+
14+
use_squash_merge = true
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
(
2+
exit_after: Some(300)
3+
)

.github/example-run/breakout.ron

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
(
2+
exit_after: Some(1800)
3+
)

.github/example-run/contributors.ron

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
(
2+
exit_after: Some(1800)
3+
)

.github/example-run/load_gltf.ron

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
(
2+
exit_after: Some(300)
3+
)

.github/example-run/scene.ron

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
(
2+
exit_after: Some(1800)
3+
)

.github/linters/.markdown-lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"MD013": false
3+
}

.github/workflows/ci.yml

Lines changed: 82 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
name: CI
22

33
on:
4-
push:
5-
branches: [master]
64
pull_request:
7-
branches: [master]
5+
push:
6+
branches: [main, staging, trying]
87

98
env:
109
CARGO_TERM_COLOR: always
@@ -14,45 +13,33 @@ jobs:
1413
strategy:
1514
matrix:
1615
toolchain: [stable, nightly]
17-
os: [windows-2019, ubuntu-20.04, macos-10.15]
16+
os: [windows-latest, ubuntu-latest, macos-latest]
1817
exclude:
19-
- os: macos-10.15
18+
- os: macos-latest
2019
toolchain: nightly
21-
- os: windows-2019
20+
- os: windows-latest
2221
toolchain: nightly
2322
runs-on: ${{ matrix.os }}
24-
needs: clean
2523
steps:
2624
- uses: actions/checkout@v2
2725

2826
- uses: actions-rs/toolchain@v1
2927
with:
3028
toolchain: ${{ matrix.toolchain }}
29+
components: rustfmt, clippy
3130
override: true
3231

33-
- uses: actions/cache@v2
34-
with:
35-
path: |
36-
target
37-
key: ${{ runner.os }}-cargo-check-test-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
32+
- name: Install alsa and udev
33+
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
34+
if: runner.os == 'linux'
3835

39-
- name: Install alsa
40-
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev
41-
if: ${{ runner.os == 'Linux' }}
42-
43-
- name: Install udev
44-
run: sudo apt-get update; sudo apt-get install --no-install-recommends libudev-dev
45-
if: ${{ runner.os == 'Linux' }}
46-
47-
- name: Build
48-
run: cargo check
49-
env:
50-
CARGO_INCREMENTAL: 0
51-
RUSTFLAGS: "-C debuginfo=0 -D warnings"
36+
- name: Check the format
37+
# See tools/ci/src/main.rs for the commands this runs
38+
run: cargo run -p ci
39+
if: runner.os == 'linux' && matrix.toolchain == 'stable'
5240

53-
- name: Run tests
41+
- name: Build & run tests
5442
run: cargo test --workspace
55-
if: ${{ runner.os == 'Linux' }}
5643
env:
5744
CARGO_INCREMENTAL: 0
5845
RUSTFLAGS: "-C debuginfo=0 -D warnings"
@@ -61,9 +48,8 @@ jobs:
6148
strategy:
6249
matrix:
6350
toolchain: [stable, nightly]
64-
os: [ubuntu-20.04]
51+
os: [ubuntu-latest]
6552
runs-on: ${{ matrix.os }}
66-
needs: clean
6753
steps:
6854
- uses: actions/checkout@v2
6955

@@ -73,12 +59,6 @@ jobs:
7359
target: wasm32-unknown-unknown
7460
override: true
7561

76-
- uses: actions/cache@v2
77-
with:
78-
path: |
79-
target
80-
key: ${{ runner.os }}-cargo-check-test-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
81-
8262
- name: Check wasm
8363
uses: actions-rs/cargo@v1
8464
with:
@@ -88,35 +68,78 @@ jobs:
8868
build-android:
8969
runs-on: ubuntu-latest
9070
steps:
91-
- uses: actions/checkout@v2
92-
- name: Install Android targets
93-
run: rustup target add aarch64-linux-android armv7-linux-androideabi
94-
- name: Install Cargo APK
95-
run: cargo install cargo-apk
96-
- name: Build APK
97-
run: cargo apk build --example android
98-
99-
clean:
71+
- uses: actions/checkout@v2
72+
- name: Install Android targets
73+
run: rustup target add aarch64-linux-android armv7-linux-androideabi
74+
- name: Install Cargo APK
75+
run: cargo install cargo-apk
76+
- name: Build APK
77+
run: cargo apk build --example android
78+
79+
markdownlint:
10080
runs-on: ubuntu-latest
10181
steps:
10282
- uses: actions/checkout@v2
103-
104-
- uses: actions-rs/toolchain@v1
10583
with:
106-
toolchain: nightly-2020-12-07
107-
components: rustfmt, clippy
108-
override: true
84+
# Full git history is needed to get a proper list of changed files within `super-linter`
85+
fetch-depth: 0
10986

110-
- name: Install alsa
111-
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev
87+
- name: Run Markdown Lint
88+
uses: github/[email protected]
89+
env:
90+
VALIDATE_ALL_CODEBASE: false
91+
VALIDATE_MARKDOWN: true
92+
DEFAULT_BRANCH: main
93+
# Not needed here as only one Linter is used.
94+
#GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11295

113-
- name: Install udev
114-
run: sudo apt-get update; sudo apt-get install --no-install-recommends libudev-dev
96+
run-examples:
97+
runs-on: ubuntu-latest
11598

116-
- name: Check the format
117-
run: cargo +nightly-2020-12-07 fmt --all -- --check
99+
steps:
100+
- name: Install dependencies
101+
run: |
102+
sudo apt-get update;
103+
DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends -yq \
104+
libasound2-dev libudev-dev wget unzip xvfb;
118105
119-
# type complexity must be ignored because we use huge templates for queries
120-
# -A clippy::manual-strip: strip_prefix support was added in 1.45. we want to support earlier rust versions
121-
- name: Run clippy
122-
run: cargo clippy --all-targets --all-features -- -D warnings -A clippy::type_complexity -A clippy::manual-strip
106+
- uses: actions/checkout@v2
107+
108+
- uses: actions-rs/toolchain@v1
109+
with:
110+
toolchain: stable
111+
112+
- name: Setup swiftshader
113+
run: |
114+
wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/swiftshader.zip;
115+
unzip swiftshader.zip;
116+
curr="$(pwd)/libvk_swiftshader.so";
117+
sed -i "s|PATH_TO_CHANGE|$curr|" vk_swiftshader_icd.json;
118+
119+
- name: Build bevy
120+
run: |
121+
cargo build --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_wgpu,bevy_winit,render,png,hdr,x11,bevy_ci_testing"
122+
123+
- name: Run examples
124+
run: |
125+
for example in .github/example-run/*.ron; do
126+
example_name=`basename $example .ron`
127+
echo "running $example_name - "`date`
128+
time CI_TESTING_CONFIG=$example VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run cargo run --example $example_name --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_wgpu,bevy_winit,render,png,hdr,x11,bevy_ci_testing"
129+
sleep 10
130+
done
131+
132+
check-doc:
133+
runs-on: ubuntu-latest
134+
steps:
135+
- uses: actions/checkout@v2
136+
- name: Install alsa and udev
137+
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
138+
if: runner.os == 'linux'
139+
- name: Installs cargo-deadlinks
140+
run: cargo install cargo-deadlinks
141+
- name: Build and check doc
142+
run: RUSTDOCFLAGS='-D warnings' cargo doc --all-features --no-deps
143+
- name: Checks dead links
144+
run: cargo deadlinks --dir target/doc/bevy
145+
continue-on-error: true

.github/workflows/ios.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ name: iOS cron CI
22

33
on:
44
schedule:
5-
- cron: '0 0 * * *'
5+
- cron: "0 0 * * *"
66

77
env:
88
CARGO_TERM_COLOR: always
99

1010
jobs:
1111
build:
12-
runs-on: macOS-latest
12+
runs-on: macos-latest
1313
steps:
1414
- uses: actions/checkout@v2
1515

@@ -18,7 +18,7 @@ jobs:
1818
toolchain: stable
1919
override: true
2020

21-
- uses: actions/cache@v2
21+
- uses: actions/cache@v2.1.5
2222
with:
2323
path: |
2424
target

0 commit comments

Comments
 (0)