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

Darwin ARM64: Unsupported architecture

Open henryruhs opened this issue 1 year ago • 14 comments

Error: AssertionError [ERR_ASSERTION]: Unsupported architecture (only x64 is supported)

using latest MacOS on GitHub Action:

Current runner version: '2.316.0'
Operating System
  macOS
  14.4.1
  23E224
Runner Image
  Image: macos-14-arm64
  Version: 20240422.3

worked before the update of their images:

Current runner version: '2.315.0'
Operating System
  macOS
  12.7.4
  21H1123
Runner Image
  Image: macos-12
  Version: 20240412.2

henryruhs avatar Apr 27 '24 19:04 henryruhs

I suggest a daily cron for your repo to check for future image updates.

temporary fix: use macos-12 or macos-13 ... using ffmpeg: 6.1.1 does not resolve the issue

henryruhs avatar Apr 27 '24 19:04 henryruhs

ARM is not supported on macos

https://evermeet.cx/ffmpeg/#remarks

federicocarboni avatar Apr 27 '24 21:04 federicocarboni

Just to clarify what is going on, this action just downloads builds from evermeet.cx and since it doesn't support ARM we can't either.

This is not fixable without finding some source that provides ARM builds.

federicocarboni avatar Apr 27 '24 21:04 federicocarboni

Homebrew is not an option?

brew install ffmpeg

henryruhs avatar Apr 29 '24 20:04 henryruhs

Just dropping these links here, which are related to the change in default arch for mac-os runner:

  • https://github.com/actions/runner-images/issues/9741
  • https://github.com/actions/runner-images#available-images

chapmanjacobd avatar Apr 30 '24 00:04 chapmanjacobd

@federicocarboni is this helpful http://www.osxexperts.net/ ? Seems to have ffmpeg builds on ARM

raivisdejus avatar May 19 '24 08:05 raivisdejus

I am also encountering a similar issue: macos-latest is now using M1.

sun1638650145 avatar Jun 04 '24 03:06 sun1638650145

Workaround

steps:
  - name: ${{ runner.os }} on ${{ runner.arch }}
    run: echo "${{ runner.os }} on ${{ runner.arch }}"
  - uses: actions/checkout@v4
  - if: runner.os != 'macOS' || runner.arch != 'ARM64'
    uses: FedericoCarboni/setup-ffmpeg@v3
  - if: runner.os == 'macOS' && runner.arch == 'ARM64'
    run: brew install ffmpeg
  - run: ffmpeg -i input.avi output.mkv

Or...

steps:
  - uses: actions/checkout@v4
  - if: runner.os == 'Linux'
    run: |
      sudo apt-get update -q -q
      sudo apt-get install --yes ffmpeg
  - if: runner.os == 'macOS'
    run: brew install ffmpeg
  - if: runner.os == 'Windows'
    run: choco install ffmpeg
  - run: ffmpeg -i input.avi output.mkv

Or...

  - uses: AnimMouse/setup-ffmpeg@v1
  • https://github.com/AnimMouse/setup-ffmpeg

cclauss avatar Nov 16 '24 03:11 cclauss

Moving over to AnimMouse/setup-ffmpeg@v1 resolved the issue.

henryruhs avatar Nov 17 '24 08:11 henryruhs

@cclauss I think you meant runner.os != 'macOS' || runner.arch != 'ARM64', right?

mifi avatar Dec 01 '24 14:12 mifi

Actually I did not. GHA macOS on Intel is history. https://github.com/actions/runner-images/issues/10721

cclauss avatar Dec 01 '24 15:12 cclauss

yes, but will runner.os ever be ARM64?

mifi avatar Dec 01 '24 16:12 mifi

Variable Description
RUNNER_ARCH The architecture of the runner executing the job. Possible values are X86, X64, ARM, or ARM64.

https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables

Runner context:

Property name Type Description
runner.arch string The architecture of the runner executing the job. Possible values are X86, X64, ARM, or ARM64.

https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#runner-context

cclauss avatar Dec 01 '24 17:12 cclauss

Oh... Now I see. Changing above. Thanks.

-  - if: runner.os != 'macOS' || runner.os != 'ARM64'
+  - if: runner.os != 'macOS' || runner.arch != 'ARM64'

-  - if: runner.os == 'macOS' && runner.os == 'ARM64'
+  - if: runner.os == 'macOS' && runner.arch == 'ARM64'

cclauss avatar Dec 01 '24 17:12 cclauss