RFR: 8256127: Add cross-compiled foreign architectures builds to submit workflow [v5]

Magnus Ihse Bursie ihse at openjdk.java.net
Wed Nov 11 21:05:00 UTC 2020


On Wed, 11 Nov 2020 19:58:10 GMT, Aleksey Shipilev <shade at 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.
>
> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
> 
>  - Merge branch 'master' into JDK-8256127-foreign-build
>  - Merge branch 'master' into JDK-8256127-foreign-build
>  - Incomplete fix: remove special dirs
>  - Merge branch 'master' into JDK-8256127-foreign-build
>  - Remove special directories from chroot to make it archivable
>  - 8256127: Add cross-compiled foreign architectures builds to submit workflow

Aleksey,

I'm not at all sure I want to accept these changes. I understand that you care about these exotic platforms, and so do I, but adding them to the submit workflow for *all* changes seem like the wrong way to proceed.

My concern vary all the way from increased build time, to increased usage of the Github CPU quota (which, as I understand it, is fairly large but not unlimited), to the elephant in the room: the question on who the burden lays to fix bugs in these exotic platforms. It is not at all obvious that these builds should be tested before commit.

I think this change warrants a much wider and deeper discussion about the purpose of the Github commit hook actions, how the free Github CPU quota should be spent, and on whom the responsibility lays to either make sure no. commit is pushed that breaks an exotic platform, or to rectify the problem with a follow-up issue.

I recommend you withdraw this PR and instead initiate a wider discussion on a suitable mailing list, e.g. jdk-dev.

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

Changes requested by ihse (Reviewer).

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



More information about the build-dev mailing list