Stream: git-wasmtime

Topic: wasmtime / PR #6473 Disable tests for all proc-macros


view this post on Zulip Wasmtime GitHub notifications bot (May 26 2023 at 19:25):

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 and doctest = 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 the tests/*.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:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (May 26 2023 at 19:25):

alexcrichton requested fitzgen for a review on PR #6473.

view this post on Zulip Wasmtime GitHub notifications bot (May 26 2023 at 19:25):

alexcrichton requested wasmtime-compiler-reviewers for a review on PR #6473.

view this post on Zulip Wasmtime GitHub notifications bot (May 26 2023 at 19:25):

alexcrichton requested wasmtime-core-reviewers for a review on PR #6473.

view this post on Zulip Wasmtime GitHub notifications bot (May 26 2023 at 20:14):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 26 2023 at 20:58):

pchickey merged PR #6473.


Last updated: Oct 23 2024 at 20:03 UTC