-
Notifications
You must be signed in to change notification settings - Fork 50
159 lines (153 loc) · 6.5 KB
/
example_validation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
name: example-run
on:
pull_request:
branches:
- main
- "v*"
push:
branches:
- main
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
NIGHTLY_TOOLCHAIN: nightly
jobs:
run-platformer-example-linux:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Install Bevy dependencies
run: |
sudo apt-get update;
DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends -yq \
libasound2-dev libudev-dev libxkbcommon-x11-0 libwayland-dev;
- name: install xvfb, llvmpipe and lavapipe
run: |
sudo apt-get update -y -qq
sudo add-apt-repository ppa:kisak/turtle -y
sudo apt-get update
sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- 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_${{ hashFiles('**/Cargo.toml') }}
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
target: x86_64-unknown-linux-gnu
- name: Build bevy
# this uses the same command as when running the example to ensure build is reused
run: TRACE_CHROME=trace-platformer.json CI_TESTING_CONFIG=.github/example-run/platformer.ron cargo +nightly build --example platformer --release --features "bevy_xpbd_3d,bevy/bevy_ci_testing,bevy/trace_chrome,bevy/trace,backtrace"
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -Z location-detail=none -Z threads=24"
- name: Run examples
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -Z location-detail=none -Z threads=24"
run: |
example_name=`basename plaformer.ron`
echo -n $example_name > last_example_run
echo "running platformer - "`date`
time TRACE_CHROME=trace-platformer.json CI_TESTING_CONFIG=.github/example-run/platformer.ron xvfb-run cargo +nightly run --release --example platformer --features "bevy_xpbd_3d,bevy/bevy_ci_testing,bevy/trace_chrome,bevy/trace"
sleep 10
if [ `find ./ -maxdepth 1 -name 'screenshot-*.png' -print -quit` ]; then
mkdir screenshots-platformer
mv screenshot-*.png screenshots-platformer/
fi
mkdir traces && mv trace*.json traces/
mkdir screenshots && mv screenshots-* screenshots/
- name: save traces
uses: actions/upload-artifact@v4
with:
name: example-traces-linux-platformer-${{ steps.date.outputs.date }}
path: traces
- name: save screenshots
uses: actions/upload-artifact@v4
with:
name: screenshots-linux-platformer-${{ steps.date.outputs.date }}
path: screenshots
- uses: actions/upload-artifact@v4
if: ${{ failure() && github.event_name == 'pull_request' }}
with:
name: example-run-linux-platformer-${{ steps.date.outputs.date }}
path: example-run/
run-spawn_prefab_with_physics-example-linux:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Install Bevy dependencies
run: |
sudo apt-get update;
DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends -yq \
libasound2-dev libudev-dev libxkbcommon-x11-0 libwayland-dev;
- name: install xvfb, llvmpipe and lavapipe
run: |
sudo apt-get update -y -qq
sudo add-apt-repository ppa:kisak/turtle -y
sudo apt-get update
sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- 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_${{ hashFiles('**/Cargo.toml') }}
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
target: x86_64-unknown-linux-gnu
- name: Build bevy
# this uses the same command as when running the example to ensure build is reused
run: TRACE_CHROME=trace-spawn_prefab_with_physics.json CI_TESTING_CONFIG=.github/example-run/spawn_prefab_with_physics.ron cargo +nightly build --example spawn_prefab_with_physics --release --features "bevy_xpbd_3d,bevy/bevy_ci_testing,bevy/trace_chrome,bevy/trace"
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -Z location-detail=none -Z threads=24"
- name: Run examples
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -Z location-detail=none -Z threads=24"
run: |
example_name=`basename plaformer.ron`
echo -n $example_name > last_example_run
echo "running spawn_prefab_with_physics - "`date`
time TRACE_CHROME=trace-spawn_prefab_with_physics.json CI_TESTING_CONFIG=.github/example-run/spawn_prefab_with_physics.ron xvfb-run cargo +nightly run --release --example spawn_prefab_with_physics --features "bevy_xpbd_3d,bevy/bevy_ci_testing,bevy/trace_chrome,bevy/trace"
sleep 10
if [ `find ./ -maxdepth 1 -name 'screenshot-*.png' -print -quit` ]; then
mkdir screenshots-spawn_prefab_with_physics
mv screenshot-*.png screenshots-spawn_prefab_with_physics/
fi
mkdir traces && mv trace*.json traces/
mkdir screenshots && mv screenshots-* screenshots/
- name: save traces
uses: actions/upload-artifact@v4
with:
name: example-traces-linux-spawn-prefab-${{ steps.date.outputs.date }}
path: traces
- name: save screenshots
uses: actions/upload-artifact@v4
with:
name: screenshots-linux-spawn-prefab-${{ steps.date.outputs.date }}
path: screenshots
- uses: actions/upload-artifact@v4
if: ${{ failure() && github.event_name == 'pull_request' }}
with:
name: example-run-linux-spawn-prefab-${{ steps.date.outputs.date }}
path: example-run/