Skip to content

Support selecting the installed runtime architecture #26

Description

@atlowChemi

The actions/setup-node action supports an architecture input for selecting the target architecture of the installed Node.js runtime.

It would be super useful if pnpm/setup provided the same capability for runtimes installed through pnpm runtime set.

My use case is testing an x86_64-apple-darwin native addon on macOS. I would like to use a macos-latest runner while installing x64 Node.js and running it through Rosetta, rather than depending on GitHub's Intel macOS runners.

For example:

- uses: pnpm/setup@v2
  with:
    runtime: node@24
    architecture: x64

When omitted, architecture should continue to default to the runner's architecture.
The expected result on an ARM64 macOS runner would be an x64 Node.js runtime:

- run: test "$(node -p process.arch)" = "x64"

I realize pnpm runtime set may also need support for selecting a target architecture before the action can pass this through. If so, guidance on whether this request belongs in pnpm/pnpm instead would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions