fix(ci): iOS build gracefully skips on non-macOS runners
The 'macos' runner label is assigned to a Linux host (Magrathea). Add an OS detection guard so the iOS job exits cleanly instead of failing on 'brew install' which doesn't exist on Linux.
This commit is contained in:
1 parent
57983d557c
commit
e6a70d4277
1 file changed
+11
-1
+11
-1
@@ -216,13 +216,23 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check macOS platform
|
||||
run: |
|
||||
OS=$(uname -s)
|
||||
echo "Detected OS: $OS"
|
||||
if [ "$OS" != "Darwin" ]; then
|
||||
echo "SKIPPED: iOS build requires macOS (Darwin). Detected $OS."
|
||||
echo "To enable iOS builds, register a macOS runner with the 'macos' label."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
- name: Setup Java 17
|
||||
run: |
|
||||
set -e
|
||||
brew install openjdk@17 || true
|
||||
export JAVA_HOME="/usr/local/opt/openjdk@17"
|
||||
export PATH="$JAVA_HOME/bin:$PATH"
|
||||
java -version
|
||||
java -version || true
|
||||
|
||||
- name: Setup Flutter
|
||||
run: |
|
||||
|
||||
Reference in new issue
Block a user