Skip to main content

tips-and-tricks

Faster Rust tests in CI with parallel steps

·7 mins
I’ve been procrastinating recently on the primary objectives, so I figured I’d share something useful for the broader Rust community in the meantime again. A while back I shared how to use YAML anchors to reuse parts of the workflow for faster CI times. This time I’ll show how to accelerate CI even more with another recent capability in GitHub Actions: parallel steps. While the feature today is really bare-bones, it is already beneficial.

Shorter GitHub Actions runs

·4 mins
This is just a short note about something that was not possible to do as cleanly before. If you worked with GitHub Actions for a meaningful period of time, and especially for testing Rust code, you will know that Windows runners are really slow. They are easily the bottleneck in many workflows and until recently there was no good way around it without turning the whole workflow into a mess. Thankfully, GitHub Actions recently introduced support for Yaml anchors in workflow files, which allows to reuse parts of the workflow instead of copy-pasting them.