Merge ca0c083481 into 877d278785
This commit is contained in:
commit
6bfab80f5d
124
.github/workflows/ci.yml
vendored
124
.github/workflows/ci.yml
vendored
@ -7,6 +7,7 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- release-*
|
- release-*
|
||||||
|
|
||||||
|
# Environment variables must be kept in sync with all workflows that defines them.
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
@ -30,15 +31,20 @@ jobs:
|
|||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-stable--
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- name: Install Linux dependencies
|
- name: Install Linux dependencies
|
||||||
uses: ./.github/actions/install-linux-deps
|
uses: ./.github/actions/install-linux-deps
|
||||||
@ -53,15 +59,20 @@ jobs:
|
|||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-stable--
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-ci-${{ hashFiles('**/Cargo.toml') }}
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
@ -79,15 +90,20 @@ jobs:
|
|||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}--
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-miri-${{ hashFiles('**/Cargo.toml') }}
|
|
||||||
- uses: dtolnay/rust-toolchain@master
|
- uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
|
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
|
||||||
@ -110,17 +126,20 @@ jobs:
|
|||||||
needs: ci
|
needs: ci
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-stable--
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
crates/bevy_ecs_compile_fail_tests/target/
|
|
||||||
crates/bevy_reflect_compile_fail_tests/target/
|
|
||||||
key: ${{ runner.os }}-cargo-check-compiles-${{ hashFiles('**/Cargo.toml') }}
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
@ -129,23 +148,27 @@ jobs:
|
|||||||
- name: Check Compile
|
- name: Check Compile
|
||||||
# See tools/ci/src/main.rs for the commands this runs
|
# See tools/ci/src/main.rs for the commands this runs
|
||||||
run: cargo run -p ci -- compile
|
run: cargo run -p ci -- compile
|
||||||
|
|
||||||
check-compiles-no-std:
|
check-compiles-no-std:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
needs: ci
|
needs: ci
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-stable-x86_64-unknown-none-${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stable-x86_64-unknown-none-${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-stable-x86_64-unknown-none-
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
crates/bevy_ecs_compile_fail_tests/target/
|
|
||||||
crates/bevy_reflect_compile_fail_tests/target/
|
|
||||||
key: ${{ runner.os }}-cargo-check-compiles-no-std-${{ hashFiles('**/Cargo.toml') }}
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
targets: x86_64-unknown-none
|
targets: x86_64-unknown-none
|
||||||
@ -153,23 +176,27 @@ jobs:
|
|||||||
uses: ./.github/actions/install-linux-deps
|
uses: ./.github/actions/install-linux-deps
|
||||||
- name: Check Compile
|
- name: Check Compile
|
||||||
run: cargo check -p bevy --no-default-features --features default_no_std --target x86_64-unknown-none
|
run: cargo check -p bevy --no-default-features --features default_no_std --target x86_64-unknown-none
|
||||||
|
|
||||||
check-compiles-no-std-portable-atomic:
|
check-compiles-no-std-portable-atomic:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
needs: ci
|
needs: ci
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-stable-thumbv6m-none-eabi-${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stable-thumbv6m-none-eabi-${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-stable-thumbv6m-none-eabi-
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
crates/bevy_ecs_compile_fail_tests/target/
|
|
||||||
crates/bevy_reflect_compile_fail_tests/target/
|
|
||||||
key: ${{ runner.os }}-cargo-check-compiles-no-std-portable-atomic-${{ hashFiles('**/Cargo.toml') }}
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
targets: thumbv6m-none-eabi
|
targets: thumbv6m-none-eabi
|
||||||
@ -184,17 +211,20 @@ jobs:
|
|||||||
needs: ci
|
needs: ci
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-stable-x86_64-unknown-none-${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stable-x86_64-unknown-none-${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-stable-x86_64-unknown-none-
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
crates/bevy_ecs_compile_fail_tests/target/
|
|
||||||
crates/bevy_reflect_compile_fail_tests/target/
|
|
||||||
key: ${{ runner.os }}-cargo-check-compiles-no-std-examples-${{ hashFiles('**/Cargo.toml') }}
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
targets: x86_64-unknown-none
|
targets: x86_64-unknown-none
|
||||||
@ -209,15 +239,20 @@ jobs:
|
|||||||
needs: build
|
needs: build
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-stable-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stable-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-stable-wasm32-unknown-unknown-
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ubuntu-assets-cargo-build-wasm-stable-${{ hashFiles('**/Cargo.toml') }}
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
target: wasm32-unknown-unknown
|
target: wasm32-unknown-unknown
|
||||||
@ -230,15 +265,20 @@ jobs:
|
|||||||
needs: build
|
needs: build
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}-wasm32-unknown-unknown-
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ubuntu-assets-cargo-build-wasm-nightly-${{ hashFiles('**/Cargo.toml') }}
|
|
||||||
- uses: dtolnay/rust-toolchain@master
|
- uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
|
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
|
||||||
@ -309,15 +349,20 @@ jobs:
|
|||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-stable--
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-check-doc-${{ hashFiles('**/Cargo.toml') }}
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- name: Install Linux dependencies
|
- name: Install Linux dependencies
|
||||||
uses: ./.github/actions/install-linux-deps
|
uses: ./.github/actions/install-linux-deps
|
||||||
@ -412,15 +457,6 @@ jobs:
|
|||||||
needs: build
|
needs: build
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- 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 }}-cargo-msrv-${{ hashFiles('**/Cargo.toml') }}
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- name: get MSRV
|
- name: get MSRV
|
||||||
id: msrv
|
id: msrv
|
||||||
@ -430,6 +466,20 @@ jobs:
|
|||||||
- uses: dtolnay/rust-toolchain@master
|
- uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ steps.msrv.outputs.msrv }}
|
toolchain: ${{ steps.msrv.outputs.msrv }}
|
||||||
|
- uses: actions/cache/restore@v4
|
||||||
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-${{ steps.msrv.outputs.msrv }}--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-${{ steps.msrv.outputs.msrv }}--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-${{ steps.msrv.outputs.msrv }}--
|
||||||
|
path: |
|
||||||
|
~/.cargo/bin/
|
||||||
|
~/.cargo/registry/index/
|
||||||
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
|
target/
|
||||||
- name: Install Linux dependencies
|
- name: Install Linux dependencies
|
||||||
uses: ./.github/actions/install-linux-deps
|
uses: ./.github/actions/install-linux-deps
|
||||||
- name: Run cargo check
|
- name: Run cargo check
|
||||||
|
|||||||
40
.github/workflows/example-run.yml
vendored
40
.github/workflows/example-run.yml
vendored
@ -8,6 +8,7 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
# Environment variables must be kept in sync with all workflows that defines them.
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
@ -24,6 +25,20 @@ jobs:
|
|||||||
- name: Disable audio
|
- name: Disable audio
|
||||||
# Disable audio through a patch. on github m1 runners, audio timeouts after 15 minutes
|
# Disable audio through a patch. on github m1 runners, audio timeouts after 15 minutes
|
||||||
run: git apply --ignore-whitespace tools/example-showcase/disable-audio.patch
|
run: git apply --ignore-whitespace tools/example-showcase/disable-audio.patch
|
||||||
|
- uses: actions/cache/restore@v4
|
||||||
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-stable--
|
||||||
|
path: |
|
||||||
|
~/.cargo/bin/
|
||||||
|
~/.cargo/registry/index/
|
||||||
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
|
target/
|
||||||
- name: Run examples
|
- name: Run examples
|
||||||
run: |
|
run: |
|
||||||
for example in .github/example-run/*.ron; do
|
for example in .github/example-run/*.ron; do
|
||||||
@ -84,16 +99,21 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo add-apt-repository ppa:kisak/turtle -y
|
sudo add-apt-repository ppa:kisak/turtle -y
|
||||||
sudo apt-get install --no-install-recommends libxkbcommon-x11-0 xvfb libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
|
sudo apt-get install --no-install-recommends libxkbcommon-x11-0 xvfb libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
|
||||||
- uses: actions/cache@v4
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-stable--
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-run-examples-${{ hashFiles('**/Cargo.toml') }}
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
- name: Run examples
|
- name: Run examples
|
||||||
run: |
|
run: |
|
||||||
for example in .github/example-run/*.ron; do
|
for example in .github/example-run/*.ron; do
|
||||||
@ -143,6 +163,20 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- uses: actions/cache/restore@v4
|
||||||
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-stable--
|
||||||
|
path: |
|
||||||
|
~/.cargo/bin/
|
||||||
|
~/.cargo/registry/index/
|
||||||
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
|
target/
|
||||||
- name: Run examples
|
- name: Run examples
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
137
.github/workflows/update-caches.yml
vendored
Normal file
137
.github/workflows/update-caches.yml
vendored
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
name: Update Actions Caches
|
||||||
|
|
||||||
|
on:
|
||||||
|
# Manually
|
||||||
|
workflow_dispatch:
|
||||||
|
# On PR merge
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
# After nightly release
|
||||||
|
schedule:
|
||||||
|
- cron: "0 1 * * *"
|
||||||
|
|
||||||
|
# Environment variables must be kept in sync with all workflows that defines them.
|
||||||
|
env:
|
||||||
|
CARGO_INCREMENTAL: 0
|
||||||
|
CARGO_PROFILE_TEST_DEBUG: 0
|
||||||
|
CARGO_PROFILE_DEV_DEBUG: 0
|
||||||
|
# If nightly is breaking CI, modify this variable to target a specific nightly version.
|
||||||
|
NIGHTLY_TOOLCHAIN: nightly
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
env:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
NIGHTLY_TOOLCHAIN: ${{ steps.env.outputs.NIGHTLY_TOOLCHAIN }}
|
||||||
|
MSRV: ${{ steps.msrv.outputs.MSRV }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: get MSRV
|
||||||
|
id: msrv
|
||||||
|
run: |
|
||||||
|
msrv=`cargo metadata --no-deps --format-version 1 | jq --raw-output '.packages[] | select(.name=="bevy") | .rust_version'`
|
||||||
|
echo "MSRV=$msrv" >> $GITHUB_OUTPUT
|
||||||
|
- name: Expose Env
|
||||||
|
id: env
|
||||||
|
run: |
|
||||||
|
echo "NIGHTLY_TOOLCHAIN=${{ env.NIGHTLY_TOOLCHAIN }}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
build-caches:
|
||||||
|
name: Build Caches
|
||||||
|
needs: ["env"]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
toolchain: stable
|
||||||
|
target: ""
|
||||||
|
- os: macos-latest
|
||||||
|
toolchain: stable
|
||||||
|
target: ""
|
||||||
|
- os: windows-latest
|
||||||
|
toolchain: stable
|
||||||
|
target: ""
|
||||||
|
- os: ubuntu-latest
|
||||||
|
toolchain: ${{ needs.env.outputs.NIGHTLY_TOOLCHAIN }}
|
||||||
|
target: ""
|
||||||
|
- os: ubuntu-latest
|
||||||
|
toolchain: ${{ needs.env.outputs.MSRV }}
|
||||||
|
target: ""
|
||||||
|
- os: macos-latest
|
||||||
|
toolchain: ${{ needs.env.outputs.NIGHTLY_TOOLCHAIN }}
|
||||||
|
target: ""
|
||||||
|
- os: ubuntu-latest
|
||||||
|
toolchain: ${{ needs.env.outputs.NIGHTLY_TOOLCHAIN }}
|
||||||
|
target: wasm32-unknown-unknown
|
||||||
|
- os: ubuntu-latest
|
||||||
|
toolchain: stable
|
||||||
|
target: wasm32-unknown-unknown
|
||||||
|
- os: ubuntu-latest
|
||||||
|
toolchain: stable
|
||||||
|
target: x86_64-unknown-none
|
||||||
|
- os: ubuntu-latest
|
||||||
|
toolchain: stable
|
||||||
|
target: thumbv6m-none-eabi
|
||||||
|
- os: ubuntu-latest
|
||||||
|
toolchain: stable
|
||||||
|
target: aarch64-linux-android
|
||||||
|
- os: macos-latest
|
||||||
|
toolchain: stable
|
||||||
|
target: aarch64-apple-ios-sim
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Get Date
|
||||||
|
id: get-date
|
||||||
|
run: |
|
||||||
|
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Checkout Bevy main branch
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: "bevyengine/bevy"
|
||||||
|
ref: "main"
|
||||||
|
|
||||||
|
- name: Setup Rust
|
||||||
|
id: rust
|
||||||
|
uses: dtolnay/rust-toolchain@main
|
||||||
|
with:
|
||||||
|
toolchain: ${{ matrix.toolchain }}
|
||||||
|
target: ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Create lock file
|
||||||
|
run: cargo update
|
||||||
|
|
||||||
|
- name: Install Bevy dependencies
|
||||||
|
uses: ./.github/actions/install-linux-deps
|
||||||
|
with:
|
||||||
|
wayland: true
|
||||||
|
xkb: true
|
||||||
|
|
||||||
|
- uses: actions/cache/restore@v4
|
||||||
|
id: cache
|
||||||
|
with:
|
||||||
|
key: ${{ runner.os }}-${{ matrix.toolchain }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('Cargo.lock') }}-${{ steps.get-date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Build dev cache
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
|
run: cargo build --profile dev --package bevy
|
||||||
|
|
||||||
|
- name: Build test cache
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
|
run: cargo build --profile test --package bevy
|
||||||
|
|
||||||
|
- name: Save cache
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
|
uses: actions/cache/save@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/bin/
|
||||||
|
~/.cargo/registry/index/
|
||||||
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
|
target/
|
||||||
|
key: ${{ runner.os }}-${{ matrix.toolchain }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('Cargo.lock') }}-${{ steps.get-date.outputs.date }}
|
||||||
68
.github/workflows/validation-jobs.yml
vendored
68
.github/workflows/validation-jobs.yml
vendored
@ -11,6 +11,7 @@ concurrency:
|
|||||||
group: ${{github.workflow}}-${{github.ref}}
|
group: ${{github.workflow}}-${{github.ref}}
|
||||||
cancel-in-progress: ${{github.event_name == 'pull_request'}}
|
cancel-in-progress: ${{github.event_name == 'pull_request'}}
|
||||||
|
|
||||||
|
# Environment variables must be kept in sync with all workflows that defines them.
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
@ -29,15 +30,23 @@ jobs:
|
|||||||
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-stable-aarch64-apple-ios-sim-${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stable-aarch64-apple-ios-sim-${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-stable-aarch64-apple-ios-sim-
|
||||||
path: |
|
path: |
|
||||||
target
|
~/.cargo/bin/
|
||||||
key: ${{ runner.os }}-ios-install-${{ hashFiles('**/Cargo.lock') }}
|
~/.cargo/registry/index/
|
||||||
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
|
target/
|
||||||
|
|
||||||
# TODO: remove x86 target once it always run on arm GitHub runners
|
|
||||||
- name: Add iOS targets
|
- name: Add iOS targets
|
||||||
run: rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim
|
run: rustup target add aarch64-apple-ios-sim
|
||||||
|
|
||||||
- name: Build and install iOS app in iOS Simulator.
|
- name: Build and install iOS app in iOS Simulator.
|
||||||
run: cd examples/mobile && make install
|
run: cd examples/mobile && make install
|
||||||
@ -54,18 +63,23 @@ jobs:
|
|||||||
- name: Set up JDK 17
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: '17'
|
java-version: "17"
|
||||||
distribution: 'temurin'
|
distribution: "temurin"
|
||||||
|
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-stable-aarch64-linux-android-${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stable-aarch64-linux-android-${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-stable-aarch64-linux-android-
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-build-android-${{ hashFiles('**/Cargo.toml') }}
|
|
||||||
|
|
||||||
- name: Install Android targets
|
- name: Install Android targets
|
||||||
run: rustup target add aarch64-linux-android
|
run: rustup target add aarch64-linux-android
|
||||||
@ -90,16 +104,20 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
target: wasm32-unknown-unknown
|
target: wasm32-unknown-unknown
|
||||||
|
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-stable-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stable-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-stable-wasm32-unknown-unknown-
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
~/.github/start-wasm-example/node_modules
|
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-wasm-run-examples-${{ hashFiles('**/Cargo.toml') }}
|
|
||||||
|
|
||||||
- name: Install wasm-bindgen
|
- name: Install wasm-bindgen
|
||||||
run: cargo install --force wasm-bindgen-cli
|
run: cargo install --force wasm-bindgen-cli
|
||||||
@ -167,18 +185,23 @@ jobs:
|
|||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/cache@v4
|
- uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
|
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
|
||||||
|
- uses: actions/cache/restore@v4
|
||||||
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}--
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-check-unused-dependencies-${{ hashFiles('**/Cargo.toml') }}
|
|
||||||
- uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
|
|
||||||
- name: Installs cargo-udeps
|
- name: Installs cargo-udeps
|
||||||
run: cargo install --force cargo-udeps
|
run: cargo install --force cargo-udeps
|
||||||
- name: Install Linux dependencies
|
- name: Install Linux dependencies
|
||||||
@ -192,16 +215,21 @@ jobs:
|
|||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/cache@v4
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
|
# key won't match, will rely on restore-keys
|
||||||
|
key: ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
# See .github/workflows/validation-jobs.yml for how keys are generated
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
|
||||||
|
${{ runner.os }}-stable--
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-check-showcase-patches-${{ hashFiles('**/Cargo.toml') }}
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
- name: Install Linux dependencies
|
- name: Install Linux dependencies
|
||||||
uses: ./.github/actions/install-linux-deps
|
uses: ./.github/actions/install-linux-deps
|
||||||
- name: Apply patches
|
- name: Apply patches
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user