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

Derive architecture from underlying runner machine architecture #418

Closed
bbednarek opened this issue Dec 3, 2022 · 4 comments
Closed

Derive architecture from underlying runner machine architecture #418

bbednarek opened this issue Dec 3, 2022 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@bbednarek
Copy link

bbednarek commented Dec 3, 2022

Description:
The target architecture parameter has default value: x64. It would be nice to derive it from underlying runner machine architecture e.g. if the runners run on ARM64 then default value would be aarch64.

Justification:
The aim is to keep the github runner pipelines agnostic to the underlying architecture of the machine where it runs e.g. we are migrating from X64 to ARM64 machines and it would be great to keep generic pipeline with a following step

      - uses: actions/setup-java@v3
        with:
          distribution: 'adopt'
          java-version: '17'
          cache: 'gradle'

instead of specifying architecture parameter. Such a change would be backward compatible, because the default value x64 would stay if underlying machine is X64.

Alternative solution would be to accept RUNNER_ARCH environment variable as default, but even now supplying it without additional mapping is not possible, because possible values (X86, X64, ARM, or ARM64) are not compatible with architecture parameter.

Are you willing to submit a PR?
I am not familiar with Typescript, but I can try :)

@bbednarek bbednarek added feature request New feature or request to improve the current logic needs triage labels Dec 3, 2022
@dmitry-shibanov
Copy link
Contributor

Hello @bbednarek. Thank you for your feature request. Actually, we had a similar pull request to resolve the issue. Does the issue reproduce on the self-hosted agent ?

Could you please send the SHA for setup-java ? You can find it in Set up job step:
image

@dmitry-shibanov dmitry-shibanov self-assigned this Dec 5, 2022
@panticmilos panticmilos self-assigned this Dec 5, 2022
@bbednarek
Copy link
Author

@dmitry-shibanov thanks for the quick suggestion. I double check it and it turns out that I was using actions/setup-java@v2. Once I upgraded to actions/setup-java@v3 everything works.
It would be nice to update documentation though.

@dmitry-shibanov
Copy link
Contributor

Thank you for your response @bbednarek. I'll keep the issue opened until we make changes to the documentation.

@dmitry-shibanov dmitry-shibanov added documentation Improvements or additions to documentation and removed feature request New feature or request to improve the current logic labels Dec 5, 2022
@panticmilos
Copy link
Contributor

hi @bbednarek, I will close this issue since we adapted the documentation by your suggestion :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants