On Tue, 10 Nov 2020 19:05:31 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:

> It is 
> [possible](https://github.com/openjdk/jdk/blob/master/doc/building.md#creating-and-using-sysroots-with-qemu-deboostrap)
>  to efficiently cross-compile to foreign architectures on current GH actions 
> that are driven by Ubuntu. I have been using this method for years to produce 
> binaries at [builds.shipilev.net](https://builds.shipilev.net). Those 
> cross-compilation targets frequently find arch-specific build bugs. 
> 
> This improvement adds several foreign architectures to GH actions workflow to 
> provide a safety net against build breakages on foreign architectures. We 
> cannot easily _test_ those foreign architectures (that is another can of 
> worms, not easily doable without exploding the pipeline time), but even 
> having the builds cover a significant part of follow-up bugs for JDK/VM work.
> 
> As workflow performance optimization, foreign architectures reuse the Linux 
> x86_64 release build as build JDK. Otherwise, they would need to compile it 
> again for every config, thus doubling the build times. This means that 
> foreign architectures builds are running in parallel with test jobs, which 
> might prolong the critical path length for the entire batch to complete. 
> These builds still complete before Windows and MacOS testing catches up. On 
> the upside, x86_64 act as "pilot builds" for foreign arches: if x86_64 fails, 
> then foreign arches would not be compiled at all.
> 
> The created sysroot is also cached and keyed on `submit.yml` hash. So it 
> would regenerate only if the workflow itself changes. The regeneration takes 
> about 10 minutes, and it produces about 580M uncompressed, and 270M 
> zstd-compressed bundle. In the end, this adds 4x270 = 1080M into local cache.

Awesome! Thanks a lot for doing this!

-------------

PR: https://git.openjdk.java.net/jdk/pull/1147

Reply via email to