1- name : compile & test lambda-rs
1+ name : compile & test lambda-rs (wgpu)
22
33on :
44 push :
@@ -21,53 +21,52 @@ jobs:
2121 matrix :
2222 include :
2323 - 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
3024 rustup-toolchain : " stable"
3125 features : " lambda-rs/with-vulkan"
32- - os : windows-latest
33- rustup-toolchain : " stable"
34- features : " lambda-rs/with-dx11"
3526 - os : windows-latest
3627 rustup-toolchain : " stable"
3728 features : " lambda-rs/with-dx12"
38- - os : macos-latest
39- rustup-toolchain : " stable"
40- features : " lambda-rs/with-opengl"
4129 - os : macos-latest
4230 rustup-toolchain : " stable"
4331 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- 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 : cargo fmt --all --check
61+
62+ - name : Build workspace
63+ run : cargo build --workspace --features ${{ matrix.features }} --no-default-features
64+
65+ - name : Build examples (lambda-rs)
66+ run : cargo build -p lambda-rs --examples --features ${{ matrix.features }} --no-default-features
67+
68+ - name : Test workspace
69+ run : cargo test --workspace --features ${{ matrix.features }} --no-default-features
7170
7271 - uses : actions/setup-ruby@v1
7372 - name : Send Webhook Notification for build status.
0 commit comments