Skip to content

Commit

Permalink
run examples on windows (#4437)
Browse files Browse the repository at this point in the history
# Objective

- ~~Running examples on Linux in CI timeout~~Linux is back!
- But hey we can run examples on windows too!

## Solution

- Run examples on windows daily
- I also added a 30 minutes timeout so that when it explodes, it doesn't explodes in 6 hours (the default timeout)
- And simplified the linux examples by not requiring a custom feature set
  • Loading branch information
mockersf committed May 2, 2022
1 parent 2c14582 commit bc2624d
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 33 deletions.
2 changes: 2 additions & 0 deletions .github/bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ status = [
"ci",
"miri",
"check-benches",
"build-and-install-on-iOS",
"run-examples-on-windows",
]

use_squash_merge = true
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ jobs:
run-examples:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Install Bevy dependencies
run: |
Expand Down Expand Up @@ -274,13 +275,13 @@ jobs:
toolchain: stable
- name: Build bevy
run: |
cargo build --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_winit,render,png,hdr,x11,bevy_ci_testing,trace,trace_chrome,bevy_audio,vorbis"
cargo build --features "bevy_ci_testing,trace,trace_chrome"
- name: Run examples
run: |
for example in .github/example-run/*.ron; do
example_name=`basename $example .ron`
echo "running $example_name - "`date`
time CI_TESTING_CONFIG=$example xvfb-run cargo run --example $example_name --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_winit,render,png,hdr,x11,bevy_ci_testing,trace,trace_chrome,bevy_audio,vorbis"
time CI_TESTING_CONFIG=$example xvfb-run cargo run --example $example_name --features "bevy_ci_testing,trace,trace_chrome"
sleep 10
done
zip traces.zip trace*.json
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/ios.yml

This file was deleted.

68 changes: 68 additions & 0 deletions .github/workflows/validation-jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: validation jobs

on:
push:
branches:
- staging
- trying

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


run-examples-on-windows:
runs-on: windows-latest
timeout-minutes: 30
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 CI_TESTING_CONFIG=$example cargo run --example $example_name --features "bevy_ci_testing"
sleep 10
done

0 comments on commit bc2624d

Please sign in to comment.