Skip to content

Install Java on Windows CI#3

Closed
marcprux wants to merge 9 commits into
mainfrom
windows-testing
Closed

Install Java on Windows CI#3
marcprux wants to merge 9 commits into
mainfrom
windows-testing

Conversation

@marcprux
Copy link
Copy Markdown

@marcprux marcprux commented Mar 12, 2026

Install Java on the Windows CI in order to launch and run JVM tests.

Comment thread .github/workflows/pull_request.yml Outdated
enable_windows_checks: true
windows_swift_versions: '["nightly-main"]'
windows_pre_build_command: |
winget install Microsoft.OpenJDK.21
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is failing silently:

winget : The term 'winget' is not recognized as the name of a cmdlet, 
function, script file, or operable program. Check the spelling of the name, or 
if a path was included, verify that the path is correct and try again.
At C:\test-script\run.ps1:20 char:1
+ winget install Microsoft.OpenJDK.21

@compnerd, do you happen to know the best way to install something on the Windows image run by the github-workflows? I can't find any examples of any other Swift packages doing this.

Copy link
Copy Markdown

@compnerd compnerd Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My preference is manually. Download the MSI and install that via msiexec. A good example is the Swift installation itself. (https://github.com/compnerd/gha-setup-swift)

@marcprux marcprux closed this Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants