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

[Bug] Add support of `arm64` architecture on macOS

Open Dragon1573 opened this issue 2 months ago • 1 comments

Description

According to Available images - actions/runner-images, macos-latest is currently tagged on macOS 14 (Sonama) (arm64) runner image.

However, according to Action inputs - pdm-project/setup-pdm, users can only specify x86 or x64 architecture of Python distritubions.

So when configuring x64 as input on macos-latest, the action will download and install an amd64 Python build on arm64 instance, causing furtuer errors in the workflow.

jobs:
  build:
    strategy:
      matrix:
        os: [ubuntu, macos, windows]
      fail-fast: false

    runs-on: ${{ matrix.os }}-latest
    steps:
      - name: 配置 PDM 构建环境
        uses: pdm-project/setup-pdm@v4
        with:
          python-version: 3.11
          # The following line will cause errors when ${{ matrix.os }} == "macos",
          # because that's an arm64 image.
          architecture: x64
          cache: true

Solution advice

Edit README.md and guide others to refer actions/setup-python on this input, the input will be passed directly to actions/setup-python for configuring Python distributions.

Dragon1573 avatar Apr 25 '24 04:04 Dragon1573

Bumping setup-python to version v5 fixed this issue in projects where I use setup-python directly

jvllmr avatar Apr 25 '24 19:04 jvllmr