mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 20:53:53 +00:00
814f8d1635
# Objective - Update wgpu to 0.13 - ~~Wait, is wgpu 0.13 released? No, but I had most of the changes already ready since playing with webgpu~~ well it has been released now - Also update parking_lot to 0.12 and naga to 0.9 ## Solution - Update syntax for wgsl shaders https://github.com/gfx-rs/wgpu/blob/master/CHANGELOG.md#wgsl-syntax - Add a few options, remove some references: https://github.com/gfx-rs/wgpu/blob/master/CHANGELOG.md#other-breaking-changes - fragment inputs should now exactly match vertex outputs for locations, so I added exports for those to be able to reuse them https://github.com/gfx-rs/wgpu/pull/2704
154 lines
4.2 KiB
YAML
154 lines
4.2 KiB
YAML
name: validation jobs
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- staging
|
|
- trying
|
|
- main
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build-and-install-on-iOS:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
target
|
|
key: ${{ runner.os }}-ios-install-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Add iOS targets
|
|
run: rustup target add aarch64-apple-ios x86_64-apple-ios
|
|
|
|
- name: Build and install iOS app in iOS Simulator.
|
|
run: cd examples/ios && make install
|
|
|
|
build-android:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: ${{ runner.os }}-cargo-build-android-${{ hashFiles('**/Cargo.toml') }}
|
|
|
|
- name: Install Android targets
|
|
run: rustup target add aarch64-linux-android armv7-linux-androideabi
|
|
|
|
- name: Install Cargo APK
|
|
run: cargo install --force cargo-apk
|
|
|
|
- name: Build APK
|
|
run: cargo apk build --example android_example
|
|
|
|
run-examples-on-windows-dx12:
|
|
runs-on: windows-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: ${{ runner.os }}-windows-run-examples-${{ hashFiles('**/Cargo.toml') }}
|
|
|
|
- name: Build bevy
|
|
run: |
|
|
cargo build --features "bevy_ci_testing"
|
|
|
|
- name: Run examples
|
|
shell: bash
|
|
run: |
|
|
for example in .github/example-run/*.ron; do
|
|
example_name=`basename $example .ron`
|
|
echo "running $example_name - "`date`
|
|
time WGPU_BACKEND=dx12 CI_TESTING_CONFIG=$example cargo run --example $example_name --features "bevy_ci_testing"
|
|
sleep 10
|
|
done
|
|
|
|
run-examples-on-wasm:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
target: wasm32-unknown-unknown
|
|
override: true
|
|
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
~/.github/start-wasm-example/node_modules
|
|
target/
|
|
key: ${{ runner.os }}-wasm-run-examples-${{ hashFiles('**/Cargo.toml') }}
|
|
|
|
- name: install xvfb, llvmpipe and lavapipe
|
|
run: |
|
|
sudo apt-get update -y -qq
|
|
sudo add-apt-repository ppa:oibaf/graphics-drivers -y
|
|
sudo apt-get update
|
|
sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
|
|
|
|
- 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
|
|
run: |
|
|
cargo build --release --example 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 shapes lighting text_debug breakout
|
|
|
|
- name: Save screenshots
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: screenshots
|
|
path: .github/start-wasm-example/screenshot-*.png
|