CI Overhaul - esp-hal
For context, please read the relevant issue:
Additional issues with the CI label:
Problems
- Some checks are performed multiple times when they only need to be run once.
- e.g. The current CI workflow runs when a PR is opened, when the PR is added to the merge queue, and then again when merged into the
main
branch.
- Checks are not performed consistently accross packages.
- MSRV checks are not run for all packages, only a select few
- (It's hard to provide MSRV guarantees when we don't check this :D)
- Documentation checks could be improved
- When #3026 is merged, perhaps this can be run on a nightly basis or something to ensure that everything is in good shape
nightly
toolchain checks often result in errors, but these are easy to ignore
- We still do not have any sort of HIL test for Wi-Fi/Bluetooth
- We may be fairly limited in our options here, but if we're at least able to confirm we can connect to an AP and send/receive a simple request that's probably better than nothing
- BQ: I'd love to see that. Ideally we would have a dedicated access-point for testing. For BLE it might be already good to just check we can initialize it and the controller reponds
- It's slow
Brainstorming
- It would be nice to run the documentation workflow automatically when a release is created
- The major blocking issue here is, how do we know which packages need documenting? Building everything may result in out-of-sync documentation in the situation that one or more packages have received updates since their last release, but they are not being published as part of the current release
- SM: I think this can be solved with tagging (even if it is a bit laborious)
- It might be worth investigating whether using our self-hosted runners is advantageous/desirable here
- SM: It's a shame we had to switch to RPI's for HIL, instead of the VPS set up we had at the start, if we were still doing that we could probably reuse (or expand) the runners there quite easily
- SM: At the very least the runners we use for compiler builds often sit idle, we can try and incorp those into our CI system (for linux self hosted runner, this should be easy. Not sure if we need any extra steps for the windows/mac runners)
- Look into automated semver checks (… again)
- SM: Definitely, I think with the beta.0 release out of the door we'll want to do this
- See if we can reduce the runtime of the workflow and overall reduce congestion when many PRs are being opened/updated
- This may be at least partially solved by simply running fewer checks, as mentioned above in the Problems sections
- It would be nice to try and minimize the amount of YAML in the workflow(s) and try to delegate to our
xtask
package as much as possible
- Can we automate anything else from the release process?
- Creation of the next migration-guides files
- Updating CHANGELOG headers
Planning
-
Explore using self hosted runners to speed up CI
-
Explore automating docs deployment with tagged releases
-
Reducing number of tasks run
-
Issue creation for nightly failures
-
Reduce YAML (covert to xtask), to aid running CI locally
-
Automate release document rollover (migration guide, changelog templates)
-
esp-wifi test