Skip to content
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

fix: CI - Set correct Java version #1956

Merged
merged 2 commits into from
Jan 13, 2025
Merged

fix: CI - Set correct Java version #1956

merged 2 commits into from
Jan 13, 2025

Conversation

bitsandfoxes
Copy link
Contributor

The default Java version is different on different runner images. An update to -latest causes Unity 2019 builds to fail.

With this, we explicitly set the correct Java version depending on the targeted Unity version, making this more resilient to future changes.
I've also added timeouts to the smoketests themselves. They tend to either fail fast or run indefinitely. This gets rid of the latter.

#skip-changelog

Write-Host "Using Java 8 for Unity 2019"
}
"2022" {
$javaHome = "$env:JAVA_HOME_11_X64"
Copy link
Member

Choose a reason for hiding this comment

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

Do these need to be installed by us before hand or they are part of the build agent's image?
If something is missing (one of these paths is empty/undefined) how does the error manifest? Do we have some sane way to immediately stop saying "Didn't find X, we need that to work"

Copy link
Contributor Author

@bitsandfoxes bitsandfoxes Jan 13, 2025

Choose a reason for hiding this comment

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

They are part of the runner image until they aren't anymore 😢 Especially Java 8 for Unity 2019.
Good call. I've added some path validation with proper logs to it too.

.github/workflows/ci.yml Show resolved Hide resolved
@bitsandfoxes bitsandfoxes merged commit 4bc67a8 into main Jan 13, 2025
34 of 35 checks passed
@bitsandfoxes bitsandfoxes deleted the fix/ci-java branch January 13, 2025 12:27
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