Skip to content

Commit

Permalink
Merge branch 'main' into respect-downlevel-flag-cube-array-texture
Browse files Browse the repository at this point in the history
  • Loading branch information
sampettersson authored Aug 7, 2024
2 parents 5f3e4a3 + a0cc636 commit ccd5e8c
Show file tree
Hide file tree
Showing 626 changed files with 27,872 additions and 14,816 deletions.
11 changes: 6 additions & 5 deletions .cargo/config_fast_builds.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#
# ## LLD
#
# LLD is a linker from the LLVM project that supports Linux, Windows, MacOS, and WASM. It has the greatest
# LLD is a linker from the LLVM project that supports Linux, Windows, macOS, and Wasm. It has the greatest
# platform support and the easiest installation process. It is enabled by default in this file for Linux
# and Windows. On MacOS, the default linker yields higher performance than LLD and is used instead.
# and Windows. On macOS, the default linker yields higher performance than LLD and is used instead.
#
# To install, please scroll to the corresponding table for your target (eg. `[target.x86_64-pc-windows-msvc]`
# for Windows) and follow the steps under `LLD linker`.
Expand All @@ -25,7 +25,7 @@
# your corresponding target, disable LLD by commenting out its `-Clink-arg=...` line, and enable Mold by
# *uncommenting* its `-Clink-arg=...` line.
#
# There is a fork of Mold named Sold that supports MacOS, but it is unmaintained and is about the same speed as
# There is a fork of Mold named Sold that supports macOS, but it is unmaintained and is about the same speed as
# the default ld64 linker. For this reason, it is not included in this file.
#
# For more information, please see Mold's repository at <https://github.com/rui314/mold>.
Expand Down Expand Up @@ -134,14 +134,15 @@ rustflags = [
# rustup component add llvm-tools
# ```
linker = "rust-lld.exe"
rustdocflags = ["-Clinker=rust-lld.exe"]
rustflags = [
# Nightly
# "-Zshare-generics=y",
# "-Zshare-generics=n", # This needs to be off if you use dynamic linking on Windows.
# "-Zthreads=0",
]

# Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only'
# In most cases the gains are negligible, but if you are on macos and have slow compile times you should see significant gains.
# In most cases the gains are negligible, but if you are on macOS and have slow compile times you should see significant gains.
# [profile.dev]
# debug = 1

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/install-linux-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# repository before you can use this action.
#
# This action will only install dependencies when the current operating system is Linux. It will do
# nothing on any other OS (MacOS, Windows).
# nothing on any other OS (macOS, Windows).

name: Install Linux dependencies
description: Installs the dependencies necessary to build Bevy on Linux.
Expand Down
2 changes: 1 addition & 1 deletion .github/contributing/engine_style_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ For more advice on contributing to the engine, see the [relevant section](../../
4. Use \`variable_name\` code blocks in comments to signify that you're referring to specific types and variables.
5. Start comments with capital letters. End them with a period if they are sentence-like.
3. Use comments to organize long and complex stretches of code that can't sensibly be refactored into separate functions.
4. When using [Bevy error codes](https://bevyengine.org/learn/errors/) include a link to the relevant error on the Bevy website in the returned error message `... See: https://bevyengine.org/learn/errors/#b0003`.
4. When using [Bevy error codes](https://bevyengine.org/learn/errors/) include a link to the relevant error on the Bevy website in the returned error message `... See: https://bevyengine.org/learn/errors/b0003`.

## Rust API guidelines

Expand Down
2 changes: 2 additions & 0 deletions .github/example-run/ambiguity_detection.ron
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(
)
8 changes: 7 additions & 1 deletion .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{
"MD013": false
"MD013": false,
"no-inline-html": {
"allowed_elements": [
"details",
"summary"
]
}
}
24 changes: 18 additions & 6 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,26 @@

---

## Changelog
## Showcase

> This section is optional. If this was a trivial fix, or has no externally-visible impact, you can delete this section.
> This section is optional. If this PR does not include a visual change or does not add a new feature, you can delete this section.
- What changed as a result of this PR?
- If applicable, organize changes under "Added", "Changed", or "Fixed" sub-headings
- Stick to one or two sentences. If more detail is needed for a particular change, consider adding it to the "Solution" section
- If you can't summarize the work, your change may be unreasonably large / unrelated. Consider splitting your PR to make it easier to review and merge!
- Help others understand the result of this PR by showcasing your awesome work!
- If this PR adds a new feature or public API, consider adding a brief pseudo-code snippet of it in action
- If this PR includes a visual change, consider adding a screenshot, GIF, or video
- If you want, you could even include a before/after comparison!
- If the Migration Guide adequately covers the changes, you can delete this section

While a showcase should aim to be brief and digestible, you can use a toggleable section to save space on longer showcases:

<details>
<summary>Click to view showcase</summary>

```rust
println!("My super cool code.");
```

</details>

## Migration Guide

Expand Down
2 changes: 1 addition & 1 deletion .github/start-wasm-example/tests/wasm_example.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ test.beforeEach(async ({ page }) => {

const MAX_TIMEOUT_FOR_TEST = 300_000;

test.describe('WASM example', () => {
test.describe('Wasm example', () => {
test('Wait for success', async ({ page }, testInfo) => {
let start = new Date().getTime();

Expand Down
31 changes: 3 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
run: cargo run -p ci -- lints

miri:
# Explicity use MacOS 14 to take advantage of M1 chip.
# Explicity use macOS 14 to take advantage of M1 chip.
runs-on: macos-14
timeout-minutes: 60
steps:
Expand Down Expand Up @@ -219,7 +219,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Check for typos
uses: crate-ci/typos@v1.22.7
uses: crate-ci/typos@v1.23.6
- name: Typos info
if: failure()
run: |
Expand All @@ -231,7 +231,7 @@ jobs:
run-examples-macos-metal:
# Explicity use MacOS 14 to take advantage of M1 chip.
# Explicity use macOS 14 to take advantage of M1 chip.
runs-on: macos-14
timeout-minutes: 30
steps:
Expand Down Expand Up @@ -436,28 +436,3 @@ jobs:
echo " Example: 'use bevy::sprite::MaterialMesh2dBundle;' instead of 'bevy_internal::sprite::MaterialMesh2dBundle;'"
exit 1
fi
check-cfg:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-check-doc-${{ hashFiles('**/Cargo.toml') }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
with:
wayland: true
xkb: true
- name: Build and check cfg typos
# See tools/ci/src/main.rs for the commands this runs
run: cargo run -p ci -- cfg-check
18 changes: 15 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,20 @@ jobs:
- name: Build docs
env:
# needs to be in sync with [package.metadata.docs.rs]
RUSTDOCFLAGS: -Zunstable-options --cfg=docsrs
run: cargo doc --all-features --no-deps -p bevy -Zunstable-options -Zrustdoc-scrape-examples
RUSTDOCFLAGS: -Zunstable-options --cfg=docsrs --generate-link-to-definition
run: |
cargo doc \
-Zunstable-options \
-Zrustdoc-scrape-examples \
--all-features \
--workspace \
--no-deps \
--exclude ci \
--exclude errors \
--exclude bevy_mobile_example \
--exclude build-wasm-example \
--exclude build-templated-pages \
--exclude example-showcase
# This adds the following:
# - A top level redirect to the bevy crate documentation
Expand All @@ -69,7 +81,7 @@ jobs:
run: |
echo "<meta http-equiv=\"refresh\" content=\"0; url=bevy/index.html\">" > target/doc/index.html
echo "dev-docs.bevyengine.org" > target/doc/CNAME
echo "User-Agent: *\nDisallow: /" > target/doc/robots.txt
echo $'User-Agent: *\nDisallow: /' > target/doc/robots.txt
rm target/doc/.lock
- name: Upload site artifact
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
# Read the current version from Cargo.toml
current_version=$(cargo metadata --format-version 1 --no-deps | \
jq --raw-output '.packages | .[] | select(.name == "bevy").version')
# Sanity check: current version should be 0.X.Y
if ! grep -q '^0\.[0-9]\+\.[0-9]\+$' <<< "${current_version}"; then
echo "Invalid version (not in 0.X.Y format): ${current_version}"
# Sanity check: current version should be 0.X.Y-dev
if ! grep -q '^0\.[0-9]\+\.[0-9]\+-dev$' <<< "${current_version}"; then
echo "Invalid version (not in 0.X.Y-dev format): ${current_version}"
exit 1
fi
minor_version=$(sed 's/^0\.\([0-9]\+\).*/\1/' <<< "${current_version}")
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/validation-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.78
- uses: dtolnay/rust-toolchain@stable
- name: Build bevy
shell: bash
# this uses the same command as when running the example to ensure build is reused
Expand Down Expand Up @@ -211,7 +209,7 @@ jobs:
npx playwright install --with-deps
cd ../..
- name: First WASM build
- name: First Wasm build
run: |
cargo build --release --example ui --target wasm32-unknown-unknown
Expand Down
Loading

0 comments on commit ccd5e8c

Please sign in to comment.