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
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:
+60
-35
@@ -217,25 +217,24 @@ jobs:
|
||||
if: ${{ github.event.inputs.build_ios != 'false' }}
|
||||
|
||||
steps:
|
||||
- name: Check KVM support
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get update && apt-get install -y qemu-utils wget
|
||||
|
||||
- name: Check virtualization support
|
||||
run: |
|
||||
echo "Checking virtualization support..."
|
||||
ls -la /dev/kvm || echo "KVM not available"
|
||||
cat /proc/cpuinfo | grep -E "vmx|svm" || echo "No hardware virtualization support"
|
||||
ls -la /dev/kvm || echo "KVM not available - will use QEMU emulation"
|
||||
cat /proc/cpuinfo | grep -E "vmx|svm" || echo "No hardware virtualization detected"
|
||||
|
||||
- name: Pull macOS Docker image
|
||||
- name: Download macOS base image
|
||||
run: |
|
||||
docker pull sickcodes/docker-osx:latest || echo "Failed to pull macOS image"
|
||||
|
||||
- name: Run macOS container (test)
|
||||
run: |
|
||||
# This is a test run - full build requires more setup
|
||||
docker run --rm \
|
||||
--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"
|
||||
echo "Downloading macOS base image..."
|
||||
mkdir -p /tmp/osx
|
||||
# Use a pre-built macOS image with Xcode
|
||||
wget -q --show-progress "https://images.sick.codes/osx-kvm/mac_os_x_13_high_sierra.iso" -O /tmp/osx/macos.iso || \
|
||||
echo "Download failed - will skip actual build"
|
||||
ls -la /tmp/osx/ || true
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -245,31 +244,57 @@ jobs:
|
||||
|
||||
- name: Setup Git LFS
|
||||
run: |
|
||||
if command -v apk &> /dev/null; then
|
||||
apk add --no-cache git-lfs
|
||||
else
|
||||
apt-get update && apt-get install -y git-lfs
|
||||
fi
|
||||
apt-get update && apt-get install -y git-lfs
|
||||
git lfs install
|
||||
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"
|
||||
ls -la iOS-SwiftUI-Code/uuvpn/Libbox.xcframework/ || echo "LFS files not found"
|
||||
git lfs pull || echo "LFS pull failed - checking if framework exists"
|
||||
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: |
|
||||
echo "iOS build in Docker-OSX requires:"
|
||||
echo "1. KVM support on the host"
|
||||
echo "2. Docker privileged mode"
|
||||
echo "3. At least 8GB RAM"
|
||||
echo "4. macOS VM with Xcode installed"
|
||||
if [ -f "iOS-SwiftUI-Code/uuvpn/Libbox.xcframework/ios-arm64/Libbox.framework/Libbox" ]; then
|
||||
echo "lfs_ready=true" >> $GITHUB_OUTPUT
|
||||
echo "LFS files downloaded successfully"
|
||||
else
|
||||
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 "Current environment:"
|
||||
docker info || true
|
||||
echo ""
|
||||
echo "To enable iOS builds, either:"
|
||||
echo "- Add a macOS runner to your Gitea instance"
|
||||
echo "- Use GitHub Actions hosted macOS runners"
|
||||
echo "- Configure Docker-OSX with persistent storage"
|
||||
if [ "${{ steps.check_lfs.outputs.lfs_ready }}" != "true" ]; then
|
||||
echo "Cannot build iOS without Libbox.xcframework"
|
||||
echo "Please ensure Gitea LFS is properly configured"
|
||||
else
|
||||
echo "Build attempted - check logs above for details"
|
||||
fi
|
||||
|
||||
# ==================== 发布到 GitHub Releases ====================
|
||||
release:
|
||||
|
||||
Reference in New Issue
Block a user