WIP: Add real iOS build steps with Docker-OSX and LFS check
Build Debug / Build Android Debug APK (push) Successful in 4m24s
Build UUVPN / Build Android APK (push) Successful in 3m8s
Build UUVPN / Build iOS IPA (push) Failing after 1s
Build UUVPN / Create GitHub Release (push) Has been skipped
Build UUVPN / Send Notification (push) Successful in 0s
Build Debug / Build iOS Debug App (push) Has been cancelled

This commit is contained in:
2026-07-04 20:37:32 +08:00
parent 7b500dde68
commit a911f25a28
+59 -34
View File
@@ -217,25 +217,24 @@ jobs:
if: ${{ github.event.inputs.build_ios != 'false' }} if: ${{ github.event.inputs.build_ios != 'false' }}
steps: steps:
- name: Check KVM support - name: Install dependencies
run: |
apt-get update && apt-get install -y qemu-utils wget
- name: Check virtualization support
run: | run: |
echo "Checking virtualization support..." echo "Checking virtualization support..."
ls -la /dev/kvm || echo "KVM not available" ls -la /dev/kvm || echo "KVM not available - will use QEMU emulation"
cat /proc/cpuinfo | grep -E "vmx|svm" || echo "No hardware virtualization support" cat /proc/cpuinfo | grep -E "vmx|svm" || echo "No hardware virtualization detected"
- name: Pull macOS Docker image - name: Download macOS base image
run: | run: |
docker pull sickcodes/docker-osx:latest || echo "Failed to pull macOS image" echo "Downloading macOS base image..."
mkdir -p /tmp/osx
- name: Run macOS container (test) # Use a pre-built macOS image with Xcode
run: | wget -q --show-progress "https://images.sick.codes/osx-kvm/mac_os_x_13_high_sierra.iso" -O /tmp/osx/macos.iso || \
# This is a test run - full build requires more setup echo "Download failed - will skip actual build"
docker run --rm \ ls -la /tmp/osx/ || true
--privileged \
-e RAM=8192 \
-e SMP=4 \
sickcodes/docker-osx:latest \
bash -c "echo 'macOS container started'; uname -a" || echo "Docker-OSX requires privileged mode and KVM support"
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -245,31 +244,57 @@ jobs:
- name: Setup Git LFS - name: Setup Git LFS
run: | run: |
if command -v apk &> /dev/null; then
apk add --no-cache git-lfs
else
apt-get update && apt-get install -y git-lfs apt-get update && apt-get install -y git-lfs
fi
git lfs install git lfs install
git config --global lfs.url "https://admin:${{ secrets.GITEA_TOKEN }}@git.viaeon.com/admin/UUVPN.git/info/lfs" git config --global lfs.url "https://admin:${{ secrets.GITEA_TOKEN }}@git.viaeon.com/admin/UUVPN.git/info/lfs"
git lfs pull || echo "LFS pull failed" git lfs pull || echo "LFS pull failed - checking if framework exists"
ls -la iOS-SwiftUI-Code/uuvpn/Libbox.xcframework/ || echo "LFS files not found" ls -la iOS-SwiftUI-Code/uuvpn/Libbox.xcframework/ || echo "Libbox.xcframework not found"
- name: Build iOS (placeholder) - name: Check if Libbox framework exists
id: check_lfs
run: | run: |
echo "iOS build in Docker-OSX requires:" if [ -f "iOS-SwiftUI-Code/uuvpn/Libbox.xcframework/ios-arm64/Libbox.framework/Libbox" ]; then
echo "1. KVM support on the host" echo "lfs_ready=true" >> $GITHUB_OUTPUT
echo "2. Docker privileged mode" echo "LFS files downloaded successfully"
echo "3. At least 8GB RAM" else
echo "4. macOS VM with Xcode installed" echo "lfs_ready=false" >> $GITHUB_OUTPUT
echo "LFS files not available - cannot build iOS"
fi
- name: Build iOS with Docker-OSX (if LFS ready)
if: ${{ steps.check_lfs.outputs.lfs_ready == 'true' }}
run: |
echo "Starting macOS container for iOS build..."
# Mount repository and build
docker run --rm \
--privileged \
-e RAM=8192 \
-e SMP=4 \
-v $PWD:/workspace \
sickcodes/docker-osx:sonoma \
bash -c "
echo 'Waiting for macOS to boot...'
sleep 60
echo 'Checking Xcode...'
xcodebuild -version || echo 'Xcode not installed'
echo 'Building iOS app...'
cd /workspace/iOS-SwiftUI-Code
xcodebuild -project uuvpn.xcodeproj -scheme SFI -sdk iphoneos -configuration Debug build
" || echo "Docker-OSX build failed or not available"
- name: iOS build status
run: |
echo "========================================"
echo "iOS Build Summary"
echo "========================================"
echo "LFS files ready: ${{ steps.check_lfs.outputs.lfs_ready }}"
echo "" echo ""
echo "Current environment:" if [ "${{ steps.check_lfs.outputs.lfs_ready }}" != "true" ]; then
docker info || true echo "Cannot build iOS without Libbox.xcframework"
echo "" echo "Please ensure Gitea LFS is properly configured"
echo "To enable iOS builds, either:" else
echo "- Add a macOS runner to your Gitea instance" echo "Build attempted - check logs above for details"
echo "- Use GitHub Actions hosted macOS runners" fi
echo "- Configure Docker-OSX with persistent storage"
# ==================== 发布到 GitHub Releases ==================== # ==================== 发布到 GitHub Releases ====================
release: release: