Update Cache #58
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: Update Cache | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
build-cache: | |
name: Build Cache | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-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 | |
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-at 0 --frame-duration 0.02 --stop-at 50 | |
- name: Build an example (Windows) | |
if: runner.os == 'windows' | |
shell: pwsh | |
run: cargo run -p example-showcase -- --page 1 --per-page 1 run --in-ci --ignore-stress-tests --screenshot-at 0 --frame-duration 0.02 --stop-at 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-at 0 --frame-duration 0.02 --stop-at 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') }} |