RFR: 8256127: Add cross-compiled foreign architectures builds to submit workflow [v4]
Aleksey Shipilev
shade at openjdk.java.net
Wed Nov 11 19:09:09 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 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 five additional commits since the last revision:
- 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
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/1147/files
- new: https://git.openjdk.java.net/jdk/pull/1147/files/eb6b10a3..f0170df7
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1147&range=03
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1147&range=02-03
Stats: 2530 lines in 28 files changed: 617 ins; 1697 del; 216 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