Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 37 additions & 36 deletions .github/workflows/compile_lambda_rs.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: compile & test lambda-rs
name: compile & test lambda-rs (wgpu)

on:
push:
branches: [ main ]
branches: [main]

pull_request:
branches: [ main ]
branches: [main]

workflow_dispatch:

Expand All @@ -20,54 +20,55 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-latest
rustup-toolchain: "stable"
features: "lambda-rs/with-opengl"
- os: ubuntu-latest
rustup-toolchain: "stable"
features: "lambda-rs/with-vulkan"
- os: windows-latest
rustup-toolchain: "stable"
features: "lambda-rs/with-vulkan"
- os: windows-latest
rustup-toolchain: "stable"
features: "lambda-rs/with-dx11"
- os: windows-latest
rustup-toolchain: "stable"
features: "lambda-rs/with-dx12"
- os: macos-latest
rustup-toolchain: "stable"
features: "lambda-rs/with-opengl"
- os: macos-latest
rustup-toolchain: "stable"
features: "lambda-rs/with-metal"
- os: ubuntu-latest
rustup-toolchain: "stable"
features: "lambda-rs/with-vulkan"
- os: windows-latest
rustup-toolchain: "stable"
features: "lambda-rs/with-dx12"
- os: macos-latest
rustup-toolchain: "stable"
features: "lambda-rs/with-metal"

steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache cargo builds
uses: Swatinem/rust-cache@v2

- name: Run the projects setup.
run: ./scripts/setup.sh --within-ci true

- name: Obtain Xorg for building on Ubuntu.
- name: Install Linux deps for winit/wgpu
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install xorg-dev

- name: Add msbuild to PATH
if: ${{ matrix.os == 'windows-latest' }}
uses: microsoft/setup-msbuild@v1.0.2
run: |
sudo apt-get update
sudo apt-get install -y \
pkg-config libx11-dev libxcb1-dev libxcb-render0-dev \
libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev \
libwayland-dev libudev-dev libvulkan-dev

- name: Install ninja 1.10.2 on windows.
if: ${{ matrix.os == 'windows-latest' }}
run: choco install ninja
# Windows runners already include the required toolchain for DX12 builds.

- name: Obtain rust toolchain for ${{ matrix.rustup-toolchain }}
run: |
rustup toolchain install ${{ matrix.rustup-toolchain }}
rustup default ${{ matrix.rustup-toolchain }}

- name: Build Lambda & other default workspace members.
run: cargo test --all --features ${{ matrix.features }} --no-default-features
- name: Check formatting
run: |
rustup component add rustfmt --toolchain nightly-2025-09-26
cargo +nightly-2025-09-26 fmt --all --check

- name: Build workspace
run: cargo build --workspace --features ${{ matrix.features }}

- name: Build examples (lambda-rs)
run: cargo build -p lambda-rs --examples --features ${{ matrix.features }}

- name: Test workspace
run: cargo test --workspace --features ${{ matrix.features }}

- uses: actions/setup-ruby@v1
- name: Send Webhook Notification for build status.
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/lambda-repo-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# More details at https://github.com/rust-lang/rust-clippy
# and https://rust-lang.github.io/rust-clippy/

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

on:
push:
Expand All @@ -28,28 +28,30 @@ jobs:
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache cargo builds
uses: Swatinem/rust-cache@v2

- name: Install Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
components: clippy
override: true

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

- name: Check formatting
run: cargo fmt --all --check

- name: Run rust-clippy
run:
cargo clippy
--all-features
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
run: |
cargo clippy --workspace --all-targets --all-features --message-format=json -- -D warnings \
| clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
continue-on-error: true

- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v1
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true
Loading
Loading