On Thu, 8 Feb 2024 07:40:50 GMT, Christoph Langer <[email protected]> wrote:
> > I don't like this approach. There must be better ways to achieve this, like
> > inputting the correct value as input to the action, or setting it as a
> > global gh variable. Where does even the `$JAVA_HOME_17_arm64` come from? Is
> > it provided by GH? I don't recall setting variables with that weird case
> > style in our GHA files.
>
> I think (as @gdams told me) these are paths to the Java installation in the
> Github Runners which happen to be there.
>
> I agree, to avoid the if statement, we could properly set it as input to
> get-jtreg.
>
> We probably could also use the setup-java action here - however, this will
> then lead to downloading another JDK, not sure if this is a performance
> concern.
@magicus I looked a bit more into the alternatives. So, regarding using the
correct value as input to the action, I actually don't see that it buys us
anything. We'd have switch statements further up when invoking the actions and
we'll likely have even more of them.
And as for setup-java, this also would only set up a `JAVA_HOME_{{
MAJOR_VERSION }}_{{ ARCHITECTURE }}` environment which we'd have to reference
then. So no gain.
Unless you have some great other idea, I don't see how we could resolve this
more elegantly.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17756#issuecomment-1933615018