Closed dagood closed 3 years ago
Even outside a CI context, I like this idea. The "source" tarball for most projects is just a git archive
or some such. No compiling is involved. This makes it painless to do source archives and also makes them reproducible. I would like to see .NET Core in such as place as well, where we could create a source tarball without building anything. It will cut down my packaging time for Linux distributions too.
I did some quick measurements. Taking the current 3.1.101 tarball, and removing all prebuilts from it, the tarball goes from 2.4 GB to 200 MB in size. xz
compression (.tar.xz
) brings it to the order of 100MB.
So we now have no "full" prebuilts, but @dseefeld noted a few obstacles I'm putting here to track:
I don't think there's a reason we can't track reference-only decompiled prebuilts the same was I proposed we could track prebuilts above. Related: https://github.com/dotnet/source-build/issues/866
For source generation I'm not familiar with the problem.
This has now been implemented as part of ArPow.
In our CI, we run a production build (this builds all repos), create the tarball based on the results, then build that tarball. This is the main reason our CI takes so long: we have to build every repo twice, in sequence.
We think we can create a tarball using only checked-in information. The source in the tarball is "clean", and we can download the prebuilts we need using the prebuilt baseline. With a little processing (decompiling ref-only packages, downloading/inflating the currently prebuilt BuildTools toolset), we can in theory produce a tarball fairly quickly. This "buildless" tarball has the potential to cut CI time in half.
Potential problem Q&A:
runtime.json
in the Platforms package).Basically, our current legs:
become:
This is particularly interesting once we start testing toolset bootstrapping. That calls for this general flow: "production => tarball build => bootstrapped tarball build". Having three builds in sequence to validate CI seems untenable. If we can just have "tarball build => bootstrapped tarball build" based on a buildless tarball, at least our CI time would stay around the same as now.
/cc @dseefeld @crummel @dleeapho