Skip to content

Support CI tests for old rust-gpu versions#41

Merged
tombh merged 1 commit intoRust-GPU:mainfrom
tombh:support-ci-testing-old-rust-gpu-versions
Mar 9, 2025
Merged

Support CI tests for old rust-gpu versions#41
tombh merged 1 commit intoRust-GPU:mainfrom
tombh:support-ci-testing-old-rust-gpu-versions

Conversation

@tombh
Copy link
Collaborator

@tombh tombh commented Jan 27, 2025

Adds rust-gpu versions, 0.8.0 and 0.9.0 to the Linux matrix on CI tests. 0.7.0 has a probably minor dependency error, but it's also 18 months old and there probably aren't many users of it.

Notes:

  • Adds a version arg to: just build-shader-template 0.8.0.
  • Offers a new CLI arg to workaround a bug where conflicting v3/v4 versions of Cargo.lock files (between the shader and workspace) cause a build error. See force_overwrite_lockfiles_v4_to_v3 arg
  • "rust-gpu-version: latest" actually means the pinned version of spirv-std in the shader-crate-template.

TODO:

  • Use our cache directory to store the list of Cargo.lock files that need to be reverted. This will allow reverting them even if the build fails.
  • It'd be good to have a CI test for the infamous v3/v4 Cargo.lock manifest version conflict. It would require having a sample shader crate with a Rust toolchain is < 1.83.0.

@tombh tombh force-pushed the support-ci-testing-old-rust-gpu-versions branch from 36394d5 to 0e50a9b Compare January 27, 2025 20:28
@tombh
Copy link
Collaborator Author

tombh commented Jan 27, 2025

BTW I streamed a lot of the development of this PR on Twitch 🤓 https://www.twitch.tv/videos/2365066223

@tombh tombh force-pushed the support-ci-testing-old-rust-gpu-versions branch 2 times, most recently from 23ab263 to a27320a Compare January 28, 2025 16:26
@tombh tombh force-pushed the support-ci-testing-old-rust-gpu-versions branch 2 times, most recently from 22389d6 to ad2397d Compare February 8, 2025 11:46
@tombh
Copy link
Collaborator Author

tombh commented Feb 8, 2025

This is ready for review. There's still a couple of TODOs, but they're not high priority.

@schell
Copy link
Collaborator

schell commented Feb 19, 2025

@tombh do you want me to clear up these conflicts, since I ultimately caused them?

@tombh
Copy link
Collaborator Author

tombh commented Feb 19, 2025

Aww, thanks for the offer! Very kind of you 😊

I was actually more interested in a review at the moment. Then I could make any changes and resolve the conflicts at once.

Copy link
Collaborator

@schell schell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me so far @tombh ! I just had some small nits to pick. 👍

@tombh tombh force-pushed the support-ci-testing-old-rust-gpu-versions branch 4 times, most recently from 88ddf23 to a14356d Compare March 1, 2025 17:23
@tombh tombh requested a review from schell March 1, 2025 17:38
@tombh
Copy link
Collaborator Author

tombh commented Mar 1, 2025

Done, and requested another review. Do you get the review request independently?

@tombh tombh force-pushed the support-ci-testing-old-rust-gpu-versions branch 2 times, most recently from e230414 to edb706a Compare March 1, 2025 18:05
@schell
Copy link
Collaborator

schell commented Mar 3, 2025

Do you get the review request independently?

I do! I get them in my notifications, which I have to actively check because GitHub tends to be pretty spammy with email.

Adds `rust-gpu` versions, `0.8.0` and `0.9.0` to the Linux matrix
on CI tests. `0.7.0` has a probably minor dependency error, but
it's also 18 months old and there probably aren't many users of it.

Notes:
* Adds a version arg to, eg: `cargo xtask --rust-gpu-version 0.8.0`.
* Offers a new CLI arg to workaround a bug where conflicting v3/v4
  versions of `Cargo.lock` files (between the shader and workspace)
  cause a build error. See `force_overwrite_lockfiles_v4_to_v3` arg.
@tombh tombh force-pushed the support-ci-testing-old-rust-gpu-versions branch from edb706a to 9de5c78 Compare March 9, 2025 14:56
Copy link
Collaborator

@schell schell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me. I'm going to check it out locally and see if it builds my project. Tentative approval already given.

Great work!

@schell
Copy link
Collaborator

schell commented Mar 9, 2025

Your branch builds my project just fine! Sweet as!

Feel free to merge when you're ready.

@tombh tombh merged commit 6408188 into Rust-GPU:main Mar 9, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants