setup-pdm
setup-pdm copied to clipboard
[Bug] Add support of `arm64` architecture on macOS
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.
Bumping setup-python to version v5 fixed this issue in projects where I use setup-python directly