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

Aleksey Shipilev shade at openjdk.java.net
Wed Nov 11 17:15:12 UTC 2020


> 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 incrementally with one additional commit since the last revision:

  Incomplete fix: remove special dirs

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1147/files
  - new: https://git.openjdk.java.net/jdk/pull/1147/files/c69b529e..eb6b10a3

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1147&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1147&range=01-02

  Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1147.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1147/head:pull/1147

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



More information about the build-dev mailing list