Skip to content

Snap dragged number input values to the step #65596

Snap dragged number input values to the step

Snap dragged number input values to the step #65596

Workflow file for this run

name: validation jobs
permissions:
contents: read
on:
merge_group:
pull_request:
push:
branches:
- release-*
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
# Environment variables must be kept in sync with all workflows that defines them.
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_PROFILE_TEST_DEBUG: 0
CARGO_PROFILE_DEV_DEBUG: 0
# Keep in sync between all workflows
RUSTFLAGS: "-C debuginfo=0 -D warnings"
jobs:
build-and-install-on-iOS:
if: ${{ github.event_name == 'merge_group' }}
runs-on: macos-14
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: $/.github/actions/install-rust
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
# key won't match, will rely on restore-keys
key: ${{ runner.os }}-stable-aarch64-apple-ios-sim-${{ hashFiles('**/Cargo.toml') }}-
# See .github/workflows/update-caches.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: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- name: Add iOS targets
run: rustup target add aarch64-apple-ios-sim
- name: Build and install iOS app in iOS Simulator.
run: cd examples/mobile && make install
build-android:
if: ${{ github.event_name == 'merge_group' }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: $/.github/actions/install-rust
- name: Set up JDK 21
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
java-version: "21"
distribution: "temurin"
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
# key won't match, will rely on restore-keys
key: ${{ runner.os }}-stable-aarch64-linux-android-${{ hashFiles('**/Cargo.toml') }}-
# See .github/workflows/update-caches.yml for how keys are generated
restore-keys: |
${{ runner.os }}-stable-aarch64-linux-android-${{ hashFiles('**/Cargo.toml') }}-
${{ runner.os }}-stable-aarch64-linux-android-
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- name: Install Android targets
run: rustup target add aarch64-linux-android
- name: Install Cargo NDK
run: cargo install --force cargo-ndk
- name: Build .so file
run: cargo ndk build -t arm64-v8a -P 26 -p bevy_mobile_example -o ./examples/mobile/android/app/src/main/jniLibs
- name: Build app for Android
run: cd ./examples/mobile/android && ./gradlew build
run-examples-on-wasm:
if: ${{ github.event_name == 'merge_group' }}
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: $/.github/actions/install-rust
with:
target: wasm32-unknown-unknown
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
# key won't match, will rely on restore-keys
key: ${{ runner.os }}-stable-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.toml') }}-
# See .github/workflows/update-caches.yml for how keys are generated
restore-keys: |
${{ runner.os }}-stable-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.toml') }}-
${{ runner.os }}-stable-wasm32-unknown-unknown-
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- name: Install wasm-bindgen
run: cargo install --force wasm-bindgen-cli
- name: Setup playwright
run: |
cd .github/start-wasm-example
npm install
npx playwright install --with-deps
cd ../..
- name: First Wasm build
env:
RUSTFLAGS: '-C debuginfo=0 -D warnings --cfg getrandom_backend="wasm_js"'
run: |
cargo build --release --example testbed_ui --target wasm32-unknown-unknown
- name: Run examples
shell: bash
run: |
# start a webserver
python3 -m http.server --directory examples/wasm &
xvfb-run cargo run -p build-wasm-example -- --browsers chromium --browsers firefox --frames 25 --test 2d_shapes lighting text_debug breakout
- name: Save screenshots
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: screenshots-wasm
path: .github/start-wasm-example/screenshot-*.png
build-without-default-features:
if: ${{ github.event_name == 'merge_group' }}
timeout-minutes: 30
strategy:
max-parallel: 1
matrix:
crate: [bevy_ecs, bevy_reflect, bevy]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: $/.github/actions/install-rust
- name: Install Linux dependencies
uses: $/.github/actions/install-linux-deps
- name: Build
run: cargo build -p ${{ matrix.crate }} --no-default-features
build-without-default-features-status:
if: |
always() &&
github.event_name == 'merge_group'
needs: build-without-default-features
runs-on: ubuntu-latest
steps:
- name: Successful
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Failing
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
check-unused-dependencies:
if: ${{ github.event_name == 'merge_group' }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: $/.github/actions/install-rust
with:
channel: nightly
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
# key won't match, will rely on restore-keys
key: ${{ runner.os }}-nightly--${{ hashFiles('**/Cargo.toml') }}-
# See .github/workflows/update-caches.yml for how keys are generated
restore-keys: |
${{ runner.os }}-nightly--${{ hashFiles('**/Cargo.toml') }}-
${{ runner.os }}-nightly--
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- name: Installs cargo-udeps
run: cargo install --force cargo-udeps
- name: Install Linux dependencies
uses: $/.github/actions/install-linux-deps
- name: Run cargo udeps
run: cargo udeps
check-example-showcase-patches-still-work:
if: ${{ github.event_name == 'merge_group' }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: $/.github/actions/install-rust
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
# key won't match, will rely on restore-keys
key: ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
# See .github/workflows/update-caches.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: Install Linux dependencies
uses: $/.github/actions/install-linux-deps
- name: Apply patches
run: |
CODE=0
for patch in tools/example-showcase/*.patch; do
# Try applying the patch, logging an error if it fails.
git apply --ignore-whitespace $patch || { echo "::error::$patch failed to apply."; CODE=1; }
done
exit $CODE
- name: Build with patches
run: cargo build