Skip to content

Commit

Permalink
github workflow ensure shaders are checked in
Browse files Browse the repository at this point in the history
  • Loading branch information
schell committed Nov 28, 2023
1 parent 085d940 commit c3fad46
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@ on: [push]
name: push

jobs:
renderling-build:
renderling-build-shaders:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: cd shaders && cargo run --release && cd .. && cargo build
- run: |
rm -rf crates/renderling/src/linkage/*.spv
cd shaders && cargo run --release && cd ..
# ensure the shader binaries were properly checked in
git diff --exit-code --no-ext-diff crates/renderling/src/linkage
# ensure the shaders are valid for our uses (see renderling::linkage::validate_shaders)
cargo test -p renderling -- --nocapture linkage
#renderling-test:
# runs-on: [ubuntu-latest, gpu]
Expand Down
2 changes: 1 addition & 1 deletion crates/renderling/src/linkage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ mod test {
#[test]
// Ensure that the shaders can be converted to WGSL.
// This is necessary for WASM using WebGPU, because WebGPU only accepts
// WGSL as a shading language.:w
// WGSL as a shading language.
fn validate_shaders() {
fn validate_src(path: &std::path::PathBuf) -> Result<(), SrcError> {
let bytes = std::fs::read(path).context(ReadSnafu)?;
Expand Down
Binary file modified crates/renderling/src/linkage/stage-new_stage_vertex.spv
Binary file not shown.
Binary file modified crates/renderling/src/linkage/stage-stage_fragment.spv
Binary file not shown.
Binary file modified crates/renderling/src/linkage/tutorial-slabbed_render_unit.spv
Binary file not shown.
Binary file modified crates/renderling/src/linkage/tutorial-slabbed_vertices.spv
Binary file not shown.
Binary file not shown.

0 comments on commit c3fad46

Please sign in to comment.