Skip to content

Upkeep - Update Cache #200

Upkeep - Update Cache

Upkeep - Update Cache #200

name: Upkeep - Update Cache
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
build-cache:
name: Build Cache
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-14]
steps:
- name: Checkout Bevy main branch
uses: actions/checkout@v4
with:
repository: 'bevyengine/bevy'
- name: Checkout patches
uses: actions/checkout@v4
with:
path: 'runner-patches'
- name: Apply patches
shell: pwsh
run: |
Get-ChildItem "runner-patches/patches" -Filter *.patch |
Foreach-Object {
Write-Output "Processing $($_.FullName)"
git apply --ignore-whitespace $($_.FullName)
}
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Bevy dependencies
if: runner.os == 'linux'
run: |
sudo apt-get update;
DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends -yq \
libasound2-dev libudev-dev libxkbcommon-x11-0;
- name: Install xvfb, llvmpipe and lavapipe
if: runner.os == 'linux'
run: |
sudo apt-get update -y -qq
sudo add-apt-repository ppa:kisak/turtle -y || FAILED=true
# retry as it sometimes timeout
if [ $FAILED ]; then
sleep 5
sudo add-apt-repository ppa:kisak/turtle -y || FAILED=true
if [ $FAILED ]; then
sleep 5
sudo add-apt-repository ppa:kisak/turtle -y
fi
fi
sudo apt-get update
sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- name: Build an example (Linux)
if: runner.os == 'linux'
run: xvfb-run -s "-screen 0 1280x1024x24" cargo run -p example-showcase -- --page 1 --per-page 1 run --in-ci --ignore-stress-tests --screenshot-frame 0 --fixed-frame-time 0.02 --stop-frame 50
- name: Build an example (macOS)
if: runner.os == 'macos'
run: cargo run -p example-showcase -- --page 1 --per-page 1 run --in-ci --ignore-stress-tests --screenshot-frame 0 --fixed-frame-time 0.02 --stop-frame 50
- name: Save cache
uses: actions/cache/save@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}