alexcrichton opened PR #6473 from alexcrichton:better-ci-time
to bytecodealliance:main
:
This commit goes through all proc-macros we have in this repository and ensures that they're all flagged with
test = false
anddoctest = false
. This comes about as I was curious why CI time was 40m which felt a little long and upon inspection the cross-compiled builders were taking upwards of 30 minutes just to build everything (not including running tests) where the non-cross-compiled builders took only about 10-15 minutes to build everything.Further investigation into this discrepancy showed that a lot of crates are being double-compiled in a cross-compiled situation. This is expected at a base level and something Cargo transparently handles, for example if a build script and the final binary need the same dependency then it's gotta get compiled twice. What was odd is that large portions of the Wasmtime crate graph were being compiled more than they should be.
I tracked this down to some
dev-dependencies
for procedural macros pointing at wasmtime crates. This makes sense for thetests/*.rs
-style tests which are always compiled for the target, but tests for the proc-macro itself would be compiled for the host. By disabling tests and doctests for the proc macro itself this removes the need for the host-compiled version of these dependencies.Overall this reduces a full compile of all tests from ~840 units of work to 700 units of work according to Cargo. The set of extra crates compiled in a cross-compiled workflow is not much smaller than in a non-cross-compiled workflow and they all generally "make sense" as core shared dependencies which are rooted in both Wasmtime and some proc-macro's dependency tree, for example.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested fitzgen for a review on PR #6473.
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #6473.
alexcrichton requested wasmtime-core-reviewers for a review on PR #6473.
pchickey submitted PR review.
pchickey merged PR #6473.
Last updated: Nov 22 2024 at 17:03 UTC