flutter-action
flutter-action copied to clipboard
x64 install using flutter-action@v2 won't install a flutter version higher than 3.0.1
I'm trying to get this action to install [email protected] but it won't seem to install anything higher than 3.0.1 on a macos
VM running the self-hosted
actions runner.
Things I tried:
-
architecture
with and without quotes -
x64
andarm64
architectures -
flutter-version
withoutchannel
and vice-versa - Running against
subosito/flutter-action@v1
Nothing I tried got anything higher than 3.0.1 to install.
Here's a script I used to test on a macos
machine:
steps:
- name: Prove we only have a stock macos dart SDK
run: which dart
- name: Prove we don't have a flutter SDK yet
run: which flutter
continue-on-error: true
- uses: actions/setup-java@v1
with:
java-version: "12.x"
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.0.5"
channel: "stable"
architecture: x64
- name: Prove subosito/flutter-action@v2 persisted the new dart SDK to $PATH
run: which dart
- name: Prove subosito/flutter-action@v2 persisted the new flutter SDK to $PATH
run: which flutter
- name: Prove we have the wrong version of the flutter and dart SDKs
run: flutter doctor
Here is the output. (If you'd like the raw logs just let me know, I figured this is easier to look at.)
The action just checks if the cache-path
exists on self-hosted runners. If it does it just updates the environment.
A better use for self-hosted is to add the cache-path: ${{ runner.tool_cache }}/flutter/${{ env.FLUTTER_VERSION }}-${{ env.FLUTTER_CHANNEL }}
parameter. This way you can have multiple versions installed in parallel. Make sure to clean the _tools/flutter
folder beforehand.
@subosito Not sure, maybe the action can catch the different local version and then delete/re-install?
@kuhnroyal That did the trick. Seems a helpful thing to add to the README for people running on self-hosted runners. Happy to submit a PR if requested, just let me know. I'll leave it to an existing contributor to close the issue if desired. Thanks so much!
Closing for now, since we are now incorporating hash
in cache-key; please try using the v2
and let me know if the issue persists.