Skip to content

Commit 44218f3

Browse files
mockersfItsDoot
authored andcommitted
run examples on windows (bevyengine#4437)
# 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
1 parent 3ec7f2a commit 44218f3

File tree

4 files changed

+105
-58
lines changed

4 files changed

+105
-58
lines changed

.github/bors.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ status = [
1414
"ci",
1515
"miri",
1616
"check-compiles",
17+
"build-and-install-on-iOS",
18+
"run-examples-on-windows",
1719
]
1820

1921
use_squash_merge = true

.github/workflows/ci.yml

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ jobs:
135135
toolchain: [stable, nightly]
136136
os: [ubuntu-latest]
137137
runs-on: ${{ matrix.os }}
138+
needs: build
138139
steps:
139140
- uses: actions/checkout@v3
140141
- uses: actions/cache@v3
@@ -157,31 +158,6 @@ jobs:
157158
command: check
158159
args: --target wasm32-unknown-unknown --no-default-features --features bevy_winit,x11,hdr,bevy_gltf
159160

160-
build-android:
161-
runs-on: ubuntu-latest
162-
steps:
163-
- uses: actions/checkout@v3
164-
- uses: actions-rs/toolchain@v1
165-
with:
166-
toolchain: stable
167-
- uses: actions/cache@v3
168-
with:
169-
path: |
170-
~/.cargo/bin/
171-
~/.cargo/registry/index/
172-
~/.cargo/registry/cache/
173-
~/.cargo/git/db/
174-
target/
175-
key: ${{ runner.os }}-cargo-build-android-${{ hashFiles('**/Cargo.toml') }}
176-
- name: Uninstall android-31
177-
run: $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-31"
178-
- name: Install Android targets
179-
run: rustup target add aarch64-linux-android armv7-linux-androideabi
180-
- name: Install Cargo APK
181-
run: cargo install --force cargo-apk
182-
- name: Build APK
183-
run: cargo apk build --example android
184-
185161
markdownlint:
186162
runs-on: ubuntu-latest
187163
needs: check-missing-examples-in-docs
@@ -202,6 +178,7 @@ jobs:
202178

203179
run-examples:
204180
runs-on: ubuntu-latest
181+
timeout-minutes: 30
205182
steps:
206183
- name: Install Bevy dependencies
207184
run: |
@@ -229,13 +206,13 @@ jobs:
229206
toolchain: stable
230207
- name: Build bevy
231208
run: |
232-
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"
209+
cargo build --features "bevy_ci_testing,trace,trace_chrome"
233210
- name: Run examples
234211
run: |
235212
for example in .github/example-run/*.ron; do
236213
example_name=`basename $example .ron`
237214
echo "running $example_name - "`date`
238-
time TRACE_CHROME=trace-$example_name.json 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"
215+
time TRACE_CHROME=trace-$example_name.json CI_TESTING_CONFIG=$example xvfb-run cargo run --example $example_name --features "bevy_ci_testing,trace,trace_chrome"
239216
sleep 10
240217
done
241218
zip traces.zip trace*.json

.github/workflows/ios.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/validation-jobs.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: validation jobs
2+
3+
on:
4+
push:
5+
branches:
6+
- staging
7+
- trying
8+
- main
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
13+
jobs:
14+
build-and-install-on-iOS:
15+
runs-on: macos-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- uses: actions-rs/toolchain@v1
20+
with:
21+
toolchain: stable
22+
override: true
23+
24+
- uses: actions/cache@v3
25+
with:
26+
path: |
27+
target
28+
key: ${{ runner.os }}-ios-install-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
29+
30+
- name: Add iOS targets
31+
run: rustup target add aarch64-apple-ios x86_64-apple-ios
32+
33+
- name: Build and install iOS app in iOS Simulator.
34+
run: cd examples/ios && make install
35+
36+
build-android:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v3
40+
41+
- uses: actions-rs/toolchain@v1
42+
with:
43+
toolchain: stable
44+
45+
- uses: actions/cache@v3
46+
with:
47+
path: |
48+
~/.cargo/bin/
49+
~/.cargo/registry/index/
50+
~/.cargo/registry/cache/
51+
~/.cargo/git/db/
52+
target/
53+
key: ${{ runner.os }}-cargo-build-android-${{ hashFiles('**/Cargo.toml') }}
54+
55+
- name: Uninstall android-31
56+
run: $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-31"
57+
58+
- name: Install Android targets
59+
run: rustup target add aarch64-linux-android armv7-linux-androideabi
60+
61+
- name: Install Cargo APK
62+
run: cargo install --force cargo-apk
63+
64+
- name: Build APK
65+
run: cargo apk build --example android
66+
67+
run-examples-on-windows:
68+
runs-on: windows-latest
69+
timeout-minutes: 30
70+
steps:
71+
- uses: actions/checkout@v3
72+
73+
- uses: actions-rs/toolchain@v1
74+
with:
75+
toolchain: stable
76+
77+
- uses: actions/cache@v3
78+
with:
79+
path: |
80+
~/.cargo/bin/
81+
~/.cargo/registry/index/
82+
~/.cargo/registry/cache/
83+
~/.cargo/git/db/
84+
target/
85+
key: ${{ runner.os }}-windows-run-examples-${{ hashFiles('**/Cargo.toml') }}
86+
87+
- name: Build bevy
88+
run: |
89+
cargo build --features "bevy_ci_testing"
90+
91+
- name: Run examples
92+
shell: bash
93+
run: |
94+
for example in .github/example-run/*.ron; do
95+
example_name=`basename $example .ron`
96+
echo "running $example_name - "`date`
97+
time CI_TESTING_CONFIG=$example cargo run --example $example_name --features "bevy_ci_testing"
98+
sleep 10
99+
done

0 commit comments

Comments
 (0)