-
Notifications
You must be signed in to change notification settings - Fork 60
ci: replace spirv-tools prebuilds with vulkan sdk from lunarg #279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet!
# Install the spirv-tools binaries from tarballs hosted on each release | ||
# of spirv-tools. This downloads the tarball, decompresses it, unpacks | ||
# the binaries to the specified path, and adds them to PATH | ||
- name: Install spirv-tools binaries | ||
shell: bash | ||
run: cargo run --manifest-path .github/install-spirv-tools/Cargo.toml -- ${{matrix.host || matrix.target}} 0.10.0 "${{github.workspace}}/bin" | ||
- name: Install Vulkan SDK | ||
uses: humbletim/install-vulkan-sdk@v1.2 | ||
with: | ||
version: 1.4.309.0 | ||
cache: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hah, this seems to be the same thing SPIR-T uses, I found a bit awkward sometimes due to the build times, but I suppose if you couldn't get caching to work... hmm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly, this page shows caches: https://github.com/Rust-GPU/rust-gpu/actions/caches
But it doesn't reduce CI time, the install action is run regardless
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cache (optional; default=false): boolean indicating whether to cache the downloaded installer file between builds.
It helps to read... it reinstalls the vulkan sdk every time, which is why it's "slow". And looking at their action file, it's using:
- windows (8s): 7z which is multithreaded by default
- linux (25s): single-threaded tar with zstd
- mac (39s): just calls the installer
# the binaries to the specified path, and adds them to PATH | ||
- name: Install spirv-tools binaries | ||
shell: bash | ||
run: cargo run --manifest-path .github/install-spirv-tools/Cargo.toml -- ${{matrix.host || matrix.target}} 0.10.0 "${{github.workspace}}/bin" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know if "${{github.workspace}}/bin"
is enough to induce caching?
Looking at the docs, it seems like explicitly using actions/cache
may have been needed to get any caching?
(and we don't seem to use actions/cache
anywhere atm)
It might be worth trying to cache $RUSTUP_HOME
(~/.rustup
unless it's explicitly set ig?) and even target/{debug,release}/incremental
but that could become sketchy territory (ideally only main
branch CI runs could save such caches, and then PR CI runs would use the latest one? unsure if that's doable tho).
While caching is enabled, it seems like github runners don't care, so we got to redownload the sdk every time.
This even speeds up CI: