-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (64 loc) · 2.45 KB
/
update-cache.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
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') }}