setup-node icon indicating copy to clipboard operation
setup-node copied to clipboard

adding support for linux ppc64le

Open adilhusain-s opened this issue 2 years ago • 9 comments

Description: *Adding change to support ppc64le architecture

  • since actions/node-versions doesn't have binaries for ppc64le architecture, falling back to official node binaries.

Please review and merge.

Related issue: Add link to the related issue.

Check list:

  • [ ] Mark if documentation changes are required.
  • [ ] Mark if tests were added or updated to cover the changes.

adilhusain-s avatar Oct 03 '23 07:10 adilhusain-s

testing performed

  • created a sample workflow and ran it on ppc64le architecture
  • workflow

root@adilhusain-centos-test-1:~/actions-runner# uname -a
Linux adilhusain-centos-test-1.power-iaas.cloud.ibm.com 4.18.0-408.el8.ppc64le #1 SMP Mon Jul 18 16:06:55 UTC 2022 ppc64le ppc64le ppc64le GNU/Linux
root@adilhusain-centos-test-1:~/actions-runner# node
Welcome to Node.js v20.6.1.
Type ".help" for more information.

os.arch()
'ppc64'
os.endianness()
'LE'

adilhusain-s avatar Oct 03 '23 07:10 adilhusain-s

Hello @adilhusain-s. Thank you for your pull request. Could you please take a look at this comment about our concerns for these changes?

dmitry-shibanov avatar Oct 10 '23 14:10 dmitry-shibanov

@dmitry-shibanov Thanks for the comment, I did see those comment which you provided on old PR. I'm not sure if we should actually add support for iax-ppc64 for following reasons:

  • self-hosted github runner isn't supported on iax-pp64 or ported for this platform (as I know)
  • not sure iax-ppc64 is still widely in use. the official docker node or busybox image doesn't have support for iax-ppc6.

if someone can give me the value of os.arch and os.endianess on iax-ppc64, I'll be more than happy to update my PR with the changes to support iax-ppc64. currently, I don't have access to iax-ppc64 VM nor I'm able to emulate iax-ppc64 platform architecture using qemu. please let me know if you have any way to get the values of os.arch and os.endianess for iax-ppc64.

adilhusain-s avatar Oct 10 '23 14:10 adilhusain-s

@dmitry-shibanov

I've updated this PR to address the requested changes.

  • Added aix in supported OS.
    • returning ppc64le when os.arch () ppc64 and os.endianness () is le
  • returning ppc64 when os.arch () ppc64 and os.endianess() is be

please look at the following output:

bash-5.1# cat os.js     
const os = require('os');           
            
// Get the operating system name    
const osName = os.type();           
console.log(`Operating System: ${osName}`);     
console.log ("os platform: ", os.platform());   
// Get the processor architecture   
const processorArchitecture = os.arch();        
console.log(`Architecture: ${processorArchitecture}`);      
            
// Get the endianness (byte order)  
const endianness = os.endianness();             
console.log(`Endianness: ${endianness}`);       
bash-5.1# ./node os.js  
Operating System: AIX   
os platform:  aix       
Architecture: ppc64     
Endianness: BE          

root@adilhusain-centos-test-1:~# node os.js     
Operating System: Linux             
os platform:  linux     
Architecture: ppc64     
Endianness: LE          

adilhusain-s avatar Oct 17 '23 13:10 adilhusain-s

Hello @adilhusain-s. Sorry for misinformation. Initially setup-node does not support aix so your previous changes should be good. Could you please revert changes to the previous ones?

dmitry-shibanov avatar Oct 23 '23 11:10 dmitry-shibanov

@dmitry-shibanov revert the changes. please review and merge.

adilhusain-s avatar Oct 25 '23 10:10 adilhusain-s

Quick update:

There seems to be problem with failing tests. It should be resolved as soon as https://github.com/actions/setup-node/pull/882 is merged.

For now everything looks good.

nikolai-laevskii avatar Nov 10 '23 13:11 nikolai-laevskii

Quick update:

There seems to be problem with failing tests. It should be resolved as soon as https://github.com/actions/setup-node/pull/882 is merged.

For now everything looks good.

Looks like https://github.com/actions/setup-node/pull/882 is merged. Hoping that this PR can also be merged soon.

janani66 avatar Jan 10 '24 20:01 janani66

Hi @dmitry-shibanov @nikolai-laevskii

just rebased my PR. could you approve the waiting workflows?

adilhusain-s avatar Jan 11 '24 08:01 adilhusain-s