1- name : compile & test lambda-rs
1+ name : compile & test lambda-rs (wgpu)
22
33on :
44 push :
5- branches : [ main ]
5+ branches : [main]
66
77 pull_request :
8- branches : [ main ]
8+ branches : [main]
99
1010 workflow_dispatch :
1111
@@ -20,54 +20,55 @@ jobs:
2020 strategy :
2121 matrix :
2222 include :
23- - os : ubuntu-latest
24- rustup-toolchain : " stable"
25- features : " lambda-rs/with-opengl"
26- - os : ubuntu-latest
27- rustup-toolchain : " stable"
28- features : " lambda-rs/with-vulkan"
29- - os : windows-latest
30- rustup-toolchain : " stable"
31- features : " lambda-rs/with-vulkan"
32- - os : windows-latest
33- rustup-toolchain : " stable"
34- features : " lambda-rs/with-dx11"
35- - os : windows-latest
36- rustup-toolchain : " stable"
37- features : " lambda-rs/with-dx12"
38- - os : macos-latest
39- rustup-toolchain : " stable"
40- features : " lambda-rs/with-opengl"
41- - os : macos-latest
42- rustup-toolchain : " stable"
43- features : " lambda-rs/with-metal"
23+ - os : ubuntu-latest
24+ rustup-toolchain : " stable"
25+ features : " lambda-rs/with-vulkan"
26+ - os : windows-latest
27+ rustup-toolchain : " stable"
28+ features : " lambda-rs/with-dx12"
29+ - os : macos-latest
30+ rustup-toolchain : " stable"
31+ features : " lambda-rs/with-metal"
4432
4533 steps :
4634 - name : Checkout Repository
47- uses : actions/checkout@v2
35+ uses : actions/checkout@v4
36+
37+ - name : Cache cargo builds
38+ uses : Swatinem/rust-cache@v2
4839
4940 - name : Run the projects setup.
5041 run : ./scripts/setup.sh --within-ci true
5142
52- - name : Obtain Xorg for building on Ubuntu.
43+ - name : Install Linux deps for winit/wgpu
5344 if : ${{ matrix.os == 'ubuntu-latest' }}
54- run : sudo apt-get update && sudo apt-get install xorg-dev
55-
56- - name : Add msbuild to PATH
57- if : ${{ matrix.os == 'windows-latest' }}
58- uses : microsoft/setup-msbuild@v1.0.2
45+ run : |
46+ sudo apt-get update
47+ sudo apt-get install -y \
48+ pkg-config libx11-dev libxcb1-dev libxcb-render0-dev \
49+ libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev \
50+ libwayland-dev libudev-dev libvulkan-dev
5951
60- - name : Install ninja 1.10.2 on windows.
61- if : ${{ matrix.os == 'windows-latest' }}
62- run : choco install ninja
52+ # Windows runners already include the required toolchain for DX12 builds.
6353
6454 - name : Obtain rust toolchain for ${{ matrix.rustup-toolchain }}
6555 run : |
6656 rustup toolchain install ${{ matrix.rustup-toolchain }}
6757 rustup default ${{ matrix.rustup-toolchain }}
6858
69- - name : Build Lambda & other default workspace members.
70- run : cargo test --all --features ${{ matrix.features }} --no-default-features
59+ - name : Check formatting
60+ run : |
61+ rustup component add rustfmt --toolchain nightly-2025-09-26
62+ cargo +nightly-2025-09-26 fmt --all --check
63+
64+ - name : Build workspace
65+ run : cargo build --workspace --features ${{ matrix.features }}
66+
67+ - name : Build examples (lambda-rs)
68+ run : cargo build -p lambda-rs --examples --features ${{ matrix.features }}
69+
70+ - name : Test workspace
71+ run : cargo test --workspace --features ${{ matrix.features }}
7172
7273 - uses : actions/setup-ruby@v1
7374 - name : Send Webhook Notification for build status.
0 commit comments