Skip to content

Commit

Permalink
feature: added xtask, don't track wgsl as text, remove wgsl files (#148)
Browse files Browse the repository at this point in the history
* don't track wgsl as text, remove wgsl files

use linguist-generated=true in gitattributes

* added xtask, added renderling-build, updated deps, use GrayImage for depth reading, regenerate linkage

* fix cargo gpu show cache

* use xtask to compile shaders on CI

* regenerate shaders

* don't assert the shader dirs existence when creating paths

* update rust-gpu build values, don't err if shader dir is missing

* Trigger linguist re-evaluation

* bump workflow caches

* show cargo gpu commitsh

* bump ci cargo cache, again

* ensure cargo cache keys match
  • Loading branch information
schell authored Jan 8, 2025
1 parent 9208b9e commit c2c096e
Show file tree
Hide file tree
Showing 73 changed files with 2,504 additions and 2,000 deletions.
5 changes: 4 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[alias]
shaders = "gpu toml crates/renderling"
xtask = "run --package xtask --"

[build]
rustflags = ["--cfg=web_sys_unstable_apis"]
rustdocflags = ["--cfg=web_sys_unstable_apis"]

[env]
CARGO_WORKSPACE_DIR = { value = "", relative = true }
7 changes: 5 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* text=auto
*.txt text
*.rs text
*.md text
*.yaml text
*.spv binary
*.wgsl binary
**/*.wgsl linguist-generated=true binary
12 changes: 8 additions & 4 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ jobs:
- uses: actions/cache@v4
with:
path: ~/.cargo
key: cargo-cache-${{ runner.os }}
# THIS KEY MUST MATCH BELOW
key: cargo-cache-1-${{ runner.os }}
- uses: moonrepo/setup-rust@v1
- run: rustup default stable
- run: rustup update
- run: cargo install --git https://github.com/rust-gpu/cargo-gpu cargo-gpu
- run: cargo gpu show commitsh
- id: cachepathstep
run: |
CACHE_PATH=`cargo gpu show --cache-directory`
CACHE_PATH=`cargo gpu show cache-directory`
echo $CACHE_PATH
echo "cachepath-$RUNNER_OS=$CACHE_PATH" >> "$GITHUB_OUTPUT"
Expand All @@ -61,7 +63,8 @@ jobs:
- uses: actions/cache@v4
with:
path: ~/.cargo
key: cargo-cache-${{ runner.os }}
# THIS KEY MUST MATCH ABOVE
key: cargo-cache-1-${{ runner.os }}
- uses: actions/cache@v4
with:
path: |
Expand All @@ -70,8 +73,9 @@ jobs:
${{ needs.install-cargo-gpu.outputs.cachepath-Windows }}
key: rust-gpu-cache-0-${{ runner.os }}
- uses: moonrepo/setup-rust@v1
- run: cargo gpu show commitsh
- run: rm -rf crates/renderling/src/linkage/* crates/renderling/shaders
- run: cargo shaders
- run: cargo xtask compile-shaders
- run: cargo build -p renderling
- run: git diff --exit-code --no-ext-diff

Expand Down
Loading

0 comments on commit c2c096e

Please sign in to comment.