New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8256657: Add cross-compiled build for Windows+Arm64 to submit workflow #1379
8256657: Add cross-compiled build for Windows+Arm64 to submit workflow #1379
Conversation
This adds the cross-compiled build only, as no Windows+Arm64 machines are available on GitHub Action that we could use to run the tests. Due to cross-compilation a build JDK is required. Initially I added EA builds to be downloaded from https://jdk.java.net/16/ and used for that, but then I saw how @shipiliv attempted it for the linux cross-compilation builds in openjdk#1147. That is using the JDK image produced by the x64 variant. This however add more stress to the "critical path", as now two more jobs depend on the x64 build first. Let's see how it works out in the long-run. A Windows+AArch64 build takes 40-50min.
👋 Welcome back burban! A progress list of the required criteria for merging this PR into |
Mailing list message from Thomas St��fe on build-dev: Hi Bernhard, just some drive-by comments. - 40-50 min builds seem to be excessive for just the hotspot build, do you - Is it worth the cycles to build both release *and* debug? How probable is - fixpath: Having the gh actions download a patch from your personal repos I feel at some point we need to have a talk about the growing number of I also am unsure about the associated cost for each developer (I know atm Cheers, Thomas On Mon, Nov 23, 2020 at 10:41 AM Bernhard Urban-Forster < |
I thought windows-aarch64 was not able to build without a patch? Have you fixed that? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to wait for #1350, and then reconcile this patch with that refactoring.
.github/workflows/submit.yml
Outdated
- build release | ||
- build debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other foreign arches build only debug
, thus optimizing the workflow time, drop release
here?
.github/workflows/submit.yml
Outdated
- name: Apply fixpath.exe Patch | ||
run: | | ||
curl 'https://gist.githubusercontent.com/lewurm/c099a4b5fcd8a182510cbdeebcb41f77/raw/d5badd6ee78911f79d5c3b695c61debfa54d8ced/0001-fixpath-workaround-for-win-aarch64.patch' > p.patch | ||
git apply p.patch | ||
working-directory: jdk | ||
shell: bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in the mainline repo instead. Yes, the absence of this patch blocks this PR, but getting that patch into the mainline first is the right thing to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. We should not have a build action that requires a patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That patch in its current form is not suitable for upstream.
The initial plan was to wait until the "new WINENV" patch lands [1], which would resolve the problem we face with fixpath.exe
. But maybe I can come up with a solution for the current situation, given that I've a better understanding of the build system by now.
[1] https://mail.openjdk.java.net/pipermail/build-dev/2020-July/027872.html
.github/workflows/submit.yml
Outdated
@@ -1856,6 +2018,7 @@ jobs: | |||
- linux_s390x_build | |||
- linux_x64_test | |||
- linux_x86_test | |||
- windows_aarch64_build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should move to other _build
needs, for clarity.
Thanks for all the comments.
It's for each of them. Installing a specific version of MSVC and creating the devkit take each ~10min. Thinking about it, there is a opportunity to cache the devkit and do the MSVC installer invocation only if no cached devkit is available. Here is an example run if you want to have a closer look:
Fair, I'll remove one of them (as suggested by Aleksey in another comment, I'll keep the debug one). |
Generating a devkit every time we build seems like a pretty big waste of time. The OpenJDK build is expected to work without devkits, using an installed Visual Studio. Is this not possible with the Windows aarch64 build? If not, then that really should be fixed. |
FWIW, here is a patch on top of my winenv rewrite that adds windows-aarch64 support on Github Actions: I've used it while developing the winenv rewrite, but pulled it out of the final integration so as to not mix in the question of enabling more build platforms on GHA in the discussion of the rewrite. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good now. It adds ~15 minutes of build time (and unfortunately ~10 minutes to download prereqs), which is quite acceptable.
@lewurm This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 2 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@shipilev, @magicus) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nits.
Also merge from master to get the clean workflow run everywhere? |
Thank you @shipilev for your comments, I've updated the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, updates look fine to me.
/integrate |
/sponsor |
@magicus @lewurm Since your change was applied there have been 6 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit d3dddb6. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This adds the cross-compiled build only, as no Windows+Arm64 machines are available on GitHub Action that we could use to run the tests.
Due to cross-compilation a build JDK is required. Initially I added EA builds to be downloaded from https://jdk.java.net/16/ and used for that, but then I saw how @shipiliv attempted it for the linux cross-compilation builds in #1147. That is using the JDK image produced by the x64 variant. This however add more stress to the "critical path", as now two more jobs depend on the x64 build first.
Let's see how it works out in the long-run. A Windows+AArch64 build takes 40-50min.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/1379/head:pull/1379
$ git checkout pull/1379