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
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,16 @@ jobs:
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
include:
- os: ubuntu-latest
gpu: 'yes'
- os: macos-latest
gpu: 'yes'
- os: windows-latest
# Windows hosted runners do not provide a reliable Vello GPU runtime.
gpu: 'no'
env:
IMAGING_CI_GPU_SUPPORT: ${{ matrix.gpu }}
steps:
- uses: actions/checkout@v6

Expand Down
26 changes: 26 additions & 0 deletions imaging_vello/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright 2026 the Imaging Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Build-script configuration for `imaging_vello` tests.

use std::env;

fn main() {
println!("cargo:rerun-if-env-changed=IMAGING_CI_GPU_SUPPORT");
println!("cargo:rustc-check-cfg=cfg(skip_gpu_tests)");

let Ok(mut value) = env::var("IMAGING_CI_GPU_SUPPORT") else {
return;
};
value.make_ascii_lowercase();

match value.as_str() {
"yes" | "y" => {}
"no" | "n" => {
println!("cargo:rustc-cfg=skip_gpu_tests");
}
_ => {
println!("cargo:warning=IMAGING_CI_GPU_SUPPORT should be set to yes/y or no/n");
}
}
}
8 changes: 8 additions & 0 deletions imaging_vello/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ mod tests {
}

#[test]
#[cfg_attr(skip_gpu_tests, ignore)]
fn render_renders_encoded_scene() {
let Ok((device, queue)) = try_init_device_and_queue() else {
return;
Expand All @@ -628,6 +629,7 @@ mod tests {
}

#[test]
#[cfg_attr(skip_gpu_tests, ignore)]
fn render_source_renders_scene() {
let Ok((device, queue)) = try_init_device_and_queue() else {
return;
Expand Down Expand Up @@ -678,6 +680,7 @@ mod tests {
}

#[test]
#[cfg_attr(skip_gpu_tests, ignore)]
fn texture_view_render_smoke() {
let Ok((device, queue)) = try_init_device_and_queue() else {
return;
Expand Down Expand Up @@ -721,6 +724,7 @@ mod tests {
}

#[test]
#[cfg_attr(skip_gpu_tests, ignore)]
fn render_source_to_texture_smoke() {
let Ok((device, queue)) = try_init_device_and_queue() else {
return;
Expand Down Expand Up @@ -767,6 +771,7 @@ mod tests {
}

#[test]
#[cfg_attr(skip_gpu_tests, ignore)]
fn render_source_texture_returns_independent_texture() {
let Ok((device, queue)) = try_init_device_and_queue() else {
return;
Expand All @@ -791,6 +796,7 @@ mod tests {
}

#[test]
#[cfg_attr(skip_gpu_tests, ignore)]
fn render_source_into_rejects_short_row_stride_as_target_error() {
let Ok((device, queue)) = try_init_device_and_queue() else {
return;
Expand Down Expand Up @@ -822,6 +828,7 @@ mod tests {
}

#[test]
#[cfg_attr(skip_gpu_tests, ignore)]
fn render_source_into_rejects_short_buffer_as_target_error() {
let Ok((device, queue)) = try_init_device_and_queue() else {
return;
Expand Down Expand Up @@ -859,6 +866,7 @@ mod tests {
}

#[test]
#[cfg_attr(skip_gpu_tests, ignore)]
fn app_owned_wgpu_renders() {
let Ok((device, queue)) = try_init_device_and_queue() else {
return;
Expand Down
Loading