Skip to content

Commit e5e53bd

Browse files
committed
CONTENTIOUS: Run tests on linux through xvfb
1 parent 0ae4ee0 commit e5e53bd

File tree

2 files changed

+48
-4
lines changed

2 files changed

+48
-4
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,30 @@ jobs:
2525
build:
2626
strategy:
2727
matrix:
28-
os: [windows-latest, ubuntu-latest, macos-latest]
28+
os: [windows-latest, macos-latest]
2929
runs-on: ${{ matrix.os }}
3030
timeout-minutes: 30
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: actions/cache@v4
34+
with:
35+
path: |
36+
~/.cargo/bin/
37+
~/.cargo/registry/index/
38+
~/.cargo/registry/cache/
39+
~/.cargo/git/db/
40+
target/
41+
key: ${{ runner.os }}-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}
42+
- uses: dtolnay/rust-toolchain@stable
43+
- name: Build & run tests
44+
# See tools/ci/src/main.rs for the commands this runs
45+
run: cargo run -p ci -- test
46+
env:
47+
RUSTFLAGS: "-C debuginfo=0 -D warnings"
48+
49+
build-linux:
50+
runs-on: ubuntu-latest
51+
timeout-minutes: 30
3152
steps:
3253
- uses: actions/checkout@v4
3354
- uses: actions/cache@v4
@@ -42,9 +63,14 @@ jobs:
4263
- uses: dtolnay/rust-toolchain@stable
4364
- name: Install Linux dependencies
4465
uses: ./.github/actions/install-linux-deps
66+
# At some point this may be merged into `install-linux-deps`, but for now it is its own step.
67+
- name: Install additional Linux dependencies for Vulkan
68+
run: |
69+
sudo add-apt-repository ppa:kisak/turtle -y
70+
sudo apt-get install --no-install-recommends libxkbcommon-x11-0 xvfb libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
4571
- name: Build & run tests
4672
# See tools/ci/src/main.rs for the commands this runs
47-
run: cargo run -p ci -- test
73+
run: xvfb-run cargo run -p ci -- test
4874
env:
4975
RUSTFLAGS: "-C debuginfo=0 -D warnings"
5076

.github/workflows/weekly.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,37 @@ jobs:
3333
test:
3434
strategy:
3535
matrix:
36-
os: [windows-latest, ubuntu-latest, macos-latest]
36+
os: [windows-latest, macos-latest]
3737
runs-on: ${{ matrix.os }}
3838
# Disable this job when running on a fork.
3939
if: github.repository == 'bevyengine/bevy'
4040
timeout-minutes: 30
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: dtolnay/rust-toolchain@beta
44+
- name: Build & run tests
45+
# See tools/ci/src/main.rs for the commands this runs
46+
run: cargo run -p ci -- test
47+
env:
48+
RUSTFLAGS: "-C debuginfo=0 -D warnings"
49+
test-linux:
50+
runs-on: ubuntu-latest
51+
# Disable this job when running on a fork.
52+
if: github.repository == 'bevyengine/bevy'
53+
timeout-minutes: 30
4154
steps:
4255
- uses: actions/checkout@v4
4356
- uses: dtolnay/rust-toolchain@beta
4457
- name: Install Linux dependencies
4558
uses: ./.github/actions/install-linux-deps
59+
# At some point this may be merged into `install-linux-deps`, but for now it is its own step.
60+
- name: Install additional Linux dependencies for Vulkan
61+
run: |
62+
sudo add-apt-repository ppa:kisak/turtle -y
63+
sudo apt-get install --no-install-recommends libxkbcommon-x11-0 xvfb libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
4664
- name: Build & run tests
4765
# See tools/ci/src/main.rs for the commands this runs
48-
run: cargo run -p ci -- test
66+
run: xvfb-run cargo run -p ci -- test
4967
env:
5068
RUSTFLAGS: "-C debuginfo=0 -D warnings"
5169

0 commit comments

Comments
 (0)