mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
Run tests in the CI for all workspace members
This commit is contained in:
parent
ee3b85928e
commit
6ba30cbc0b
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -138,7 +138,7 @@ jobs:
|
|||||||
if: matrix.kind == 'test'
|
if: matrix.kind == 'test'
|
||||||
run: |
|
run: |
|
||||||
cargo build --target ${{ matrix.target }} --bin wgpu-info
|
cargo build --target ${{ matrix.target }} --bin wgpu-info
|
||||||
cargo build --target ${{ matrix.target }} --tests -p player
|
cargo build --target ${{ matrix.target }} --tests --workspace --exclude wgpu
|
||||||
cargo build --target ${{ matrix.target }} --examples --tests -p wgpu
|
cargo build --target ${{ matrix.target }} --examples --tests -p wgpu
|
||||||
|
|
||||||
- name: tests
|
- name: tests
|
||||||
@ -148,7 +148,7 @@ jobs:
|
|||||||
cargo run --target ${{ matrix.target }} --bin wgpu-info
|
cargo run --target ${{ matrix.target }} --bin wgpu-info
|
||||||
|
|
||||||
# run player tests
|
# run player tests
|
||||||
cargo test --target ${{ matrix.target }} -p player -- --nocapture
|
cargo test --target ${{ matrix.target }} --workspace --exclude wpgu --no-fail-fast -- --nocapture
|
||||||
|
|
||||||
# run coretests
|
# run coretests
|
||||||
cargo run --target ${{ matrix.target }} --bin wgpu-info -- cargo test --target ${{ matrix.target }} -p wgpu --no-fail-fast -- --nocapture --test-threads=1 # GLES is currently non-multithreadable
|
cargo run --target ${{ matrix.target }} --bin wgpu-info -- cargo test --target ${{ matrix.target }} -p wgpu --no-fail-fast -- --nocapture --test-threads=1 # GLES is currently non-multithreadable
|
||||||
|
|||||||
@ -84,16 +84,16 @@ fn test_backend_macro() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(windows, all(unix, not(target_os = "ios"), not(target_os = "macos")),))]
|
#[cfg(any(windows, all(unix, not(target_os = "ios"), not(target_os = "macos")),))]
|
||||||
assert!(vec.contains(&(1, 'a')));
|
assert!(vec.contains(&(101, 'a')));
|
||||||
|
|
||||||
#[cfg(any(target_os = "ios", target_os = "macos"))]
|
#[cfg(any(target_os = "ios", target_os = "macos"))]
|
||||||
assert!(vec.contains(&(2, 'b')));
|
assert!(vec.contains(&(102, 'b')));
|
||||||
|
|
||||||
#[cfg(dx12)]
|
#[cfg(dx12)]
|
||||||
assert!(vec.contains(&(3, 'c')));
|
assert!(vec.contains(&(103, 'c')));
|
||||||
|
|
||||||
#[cfg(dx11)]
|
#[cfg(dx11)]
|
||||||
assert!(vec.contains(&(4, 'd')));
|
assert!(vec.contains(&(104, 'd')));
|
||||||
|
|
||||||
// test complex statement-per-backend
|
// test complex statement-per-backend
|
||||||
backends_map! {
|
backends_map! {
|
||||||
@ -104,16 +104,16 @@ fn test_backend_macro() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(vulkan)]
|
#[cfg(vulkan)]
|
||||||
map((test_foo.vulkan, |v| v == 1, || println!("vulkan"))),
|
map((test_foo.vulkan, |v| v == 101, || println!("vulkan"))),
|
||||||
|
|
||||||
#[cfg(metal)]
|
#[cfg(metal)]
|
||||||
map((test_foo.metal, |v| v == 2, || println!("metal"))),
|
map((test_foo.metal, |v| v == 102, || println!("metal"))),
|
||||||
|
|
||||||
#[cfg(dx12)]
|
#[cfg(dx12)]
|
||||||
map((test_foo.dx12, |v| v == 3, || println!("dx12"))),
|
map((test_foo.dx12, |v| v == 103, || println!("dx12"))),
|
||||||
|
|
||||||
#[cfg(dx11)]
|
#[cfg(dx11)]
|
||||||
map((test_foo.dx11, |v| v == 4, || println!("dx11"))),
|
map((test_foo.dx11, |v| v == 104, || println!("dx11"))),
|
||||||
}
|
}
|
||||||
|
|
||||||
// test struct construction 2
|
// test struct construction 2
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user