Skip to content

Commit 8b9f2c2

Browse files
committed
ci: install FVM from the canonical release repository
The shared Flutter setup action used fvm.app's installer, which still hardcodes the legacy leoafarias/fvm repository. On arm64 that redirect returned HTTP 503 repeatedly and prevented integration jobs from reaching any build or test step. Download the pinned 4.1.2 archive directly from conceptadev/fvm, select x64 or arm64 from uname, retry transient release-asset failures, and validate the installed binary. This matches the direct installer already used by the App Store workflow. Refs #2669
1 parent b8f9ba3 commit 8b9f2c2

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

.github/actions/flutter-setup/action.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,28 @@ runs:
5151
- name: Install FVM
5252
shell: bash
5353
run: |
54-
curl -fsSL https://fvm.app/install.sh | bash -s -- 4.1.2
54+
case "$(uname -m)" in
55+
x86_64) fvm_arch=x64 ;;
56+
aarch64|arm64) fvm_arch=arm64 ;;
57+
*) echo "Unsupported FVM architecture: $(uname -m)" >&2; exit 1 ;;
58+
esac
59+
archive="$RUNNER_TEMP/fvm-4.1.2-linux-${fvm_arch}.tar.gz"
60+
curl --retry 5 --retry-all-errors -fL \
61+
"https://github.com/conceptadev/fvm/releases/download/4.1.2/fvm-4.1.2-linux-${fvm_arch}.tar.gz" \
62+
-o "$archive"
63+
mkdir -p "$HOME/fvm/bin"
64+
# Extract the whole tree, not just `fvm/fvm`: the two release archives
65+
# have different layouts. x64 ships a self-contained binary, arm64 a
66+
# launcher script that execs `src/dart` relative to its own directory —
67+
# unpacking the launcher alone yields `exec: .../src/dart: not found`
68+
# on every fvm invocation.
69+
tar -xzf "$archive" -C "$HOME/fvm/bin" --strip-components=1
70+
chmod +x "$HOME/fvm/bin/fvm"
71+
if [ -f "$HOME/fvm/bin/src/dart" ]; then
72+
chmod +x "$HOME/fvm/bin/src/dart"
73+
fi
74+
# Prove the launcher actually runs before anything depends on it.
75+
"$HOME/fvm/bin/fvm" --version
5576
echo "$HOME/fvm/bin" >> $GITHUB_PATH
5677
5778
- name: Check Flutter version

0 commit comments

Comments
 (0)