Fix: Enable Git LFS to download large Libbox.xcframework binary files (60MB)
This commit is contained in:
@@ -23,6 +23,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
lfs: true
|
||||||
|
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
@@ -72,6 +73,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
lfs: true
|
||||||
|
|
||||||
- name: Setup Xcode
|
- name: Setup Xcode
|
||||||
uses: maxim-lobanov/setup-xcode@v1
|
uses: maxim-lobanov/setup-xcode@v1
|
||||||
@@ -87,7 +89,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd iOS-SwiftUI-Code
|
cd iOS-SwiftUI-Code
|
||||||
xcodebuild -resolvePackageDependencies -project uuvpn.xcodeproj -scheme SFI
|
xcodebuild -resolvePackageDependencies -project uuvpn.xcodeproj -scheme SFI
|
||||||
|
|
||||||
- name: Verify Libbox framework exists
|
- name: Verify Libbox framework exists
|
||||||
run: |
|
run: |
|
||||||
cd iOS-SwiftUI-Code
|
cd iOS-SwiftUI-Code
|
||||||
@@ -108,12 +110,12 @@ jobs:
|
|||||||
echo "❌ Libbox.xcframework NOT found!"
|
echo "❌ Libbox.xcframework NOT found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: List available schemes
|
- name: List available schemes
|
||||||
run: |
|
run: |
|
||||||
cd iOS-SwiftUI-Code
|
cd iOS-SwiftUI-Code
|
||||||
xcodebuild -list -project uuvpn.xcodeproj
|
xcodebuild -list -project uuvpn.xcodeproj
|
||||||
|
|
||||||
- name: Build iOS Debug App (attempt 1 - with verbose output)
|
- name: Build iOS Debug App (attempt 1 - with verbose output)
|
||||||
id: build_attempt_1
|
id: build_attempt_1
|
||||||
run: |
|
run: |
|
||||||
@@ -127,7 +129,7 @@ jobs:
|
|||||||
CODE_SIGN_IDENTITY="" \
|
CODE_SIGN_IDENTITY="" \
|
||||||
CODE_SIGNING_REQUIRED=NO \
|
CODE_SIGNING_REQUIRED=NO \
|
||||||
2>&1 | tee build_output.log
|
2>&1 | tee build_output.log
|
||||||
|
|
||||||
# 检查构建结果
|
# 检查构建结果
|
||||||
if grep -q "BUILD SUCCEEDED" build_output.log; then
|
if grep -q "BUILD SUCCEEDED" build_output.log; then
|
||||||
echo "✅ BUILD SUCCEEDED"
|
echo "✅ BUILD SUCCEEDED"
|
||||||
@@ -139,11 +141,11 @@ jobs:
|
|||||||
echo "build_status=failed" >> $GITHUB_OUTPUT
|
echo "build_status=failed" >> $GITHUB_OUTPUT
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 显示构建产物目录
|
# 显示构建产物目录
|
||||||
echo "Checking DerivedData directory for .app files..."
|
echo "Checking DerivedData directory for .app files..."
|
||||||
find ~/Library/Developer/Xcode/DerivedData -name "*.app" -type d || echo "No .app found in DerivedData"
|
find ~/Library/Developer/Xcode/DerivedData -name "*.app" -type d || echo "No .app found in DerivedData"
|
||||||
|
|
||||||
- name: Check if build succeeded
|
- name: Check if build succeeded
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
@@ -155,31 +157,31 @@ jobs:
|
|||||||
- name: Find and upload iOS Debug App
|
- name: Find and upload iOS Debug App
|
||||||
run: |
|
run: |
|
||||||
cd iOS-SwiftUI-Code
|
cd iOS-SwiftUI-Code
|
||||||
|
|
||||||
# 显示 DerivedData 目录结构
|
# 显示 DerivedData 目录结构
|
||||||
echo "Searching for .app files in DerivedData..."
|
echo "Searching for .app files in DerivedData..."
|
||||||
find ~/Library/Developer/Xcode/DerivedData -name "*.app" -type d
|
find ~/Library/Developer/Xcode/DerivedData -name "*.app" -type d
|
||||||
|
|
||||||
# 显示 Build 目录结构
|
# 显示 Build 目录结构
|
||||||
echo "Searching for .app files in Build directory..."
|
echo "Searching for .app files in Build directory..."
|
||||||
find ./build -name "*.app" -type d || echo "No build directory found"
|
find ./build -name "*.app" -type d || echo "No build directory found"
|
||||||
|
|
||||||
# 尝试多个可能的路径
|
# 尝试多个可能的路径
|
||||||
APP_PATH=""
|
APP_PATH=""
|
||||||
|
|
||||||
# 方法1: 从 DerivedData 查找
|
# 方法1: 从 DerivedData 查找
|
||||||
APP_PATH=$(find ~/Library/Developer/Xcode/DerivedData -name "SFI.app" -type d | head -n 1)
|
APP_PATH=$(find ~/Library/Developer/Xcode/DerivedData -name "SFI.app" -type d | head -n 1)
|
||||||
|
|
||||||
# 方法2: 如果没找到,查找任何 .app 文件
|
# 方法2: 如果没找到,查找任何 .app 文件
|
||||||
if [ -z "$APP_PATH" ]; then
|
if [ -z "$APP_PATH" ]; then
|
||||||
APP_PATH=$(find ~/Library/Developer/Xcode/DerivedData -name "*.app" -type d | head -n 1)
|
APP_PATH=$(find ~/Library/Developer/Xcode/DerivedData -name "*.app" -type d | head -n 1)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 方法3: 从 Build 目录查找
|
# 方法3: 从 Build 目录查找
|
||||||
if [ -z "$APP_PATH" ]; then
|
if [ -z "$APP_PATH" ]; then
|
||||||
APP_PATH=$(find ./build -name "*.app" -type d | head -n 1)
|
APP_PATH=$(find ./build -name "*.app" -type d | head -n 1)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 方法4: 使用 xcodebuild 显示构建产物路径
|
# 方法4: 使用 xcodebuild 显示构建产物路径
|
||||||
if [ -z "$APP_PATH" ]; then
|
if [ -z "$APP_PATH" ]; then
|
||||||
echo "Getting build settings to find target build dir..."
|
echo "Getting build settings to find target build dir..."
|
||||||
@@ -192,13 +194,13 @@ jobs:
|
|||||||
APP_PATH=$(find "$BUILD_DIR" -name "*.app" -type d | head -n 1)
|
APP_PATH=$(find "$BUILD_DIR" -name "*.app" -type d | head -n 1)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 方法5: 直接查找模拟器构建目录
|
# 方法5: 直接查找模拟器构建目录
|
||||||
if [ -z "$APP_PATH" ]; then
|
if [ -z "$APP_PATH" ]; then
|
||||||
echo "Searching in Debug-iphonesimulator directory..."
|
echo "Searching in Debug-iphonesimulator directory..."
|
||||||
APP_PATH=$(find ~/Library/Developer/Xcode/DerivedData -path "*Debug-iphonesimulator*.app" -type d | head -n 1)
|
APP_PATH=$(find ~/Library/Developer/Xcode/DerivedData -path "*Debug-iphonesimulator*.app" -type d | head -n 1)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 方法6: 列出所有 DerivedData 内容
|
# 方法6: 列出所有 DerivedData 内容
|
||||||
if [ -z "$APP_PATH" ]; then
|
if [ -z "$APP_PATH" ]; then
|
||||||
echo "Listing ALL contents in DerivedData..."
|
echo "Listing ALL contents in DerivedData..."
|
||||||
@@ -206,21 +208,21 @@ jobs:
|
|||||||
find ~/Library/Developer/Xcode/DerivedData -type d -name "Build" 2>/dev/null || true
|
find ~/Library/Developer/Xcode/DerivedData -type d -name "Build" 2>/dev/null || true
|
||||||
ls -R ~/Library/Developer/Xcode/DerivedData/ 2>/dev/null | head -100 || true
|
ls -R ~/Library/Developer/Xcode/DerivedData/ 2>/dev/null | head -100 || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$APP_PATH" ] && [ -d "$APP_PATH" ]; then
|
if [ -n "$APP_PATH" ] && [ -d "$APP_PATH" ]; then
|
||||||
echo "✅ Found app at: $APP_PATH"
|
echo "✅ Found app at: $APP_PATH"
|
||||||
echo "App size:"
|
echo "App size:"
|
||||||
du -sh "$APP_PATH"
|
du -sh "$APP_PATH"
|
||||||
|
|
||||||
# 复制到 build 目录
|
# 复制到 build 目录
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cp -R "$APP_PATH" build/
|
cp -R "$APP_PATH" build/
|
||||||
|
|
||||||
# 创建 zip 文件
|
# 创建 zip 文件
|
||||||
cd build
|
cd build
|
||||||
APP_NAME=$(basename "$APP_PATH")
|
APP_NAME=$(basename "$APP_PATH")
|
||||||
zip -r ios-debug-app.zip "$APP_NAME"
|
zip -r ios-debug-app.zip "$APP_NAME"
|
||||||
|
|
||||||
echo "✅ Created zip file: ios-debug-app.zip"
|
echo "✅ Created zip file: ios-debug-app.zip"
|
||||||
ls -lh ios-debug-app.zip
|
ls -lh ios-debug-app.zip
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user