-
Notifications
You must be signed in to change notification settings - Fork 12
41 lines (36 loc) · 1.4 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build_and_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Cargo build and test
id: cargo_build_and_test
run: |
cargo fmt -- --check
cargo build --release --verbose
cargo test --verbose
cargo run --example gallery > spirq/examples/gallery/main.log
cargo run --example inspect > spirq/examples/inspect/main.log
cargo run --example walk > spirq/examples/walk/main.log
cargo install --path shader-reflect
shader-reflect assets/gallery.frag -o assets/gallery.frag.json --reference-all-resources
shader-reflect assets/gallery.frag.spv -o assets/gallery.frag.spv.json --reference-all-resources
diff assets/gallery.frag.json assets/gallery.frag.spv.json
shader-reflect assets/spirv-spec.frag -o assets/spirv-spec.frag.json
shader-reflect assets/spirv-spec.frag.spv -o assets/spirv-spec.frag.spv.json
diff assets/spirv-spec.frag.json assets/spirv-spec.frag.spv.json
shader-reflect assets/moon.spv -o assets/moon.spv.json --reference-all-resources
git diff --exit-code