diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 196f92ec5..a76419efc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -426,548 +426,6 @@ jobs: path: ./builder/build/${{ env.PLATFORM }}.xcarchive if-no-files-found: error - # watchOS - build-openssl-watchOS: - runs-on: macos-12 - env: - PLATFORM: watchOS - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Patch Build script - run: | - cd td - git apply ../builder/tdlib-patches/build-openssl.patch - - - name: Cache Openssl - id: cache-openssl - uses: actions/cache@v2 - with: - path: td/example/ios/third_party/openssl/${{ env.PLATFORM }} - key: openssl-${{ env.PLATFORM }}-${{ hashFiles('td/example/ios/build-openssl.sh') }} - - - name: Install deps - if: steps.cache-openssl.outputs.cache-hit != 'true' - run: brew install gperf cmake coreutils - - - name: Build Openssl - if: steps.cache-openssl.outputs.cache-hit != 'true' - run: | - cd td/example/ios - ./build-openssl.sh $PLATFORM - - - name: Upload Artifacts - uses: actions/upload-artifact@v2 - with: - name: openssl-${{ env.PLATFORM }} - path: td/example/ios/third_party/openssl/${{ env.PLATFORM }} - if-no-files-found: error - - build-tdlib-watchOS: - runs-on: macos-12 - needs: [build-openssl-watchOS] - env: - PLATFORM: watchOS - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Patch Build script - run: cp builder/tdlib-patches/build.sh td/example/ios - - - name: Cache tdlib - id: cache-tdlib - uses: actions/cache@v2 - with: - path: td/example/ios/build/install-${{ env.PLATFORM }} - key: tdlib-install-${{ env.PLATFORM }}-${{ hashFiles('td') }} - - - name: Install deps - if: steps.cache-tdlib.outputs.cache-hit != 'true' - run: brew install gperf cmake coreutils - - - name: Download Artifacts - if: steps.cache-tdlib.outputs.cache-hit != 'true' - uses: actions/download-artifact@v2 - with: - name: openssl-${{ env.PLATFORM }} - path: td/example/ios/third_party/openssl/${{ env.PLATFORM }} - - - name: Pregenerate Sources - if: steps.cache-tdlib.outputs.cache-hit != 'true' - run: | - cd td - mkdir native-build - cd native-build - cmake .. - cmake --build . --target prepare_cross_compiling - - - name: Build TDLib - if: steps.cache-tdlib.outputs.cache-hit != 'true' - run: | - cd td/example/ios - ./build.sh $PLATFORM - - - name: Upload ${{ env.PLATFORM }} install artifacts - uses: actions/upload-artifact@v2 - with: - name: tdlib-install-${{ env.PLATFORM }} - path: td/example/ios/build/install-${{ env.PLATFORM }} - if-no-files-found: error - - build-openssl-watchOS-simulator: - runs-on: macos-12 - env: - PLATFORM: watchOS-simulator - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Patch Build script - run: | - cd td - git apply ../builder/tdlib-patches/build-openssl.patch - - - name: Cache Openssl - id: cache-openssl - uses: actions/cache@v2 - with: - path: td/example/ios/third_party/openssl/${{ env.PLATFORM }} - key: openssl-${{ env.PLATFORM }}-${{ hashFiles('td/example/ios/build-openssl.sh') }} - - - name: Install deps - if: steps.cache-openssl.outputs.cache-hit != 'true' - run: brew install gperf cmake coreutils - - - name: Build Openssl - if: steps.cache-openssl.outputs.cache-hit != 'true' - run: | - cd td/example/ios - ./build-openssl.sh $PLATFORM - - - name: Upload Artifacts - uses: actions/upload-artifact@v2 - with: - name: openssl-${{ env.PLATFORM }} - path: td/example/ios/third_party/openssl/${{ env.PLATFORM }} - if-no-files-found: error - - build-tdlib-watchOS-simulator: - runs-on: macos-12 - needs: [build-openssl-watchOS-simulator] - env: - PLATFORM: watchOS-simulator - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Patch Build script - run: cp builder/tdlib-patches/build.sh td/example/ios - - - name: Cache tdlib - id: cache-tdlib - uses: actions/cache@v2 - with: - path: td/example/ios/build/install-${{ env.PLATFORM }} - key: tdlib-install-${{ env.PLATFORM }}-${{ hashFiles('td') }} - - - name: Install deps - if: steps.cache-tdlib.outputs.cache-hit != 'true' - run: brew install gperf cmake coreutils - - - name: Download Artifacts - if: steps.cache-tdlib.outputs.cache-hit != 'true' - uses: actions/download-artifact@v2 - with: - name: openssl-${{ env.PLATFORM }} - path: td/example/ios/third_party/openssl/${{ env.PLATFORM }} - - - name: Pregenerate Sources - if: steps.cache-tdlib.outputs.cache-hit != 'true' - run: | - cd td - mkdir native-build - cd native-build - cmake .. - cmake --build . --target prepare_cross_compiling - - - name: Build TDLib - if: steps.cache-tdlib.outputs.cache-hit != 'true' - run: | - cd td/example/ios - ./build.sh $PLATFORM - - - name: Upload ${{ env.PLATFORM }} install artifacts - uses: actions/upload-artifact@v2 - with: - name: tdlib-install-${{ env.PLATFORM }} - path: td/example/ios/build/install-${{ env.PLATFORM }} - if-no-files-found: error - - build-framework-watchOS: - runs-on: macos-12 - needs: [build-tdlib-watchOS] - env: - PLATFORM: watchOS - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Download Openssl - uses: actions/download-artifact@v2 - with: - name: openssl-${{ env.PLATFORM }} - path: td/example/ios/third_party/openssl/${{ env.PLATFORM }} - - - name: Download TDLib ${{ env.PLATFORM }} install - uses: actions/download-artifact@v2 - with: - name: tdlib-install-${{ env.PLATFORM }} - path: td/example/ios/build/install-${{ env.PLATFORM }} - - - name: Patch headers - working-directory: ./builder - run: ./patch-headers.sh - - - name: Generate project - working-directory: ./builder - run: TUIST_PLATFORM=$PLATFORM ../.tuist-bin/tuist generate - - - name: Build .framework - working-directory: ./builder - run: ./build-framework.sh $PLATFORM - - - name: Upload Artifacts - uses: actions/upload-artifact@v2 - with: - name: xcarchive-${{ env.PLATFORM }} - path: ./builder/build/${{ env.PLATFORM }}.xcarchive - if-no-files-found: error - - build-framework-watchOS-simulator: - runs-on: macos-12 - needs: [build-tdlib-watchOS-simulator] - env: - PLATFORM: watchOS-simulator - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Download Openssl - uses: actions/download-artifact@v2 - with: - name: openssl-${{ env.PLATFORM }} - path: td/example/ios/third_party/openssl/${{ env.PLATFORM }} - - - name: Download TDLib ${{ env.PLATFORM }} install - uses: actions/download-artifact@v2 - with: - name: tdlib-install-${{ env.PLATFORM }} - path: td/example/ios/build/install-${{ env.PLATFORM }} - - - name: Patch headers - working-directory: ./builder - run: ./patch-headers.sh - - - name: Generate project - working-directory: ./builder - run: TUIST_PLATFORM=$PLATFORM ../.tuist-bin/tuist generate - - - name: Build .framework - working-directory: ./builder - run: ./build-framework.sh $PLATFORM - - - name: Upload Artifacts - uses: actions/upload-artifact@v2 - with: - name: xcarchive-${{ env.PLATFORM }} - path: ./builder/build/${{ env.PLATFORM }}.xcarchive - if-no-files-found: error - - # tvOS - build-openssl-tvOS: - runs-on: macos-12 - env: - PLATFORM: tvOS - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Patch Build script - run: | - cd td - git apply ../builder/tdlib-patches/build-openssl.patch - - - name: Cache Openssl - id: cache-openssl - uses: actions/cache@v2 - with: - path: td/example/ios/third_party/openssl/${{ env.PLATFORM }} - key: openssl-${{ env.PLATFORM }}-${{ hashFiles('td/example/ios/build-openssl.sh') }} - - - name: Install deps - if: steps.cache-openssl.outputs.cache-hit != 'true' - run: brew install gperf cmake coreutils - - - name: Build Openssl - if: steps.cache-openssl.outputs.cache-hit != 'true' - run: | - cd td/example/ios - ./build-openssl.sh $PLATFORM - - - name: Upload Artifacts - uses: actions/upload-artifact@v2 - with: - name: openssl-${{ env.PLATFORM }} - path: td/example/ios/third_party/openssl/${{ env.PLATFORM }} - if-no-files-found: error - - build-tdlib-tvOS: - runs-on: macos-12 - needs: [build-openssl-tvOS] - env: - PLATFORM: tvOS - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Patch Build script - run: cp builder/tdlib-patches/build.sh td/example/ios - - - name: Cache tdlib - id: cache-tdlib - uses: actions/cache@v2 - with: - path: td/example/ios/build/install-${{ env.PLATFORM }} - key: tdlib-install-${{ env.PLATFORM }}-${{ hashFiles('td') }} - - - name: Install deps - if: steps.cache-tdlib.outputs.cache-hit != 'true' - run: brew install gperf cmake coreutils - - - name: Download Artifacts - if: steps.cache-tdlib.outputs.cache-hit != 'true' - uses: actions/download-artifact@v2 - with: - name: openssl-${{ env.PLATFORM }} - path: td/example/ios/third_party/openssl/${{ env.PLATFORM }} - - - name: Pregenerate Sources - if: steps.cache-tdlib.outputs.cache-hit != 'true' - run: | - cd td - mkdir native-build - cd native-build - cmake .. - cmake --build . --target prepare_cross_compiling - - - name: Build TDLib - if: steps.cache-tdlib.outputs.cache-hit != 'true' - run: | - cd td/example/ios - ./build.sh $PLATFORM - - - name: Upload ${{ env.PLATFORM }} install artifacts - uses: actions/upload-artifact@v2 - with: - name: tdlib-install-${{ env.PLATFORM }} - path: td/example/ios/build/install-${{ env.PLATFORM }} - if-no-files-found: error - - build-openssl-tvOS-simulator: - runs-on: macos-12 - env: - PLATFORM: tvOS-simulator - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Patch Build script - run: | - cd td - git apply ../builder/tdlib-patches/build-openssl.patch - - - name: Cache Openssl - id: cache-openssl - uses: actions/cache@v2 - with: - path: td/example/ios/third_party/openssl/${{ env.PLATFORM }} - key: openssl-${{ env.PLATFORM }}-${{ hashFiles('td/example/ios/build-openssl.sh') }} - - - name: Install deps - if: steps.cache-openssl.outputs.cache-hit != 'true' - run: brew install gperf cmake coreutils - - - name: Build Openssl - if: steps.cache-openssl.outputs.cache-hit != 'true' - run: | - cd td/example/ios - ./build-openssl.sh $PLATFORM - - - name: Upload Artifacts - uses: actions/upload-artifact@v2 - with: - name: openssl-${{ env.PLATFORM }} - path: td/example/ios/third_party/openssl/${{ env.PLATFORM }} - if-no-files-found: error - - build-tdlib-tvOS-simulator: - runs-on: macos-12 - needs: [build-openssl-tvOS-simulator] - env: - PLATFORM: tvOS-simulator - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Patch Build script - run: cp builder/tdlib-patches/build.sh td/example/ios - - - name: Cache tdlib - id: cache-tdlib - uses: actions/cache@v2 - with: - path: td/example/ios/build/install-${{ env.PLATFORM }} - key: tdlib-install-${{ env.PLATFORM }}-${{ hashFiles('td') }} - - - name: Install deps - if: steps.cache-tdlib.outputs.cache-hit != 'true' - run: brew install gperf cmake coreutils - - - name: Download Artifacts - if: steps.cache-tdlib.outputs.cache-hit != 'true' - uses: actions/download-artifact@v2 - with: - name: openssl-${{ env.PLATFORM }} - path: td/example/ios/third_party/openssl/${{ env.PLATFORM }} - - - name: Pregenerate Sources - if: steps.cache-tdlib.outputs.cache-hit != 'true' - run: | - cd td - mkdir native-build - cd native-build - cmake .. - cmake --build . --target prepare_cross_compiling - - - name: Build TDLib - if: steps.cache-tdlib.outputs.cache-hit != 'true' - run: | - cd td/example/ios - ./build.sh $PLATFORM - - - name: Upload ${{ env.PLATFORM }} install artifacts - uses: actions/upload-artifact@v2 - with: - name: tdlib-install-${{ env.PLATFORM }} - path: td/example/ios/build/install-${{ env.PLATFORM }} - if-no-files-found: error - - build-framework-tvOS: - runs-on: macos-12 - needs: [build-tdlib-tvOS] - env: - PLATFORM: tvOS - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Download Openssl - uses: actions/download-artifact@v2 - with: - name: openssl-${{ env.PLATFORM }} - path: td/example/ios/third_party/openssl/${{ env.PLATFORM }} - - - name: Download TDLib ${{ env.PLATFORM }} install - uses: actions/download-artifact@v2 - with: - name: tdlib-install-${{ env.PLATFORM }} - path: td/example/ios/build/install-${{ env.PLATFORM }} - - - name: Patch headers - working-directory: ./builder - run: ./patch-headers.sh - - - name: Generate project - working-directory: ./builder - run: TUIST_PLATFORM=$PLATFORM ../.tuist-bin/tuist generate - - - name: Build .framework - working-directory: ./builder - run: ./build-framework.sh $PLATFORM - - - name: Upload Artifacts - uses: actions/upload-artifact@v2 - with: - name: xcarchive-${{ env.PLATFORM }} - path: ./builder/build/${{ env.PLATFORM }}.xcarchive - if-no-files-found: error - - build-framework-tvOS-simulator: - runs-on: macos-12 - needs: [build-tdlib-tvOS-simulator] - env: - PLATFORM: tvOS-simulator - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Download Openssl - uses: actions/download-artifact@v2 - with: - name: openssl-${{ env.PLATFORM }} - path: td/example/ios/third_party/openssl/${{ env.PLATFORM }} - - - name: Download TDLib ${{ env.PLATFORM }} install - uses: actions/download-artifact@v2 - with: - name: tdlib-install-${{ env.PLATFORM }} - path: td/example/ios/build/install-${{ env.PLATFORM }} - - - name: Patch headers - working-directory: ./builder - run: ./patch-headers.sh - - - name: Generate project - working-directory: ./builder - run: TUIST_PLATFORM=$PLATFORM ../.tuist-bin/tuist generate - - - name: Build .framework - working-directory: ./builder - run: ./build-framework.sh $PLATFORM - - - name: Upload Artifacts - uses: actions/upload-artifact@v2 - with: - name: xcarchive-${{ env.PLATFORM }} - path: ./builder/build/${{ env.PLATFORM }}.xcarchive - if-no-files-found: error - # Merge frameworks merge-xcframework: runs-on: macos-12 @@ -975,10 +433,6 @@ jobs: - build-framework-iOS - build-framework-iOS-simulator - build-framework-macOS - - build-framework-watchOS - - build-framework-watchOS-simulator - - build-framework-tvOS - - build-framework-tvOS-simulator steps: - name: Checkout uses: actions/checkout@v2 @@ -1001,34 +455,9 @@ jobs: name: xcarchive-macOS path: ./builder/build/macOS.xcarchive - - name: Download watchOS Framework - - uses: actions/download-artifact@v2 - with: - name: xcarchive-watchOS - path: ./builder/build/watchOS.xcarchive - - - name: Download watchOS-simulator Framework - uses: actions/download-artifact@v2 - with: - name: xcarchive-watchOS-simulator - path: ./builder/build/watchOS-simulator.xcarchive - - - name: Download tvOS Framework - uses: actions/download-artifact@v2 - with: - name: xcarchive-tvOS - path: ./builder/build/tvOS.xcarchive - - - name: Download tvOS-simulator Framework - uses: actions/download-artifact@v2 - with: - name: xcarchive-tvOS-simulator - path: ./builder/build/tvOS-simulator.xcarchive - - name: Merge Frameworks working-directory: ./builder - run: ./merge-frameworks.sh "iOS iOS-simulator macOS watchOS watchOS-simulator tvOS tvOS-simulator" + run: ./merge-frameworks.sh "iOS iOS-simulator macOS" - name: Archive XCFramework working-directory: ./builder/build @@ -1048,7 +477,7 @@ jobs: needs: [merge-xcframework] strategy: matrix: - platform: ["macOS", "iOS-simulator", "tvOS-simulator"] # TODO: watchOS-simulator + platform: ["macOS", "iOS-simulator"] steps: - name: Checkout uses: actions/checkout@v2