Skip to content

Commit

Permalink
speed-up-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
naomijub committed Apr 5, 2024
1 parent 302ebc4 commit 72d9f57
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 74 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
push:
branches:
- main
pull_request:
branches:
- "*"
# pull_request:
# branches:
# - "*"

permissions:
contents: write
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: coverage

on:
pull_request:
branches: [ "*" ]
# pull_request:
# branches: [ "*" ]
push:
branches: [ main ]

Expand Down
138 changes: 69 additions & 69 deletions .github/workflows/example_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,72 +88,72 @@ jobs:
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/
# 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/
9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@ opt-level = 1
[profile.dev.package."*"]
opt-level = 3

[profile.ci]
inherits = "dev"
opt-level = 0
debug = 0
strip = "none"
lto = false
codegen-units = 256
incremental = true

[features]
backtrace = ["dep:backtrace-on-stack-overflow"]
bevy_xpbd_3d = ["dep:space_bevy_xpbd_plugin"]
Expand Down

0 comments on commit 72d9f57

Please sign in to comment.