GitHub的Actions如何选择arm64架构进行编译?谢谢大家.

name: mac-arm


on:
  workflow_dispatch:

permissions:
  contents: read

jobs:
  build:
    runs-on: ${{ matrix.os }}
    environment: build
    if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip mac]') && !contains(github.event.head_commit.message, '[skip arm]')"

    strategy:
      matrix:
        os: [macos-12]

    steps:
    - uses: actions/checkout@v3
    - name: Set up Python 3.9.12
      uses: actions/setup-python@v3
      with:
        python-version: "3.9.12"
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
    - name: Build
      run: |
        rm -rf build
        rm -rf dist
        rm -rf app.spec
        pyinstaller -F --clean ./app.py
    - name: Upload Artifact
      uses: actions/upload-artifact@v3
      with:
        name: MacOS_ARM64
        path: ./dist/app

以上是我配置的yml配置文件,编译后是x64的,请问如何用苹果的arm64架构编译?谢谢

阅读 1.4k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进