well... #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
jobs: | |
run-examples-linux-vulkan: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Install Bevy dependencies | |
run: | | |
sudo apt-get update; | |
DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends -yq \ | |
libasound2-dev libudev-dev gdb; | |
- name: install xvfb, llvmpipe and lavapipe | |
run: | | |
sudo apt-get update -y -qq | |
# sudo add-apt-repository ppa:oibaf/graphics-drivers -y | |
sudo add-apt-repository ppa:kisak/kisak-mesa -y | |
sudo apt-get update | |
sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers | |
- name: Prepare gdb | |
run: | | |
echo "run" > commands.gdb | |
echo "bt" >> commands.gdb | |
echo "quit" >> commands.gdb | |
- name: vulkaninfo | |
run: | | |
sudo apt-get install vulkan-tools | |
gdb --command commands.gdb vulkaninfo | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-run-examples-${{ hashFiles('**/Cargo.toml') }} | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Build bevy | |
# this uses the same command as when running the example to ensure build is reused | |
run: | | |
CI_TESTING_CONFIG=.github/example-run/alien_cake_addict.ron cargo build --example alien_cake_addict --features "bevy_ci_testing" | |
- name: Run examples | |
run: | | |
example=".github/example-run/alien_cake_addict.ron" | |
example_name=`basename $example .ron` | |
echo -n $example_name > last_example_run | |
echo "running $example_name - "`date` | |
CI_TESTING_CONFIG=$example xvfb-run ./target/debug/examples/alien_cake_addict | |
sleep 10 | |
if [ `find ./ -maxdepth 1 -name 'screenshot-*.png' -print -quit` ]; then | |
mkdir screenshots-$example_name | |
mv screenshot-*.png screenshots-$example_name/ | |
fi | |
- name: save traces | |
uses: actions/upload-artifact@v3 | |
with: | |
name: example-traces.zip | |
path: traces.zip | |
- name: save screenshots | |
uses: actions/upload-artifact@v3 | |
with: | |
name: screenshots.zip | |
path: screenshots.zip | |
- uses: actions/upload-artifact@v2 | |
if: ${{ failure() && github.event_name == 'pull_request' }} | |
with: | |
name: example-run | |
path: example-run/ |