From d12cbe2dec54fcd01d6a386813796af3db126a5c Mon Sep 17 00:00:00 2001 From: jairov4 <1904410+jairov4@users.noreply.github.com> Date: Fri, 27 Jun 2025 01:20:03 +0000 Subject: [PATCH] Update native binaries Build other libs for iOS Build other libs for iOS Build other libs for iOS Fix typo in build for iOS Use recursive for iOS build Enable back other jobs Enable back other jobs Revert "Update native binaries" This reverts commit 1c4b14cced6ec2cfd185fdc9996feb6746afde59. --- .github/workflows/build.yml | 41 ++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 59c62ab..35ef20a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -81,23 +81,36 @@ jobs: steps: - uses: actions/checkout@v4 with: - submodules: true + submodules: recursive - name: Build (iOS) - run: xcodebuild -project External/SDL/Xcode/SDL/SDL.xcodeproj -target SDL3.xcframework -configuration Release - - - name: Prepare release directory (iOS) - run: mkdir -p native/ios - - - name: Prepare release (iOS) run: | - mkdir -p native/ios/SDL3.xcframework/ios-arm64/SDL3.framework; - mkdir -p native/ios/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework; - cp External/SDL/Xcode/SDL/build/SDL3.xcframework/Info.plist native/ios/SDL3.xcframework/Info.plist; - cp External/SDL/Xcode/SDL/build/SDL3.xcframework/ios-arm64/SDL3.framework/SDL3 native/ios/SDL3.xcframework/ios-arm64/SDL3.framework/SDL3; - cp External/SDL/Xcode/SDL/build/SDL3.xcframework/ios-arm64/SDL3.framework/Info.plist native/ios/SDL3.xcframework/ios-arm64/SDL3.framework/Info.plist; - cp External/SDL/Xcode/SDL/build/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/SDL3 native/ios/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/SDL3; - cp External/SDL/Xcode/SDL/build/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/Info.plist native/ios/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/Info.plist; + modules=("SDL3" "SDL3_image" "SDL3_ttf" "SDL3_mixer") + architectures=("ios-arm64" "ios-arm64_x86_64-simulator") + + for module in "${modules[@]}"; do + module0="${module/SDL3/SDL}" + directory="External/${module0}/Xcode" + if [ "$module" == "SDL3" ]; then + directory+="/SDL" + fi + + target="${module}.xcframework" + framework="${module}.framework" + output_dir="native/ios/${target}" + + xcodebuild -project "${directory}/${module0}.xcodeproj" -target "${target}" -configuration Release + build_dir="${directory}/build/${target}" + + ls -lRh "${directory}" + + for arch in "${architectures[@]}"; do + mkdir -p "${output_dir}/${arch}/${framework}" + cp "${build_dir}/${arch}/${framework}/${module}" "${output_dir}/${arch}/${framework}/${module}" + cp "${build_dir}/${arch}/${framework}/Info.plist" "${output_dir}/${arch}/${framework}/Info.plist" + done + cp "${build_dir}/Info.plist" "${output_dir}/Info.plist" + done - name: Compress native directory run: tar -cf native-ios.tar native/ios