Skip to content

Commit 79cb0de

Browse files
committed
Use shader's Cargo.toml for rust-gpu version/toolchain
We can still override the version and toolchain with CLI args. This commit just changes the defaults. I feel like there could be a lot of edge cases for this implementation. So I consider it more of a first draft. Notable changes: * `Spirv` renamed to `SpirvCli`. * New `impl SpirvSource` that does all the shader crate querying. * CLI args change: `--spirv-builder` is now split into `--spirv-builder-source` and `--spirv-builder-version`. * `--shader-crate` now lives on the `install` subcommand, which because it is inherited by `build` (where it was originally), means it doesn't make much of a difference. * The full build test now has a teardown function making it idempotent. * Cache folder structure now has sub folders for `spirv-builder-cli`'s and `rust-gpu` repos. * `spirv-crate-template` is updated to Git with revision `82a0f69` because "0.9" doesn't seem to compile on Windows. Things to consider: * Can we remove `TARGET_SPECS` now, because we have a copy of the `rust-gpu` repo, we can get them from there instead? * What's the UX expectations for changing `spirv-std` versions or overriding `rust-gpu` versions and toolchain? I think in most cases `spirv-builder-cli` rebuilds should occur because the changes will cause cache directory changes. But I think it'd be good to at least manually test this. * Should the main build test be moved out into an integrations tests folder? * I'd still like to test each `spirv-builder-cli` feature, ie: `spirv-builder-pre-cli` and `spirv-builder-0_10`. We're currently only testing `spirv-builder-pre-cli`.
1 parent 87de5da commit 79cb0de

File tree

15 files changed

+905
-320
lines changed

15 files changed

+905
-320
lines changed

.github/workflows/push.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ env:
1313
jobs:
1414
install-and-build-shaders:
1515
strategy:
16+
fail-fast: false
1617
matrix:
17-
os: [ubuntu-latest, macos-latest, windows-latest]
18+
os:
19+
- ubuntu-latest
20+
- macos-latest
21+
- windows-latest
1822
runs-on: ${{ matrix.os }}
1923
defaults:
2024
run:
@@ -24,18 +28,15 @@ jobs:
2428
steps:
2529
- uses: actions/checkout@v2
2630
- uses: moonrepo/setup-rust@v1
27-
- run: rustup default stable
28-
- run: rustup update
31+
- name: Install Rust toolchain
32+
run: |
33+
rustup default stable
34+
rustup update
2935
- run: cargo test
30-
- run: cargo install --path crates/cargo-gpu
31-
- run: cargo gpu install
32-
- run: cargo gpu build --shader-crate crates/shader-crate-template --output-dir test-shaders
33-
- run: ls -lah test-shaders
34-
- run: cat test-shaders/manifest.json
3536

3637
clippy:
3738
runs-on: ubuntu-latest
3839
steps:
3940
- uses: actions/checkout@v2
4041
- uses: moonrepo/setup-rust@v1
41-
- run: cargo clippy
42+
- run: cargo clippy -- --deny warnings

0 commit comments

Comments
 (0)