CircleCI-Public / flutter-orb

Easily install Flutter SDK and package dependencies. Also wasily run unit test and lint. Supports Linux and macOS
https://circleci.com/developer/orbs/orb/tadashi0713/flutter-orb
MIT License
2 stars 15 forks source link

Flutter orb install_sdk does not work on Apple silicon M1 macs #34

Closed birdthedeveloper closed 1 year ago

birdthedeveloper commented 1 year ago

Orb version: 2.0.2

What happened:

When installing flutter sdk using the flutter orb on M1 mac, flutter doctor throws the following error:

/Users/distiller/development/flutter/bin/internal/shared.sh: line 239: /Users/distiller/development/flutter/bin/cache/dart-sdk/bin/dart: Bad CPU type in executable

I assume this is caused by downloading the wrong CPU architecture SDK - amd64 instead of arm64.

Expected behavior:

Flutter orb downloads sdk without any problems on M1 macs and without any need to specify CPU architecture.

Additional Information:

Minimal example config.yaml to reproduce the error:

version: 2.1

orbs:
  flutter: circleci/flutter@2.0.2

jobs:
  example:
    resource_class: macos.m1.medium.gen1
    macos:
      xcode: 15.0.0
    steps:
      - flutter/install_sdk:
          version: 3.13.4

Workaround

Prepend the flutter version with arm64_ like this:

steps:
  - flutter/install_sdk:
      version: arm64_3.13.5
ryanbourdais commented 1 year ago

Hi @birdthedeveloper I just opened PR #35 that should fix this issue, as well as prevent it from happening in the future on arm ubuntu machines.

KevinJ1008 commented 10 months ago

Hi @ryanbourdais will you release 2.0.3 or further new version for this bug fix?