mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-25 16:25:25 +00:00
b12a2f3f6a
* get rid of vertex buffers in example * get rid of unused attributes in example shader * use negative viewport height to match wgpu * remove depth buffer * use SRGB surface * improve tonemapping remove 'gamma correction' in favor of hardware srgb support * make clippy happy * move tonemapping out of sky(), rename gl_pos to builtin_pos * rename shaders and use sky shader in wgpu example runner * apply srgb OETF and invert clip space for cpu example runner * restructure example directory structure according to #170 * update winit in wgpu example runner * fix deny.toml example crate refs * fix ci example name on maOS * example-shader -> sky-shader in docs * update sky shader image * re-enable clippy and make it happy
56 lines
1.2 KiB
Bash
Executable File
56 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
if [[ -z "${CI}" ]]; then
|
|
FEAT="use-compiled-tools"
|
|
else
|
|
FEAT="use-installed-tools"
|
|
fi
|
|
|
|
os=$1
|
|
|
|
function cargo_test() {
|
|
echo ::group::"$1 build"
|
|
cargo test \
|
|
--manifest-path "$1/Cargo.toml" \
|
|
--no-default-features \
|
|
--features "$FEAT" \
|
|
--no-run
|
|
echo ::endgroup::
|
|
|
|
echo ::group::"$1 test"
|
|
cargo test \
|
|
--manifest-path "$1/Cargo.toml" \
|
|
--no-default-features \
|
|
--features "$FEAT"
|
|
echo ::endgroup::
|
|
}
|
|
|
|
function cargo_test_no_features() {
|
|
echo ::group::"$1 build"
|
|
cargo test --manifest-path "$1/Cargo.toml" --no-run
|
|
echo ::endgroup::
|
|
|
|
echo ::group::"$1 test"
|
|
cargo test --manifest-path "$1/Cargo.toml"
|
|
echo ::endgroup::
|
|
}
|
|
|
|
# Core crates
|
|
cargo_test spirv-tools-sys
|
|
cargo_test spirv-tools
|
|
cargo_test rustc_codegen_spirv
|
|
cargo_test spirv-builder
|
|
|
|
# Examples
|
|
# See: https://github.com/EmbarkStudios/rust-gpu/issues/84
|
|
if [[ -z "${CI}" && "$os" != "macOS" ]]; then
|
|
cargo_test examples/runners/ash
|
|
fi
|
|
|
|
cargo_test examples/runners/wgpu
|
|
|
|
cargo_test_no_features examples/runners/cpu
|
|
cargo_test_no_features examples/shaders/sky-shader
|
|
cargo_test_no_features examples/shaders/simplest-shader
|