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