From f6cf0b57d15a83a3973930f33d1afdd1df50f4bf Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Tue, 7 Mar 2023 08:01:00 +0300 Subject: [PATCH] Add iOS build action --- .github/workflows/build.yml | 38 ++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0388e3a..5b4ae93 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -101,7 +101,7 @@ jobs: - name: Prepare release (Linux) run: cp install_output/lib/libSDL2-2.0.so.0 SDL2-CS/native/${{ matrix.platform.name }}/libSDL2.so if: runner.os == 'Linux' - - name: Prepare release (OSX) + - name: Prepare release (macOS) run: cp install_output/lib/libSDL2-2.0.dylib SDL2-CS/native/${{ matrix.platform.name }}/libSDL2.dylib if: runner.os == 'macOS' - name: Create pull request @@ -114,3 +114,39 @@ jobs: path: 'SDL2-CS' env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' + + build-ios: + name: ios + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + with: + repository: 'libsdl-org/SDL' + ref: 'SDL2' + - uses: actions/checkout@v3 + with: + path: 'SDL2-CS' + - name: Build (iOS) + run: xcodebuild -project Xcode/SDL/SDL.xcodeproj -scheme xcFramework-iOS -configuration Release + - name: Prepare release directory (iOS) + run: mkdir -p SDL2-CS/native/ios + - name: Prepare release (iOS) + run: | + mkdir -p SDL2-CS/native/ios/SDL2.xcframework; + mkdir -p SDL2-CS/native/ios/SDL2.xcframework/ios-arm64/SDL2.framework; + mkdir -p SDL2-CS/native/ios/SDL2.xcframework/ios-arm64_x86_64-simulator/SDL2.framework; + cp Xcode/SDL/Products/SDL2.xcframework/Info.plist SDL2-CS/native/ios/SDL2.xcframework/Info.plist; + cp Xcode/SDL/Products/SDL2.xcframework/ios-arm64/SDL2.framework/SDL2 SDL2-CS/native/ios/SDL2.xcframework/ios-arm64/SDL2.framework/SDL2; + cp Xcode/SDL/Products/SDL2.xcframework/ios-arm64/SDL2.framework/Info.plist SDL2-CS/native/ios/SDL2.xcframework/ios-arm64/SDL2.framework/Info.plist; + cp Xcode/SDL/Products/SDL2.xcframework/ios-arm64_x86_64-simulator/SDL2.framework/SDL2 SDL2-CS/native/ios/SDL2.xcframework/ios-arm64_x86_64-simulator/SDL2.framework/SDL2; + cp Xcode/SDL/Products/SDL2.xcframework/ios-arm64_x86_64-simulator/SDL2.framework/Info.plist SDL2-CS/native/ios/SDL2.xcframework/ios-arm64_x86_64-simulator/SDL2.framework/Info.plist; + - name: Create pull request + uses: peter-evans/create-pull-request@v4 + with: + commit-message: Update iOS SDL binaries + title: Update iOS SDL binaries + body: This PR has been auto-genereated to update the iOS SDL binaries + branch: update-ios-binaries + path: 'SDL2-CS' + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'