subosito / flutter-action

Flutter environment for use in GitHub Actions. It works on Linux, Windows, and macOS.
MIT License
2.16k stars 191 forks source link

feat: Add support for Linux arm64 #268

Closed ricoberger closed 4 months ago

ricoberger commented 4 months ago

Hi is it possible to support Linux arm64 for this GitHub Action. I'm currently trying our https://www.ubicloud.com/use-cases/github-actions, because they offer arm runners for GitHub Actions, but receive the following error:

Unable to determine Flutter version for channel: stable version: 3.16.9 architecture: arm64

When I setup Flutter manually, I can build the app on the ubicloud-standard-2-arm runners. The setup looks as follows:

- name: Setup Flutter
  run: |
    git clone -b stable https://github.com/flutter/flutter.git
    cd flutter
    git checkout 3.16.9
    ./bin/flutter --version
enescakir commented 4 months ago

Hi @ricoberger, I'm glad to see you're trying Ubicloud runners.

GitHub Actions doesn’t currently have an official Arm image available. As a result, Ubicloud builds its own Ubuntu image; and our Arm runners don’t have all pre-installed packages that are available on x64.

If your workflow has a package dependency that doesn’t exist on Ubicloud’s arm image, we recommend installing the dependency manually for the time being.

https://www.ubicloud.com/docs/github-actions-integration/migrate-to-arm-runners

ricoberger commented 4 months ago

Hi @enescakir thanks for the feedback. I think the problem isn't that some packages aren't available in the Ubicloud’s arm image. It looks like the Flutter releases manifest doesn't contain anything for arm64.

I'm able to use the GitHub Action when I use the master channel instead of the stable channel:

      - name: Setup Flutter
        uses: subosito/flutter-action@v2
        with:
          flutter-version: '3.16.9'
          channel: 'master'
          cache: true
          cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
          cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'

Example run: https://github.com/feeddeck/feeddeck/actions/runs/7855270301/job/21436815374?pr=132

ricoberger commented 4 months ago

I would close the issue, since the action can be used for Linux arm64 with the master channel.