Skip to content

Commit 580a87a

Browse files
authored
Merge pull request #60 from lambda-sh/vmarcella/add-wgpu
wgpu support
2 parents 9d02f17 + 964d58c commit 580a87a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+6280
-4158
lines changed

.github/workflows/compile_lambda_rs.yml

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: compile & test lambda-rs
1+
name: compile & test lambda-rs (wgpu)
22

33
on:
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.

.github/workflows/lambda-repo-security.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# More details at https://github.com/rust-lang/rust-clippy
88
# and https://rust-lang.github.io/rust-clippy/
99

10-
name: rust-clippy analyze
10+
name: rust fmt + clippy analyze
1111

1212
on:
1313
push:
@@ -28,28 +28,30 @@ jobs:
2828
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
2929
steps:
3030
- name: Checkout code
31-
uses: actions/checkout@v2
31+
uses: actions/checkout@v4
32+
33+
- name: Cache cargo builds
34+
uses: Swatinem/rust-cache@v2
3235

3336
- name: Install Rust toolchain
34-
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
37+
uses: dtolnay/rust-toolchain@stable
3538
with:
36-
profile: minimal
37-
toolchain: stable
3839
components: clippy
39-
override: true
4040

4141
- name: Install dependencies for converting clippy output to SARIF
4242
run: cargo install clippy-sarif sarif-fmt
4343

44+
- name: Check formatting
45+
run: cargo fmt --all --check
46+
4447
- name: Run rust-clippy
45-
run:
46-
cargo clippy
47-
--all-features
48-
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
48+
run: |
49+
cargo clippy --workspace --all-targets --all-features --message-format=json -- -D warnings \
50+
| clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
4951
continue-on-error: true
5052

5153
- name: Upload analysis results to GitHub
52-
uses: github/codeql-action/upload-sarif@v1
54+
uses: github/codeql-action/upload-sarif@v3
5355
with:
5456
sarif_file: rust-clippy-results.sarif
5557
wait-for-processing: true

0 commit comments

Comments
 (0)