From f7b8271f7d6679a2f5352251973c82f0e6dc01ee Mon Sep 17 00:00:00 2001 From: adimiz1 Date: Thu, 10 Jul 2025 14:25:47 +0300 Subject: [PATCH 1/8] Add github actions script --- .github/workflows/ios-tests.yml | 65 +++++++++++++++++++++++++++++++++ .travis.yml | 31 ---------------- 2 files changed, 65 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/ios-tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ios-tests.yml b/.github/workflows/ios-tests.yml new file mode 100644 index 00000000..7ace4242 --- /dev/null +++ b/.github/workflows/ios-tests.yml @@ -0,0 +1,65 @@ +name: iOS CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +env: + CLOUDINARY_URL: ${{ secrets.CLOUDINARY_URL }} + +jobs: + build: + name: Xcode ${{ matrix.osx_image }} - iOS ${{ matrix.os_version }} + runs-on: macos-12 + strategy: + matrix: + include: + - osx_image: xcode12 + xcode_version: '12.5' + ios_name: 'iPhone 8' + os_version: '13.0' + - osx_image: xcode12 + xcode_version: '12.5' + ios_name: 'iPhone 8' + os_version: '14.0' + - osx_image: xcode13.2 + xcode_version: '13.2' + ios_name: 'iPhone 8' + os_version: '15.2' + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Ruby (for CocoaPods) + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.7 + + - name: Install CocoaPods + run: sudo gem install cocoapods + + - name: Setup test cloud URL + run: | + echo "Setting CLOUDINARY_URL from tools/get_test_cloud.sh" + echo "CLOUDINARY_URL=$(bash tools/get_test_cloud.sh)" >> $GITHUB_ENV + echo "cloud_name: $(echo $CLOUDINARY_URL | cut -d'@' -f2)" + + - name: Install Pods + working-directory: Example + run: pod install + + - name: Run Xcode build and tests + run: | + xcodebuild test \ + -workspace Example/Cloudinary.xcworkspace \ + -scheme travis_public_scheme \ + -destination "platform=iOS Simulator,OS=${{ matrix.os_version }},name=${{ matrix.ios_name }}" \ + CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO + + - name: Send notification (if desired) + if: failure() + run: | + echo "Notify sdk_developers@cloudinary.com of failure (implement via webhook/email API if needed)" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 354fb569..00000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: objective-c -os: osx -before_script: > - export CLOUDINARY_URL=$(bash tools/get_test_cloud.sh); - echo cloud_name: "$(echo $CLOUDINARY_URL | cut -d'@' -f2)" -notifications: - email: - recipients: - - sdk_developers@cloudinary.com -jobs: - - osx_image: xcode12 - xcode_workspace: Example/Cloudinary.xcworkspace - xcode_scheme: travis_public_scheme - podfile: Example/Podfile - install: pod install --project-directory=Example - env: CLOUDINARY_URL=$CLOUDINARY_URL - xcode_destination: platform=iOS Simulator,OS=13.0,name=iPhone 8 - - osx_image: xcode12 - xcode_workspace: Example/Cloudinary.xcworkspace - xcode_scheme: travis_public_scheme - podfile: Example/Podfile - install: pod install --project-directory=Example - env: CLOUDINARY_URL=$CLOUDINARY_URL - xcode_destination: platform=iOS Simulator,OS=14.0,name=iPhone 8 - - osx_image: xcode13.2 - xcode_workspace: Example/Cloudinary.xcworkspace - xcode_scheme: travis_public_scheme - podfile: Example/Podfile - install: pod install --project-directory=Example - env: CLOUDINARY_URL=$CLOUDINARY_URL - xcode_destination: platform=iOS Simulator,OS=15.2,name=iPhone 8 From cc06df7ee6922203716e7c8f5a8b6a63c88492f9 Mon Sep 17 00:00:00 2001 From: adimiz1 Date: Thu, 10 Jul 2025 14:30:06 +0300 Subject: [PATCH 2/8] Fix github actions script --- .github/workflows/ios-tests.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ios-tests.yml b/.github/workflows/ios-tests.yml index 7ace4242..b8daf946 100644 --- a/.github/workflows/ios-tests.yml +++ b/.github/workflows/ios-tests.yml @@ -1,10 +1,6 @@ name: iOS CI -on: - push: - branches: [main] - pull_request: - branches: [main] +on: [push, pull_request] env: CLOUDINARY_URL: ${{ secrets.CLOUDINARY_URL }} From 5e08e0c92921701cf9ef0fa65f9ca2072c56d883 Mon Sep 17 00:00:00 2001 From: adimiz1 Date: Tue, 29 Jul 2025 12:32:40 +0300 Subject: [PATCH 3/8] Update to osx-latest --- .github/workflows/ios-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios-tests.yml b/.github/workflows/ios-tests.yml index b8daf946..cdda40fd 100644 --- a/.github/workflows/ios-tests.yml +++ b/.github/workflows/ios-tests.yml @@ -8,7 +8,7 @@ env: jobs: build: name: Xcode ${{ matrix.osx_image }} - iOS ${{ matrix.os_version }} - runs-on: macos-12 + runs-on: macos-latest strategy: matrix: include: From d99f6d42a18021794e32a92dd8fdf086ba99939e Mon Sep 17 00:00:00 2001 From: adimiz1 Date: Wed, 30 Jul 2025 09:31:54 +0300 Subject: [PATCH 4/8] Update ruby version --- .github/workflows/ios-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios-tests.yml b/.github/workflows/ios-tests.yml index cdda40fd..ea618f95 100644 --- a/.github/workflows/ios-tests.yml +++ b/.github/workflows/ios-tests.yml @@ -32,7 +32,7 @@ jobs: - name: Setup Ruby (for CocoaPods) uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7 + ruby-version: 3.2 - name: Install CocoaPods run: sudo gem install cocoapods From 1594adec6576e9cfa6bb910be5a23bddae87d5d6 Mon Sep 17 00:00:00 2001 From: adimiz1 Date: Wed, 30 Jul 2025 09:54:25 +0300 Subject: [PATCH 5/8] Update matrix --- .github/workflows/ios-tests.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/ios-tests.yml b/.github/workflows/ios-tests.yml index ea618f95..5c1d3e62 100644 --- a/.github/workflows/ios-tests.yml +++ b/.github/workflows/ios-tests.yml @@ -12,14 +12,6 @@ jobs: strategy: matrix: include: - - osx_image: xcode12 - xcode_version: '12.5' - ios_name: 'iPhone 8' - os_version: '13.0' - - osx_image: xcode12 - xcode_version: '12.5' - ios_name: 'iPhone 8' - os_version: '14.0' - osx_image: xcode13.2 xcode_version: '13.2' ios_name: 'iPhone 8' From 035d247b650566e0073198d4e19e819db14e33ff Mon Sep 17 00:00:00 2001 From: adimiz1 Date: Wed, 30 Jul 2025 10:04:08 +0300 Subject: [PATCH 6/8] Update matrix --- .github/workflows/ios-tests.yml | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ios-tests.yml b/.github/workflows/ios-tests.yml index 5c1d3e62..4c500c21 100644 --- a/.github/workflows/ios-tests.yml +++ b/.github/workflows/ios-tests.yml @@ -8,7 +8,7 @@ env: jobs: build: name: Xcode ${{ matrix.osx_image }} - iOS ${{ matrix.os_version }} - runs-on: macos-latest + runs-on: macos-13 strategy: matrix: include: @@ -26,28 +26,40 @@ jobs: with: ruby-version: 3.2 + - name: Select Xcode version + run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version }}.app/Contents/Developer + - name: Install CocoaPods run: sudo gem install cocoapods - - name: Setup test cloud URL + - name: Setup CLOUDINARY_URL run: | - echo "Setting CLOUDINARY_URL from tools/get_test_cloud.sh" echo "CLOUDINARY_URL=$(bash tools/get_test_cloud.sh)" >> $GITHUB_ENV echo "cloud_name: $(echo $CLOUDINARY_URL | cut -d'@' -f2)" + - name: Clean Derived Data + run: rm -rf ~/Library/Developer/Xcode/DerivedData + - name: Install Pods working-directory: Example run: pod install - - name: Run Xcode build and tests + - name: Build for Testing run: | - xcodebuild test \ + xcodebuild build-for-testing \ -workspace Example/Cloudinary.xcworkspace \ -scheme travis_public_scheme \ -destination "platform=iOS Simulator,OS=${{ matrix.os_version }},name=${{ matrix.ios_name }}" \ - CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO + CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty - - name: Send notification (if desired) - if: failure() + - name: Run Tests run: | - echo "Notify sdk_developers@cloudinary.com of failure (implement via webhook/email API if needed)" + xcodebuild test-without-building \ + -workspace Example/Cloudinary.xcworkspace \ + -scheme travis_public_scheme \ + -destination "platform=iOS Simulator,OS=${{ matrix.os_version }},name=${{ matrix.ios_name }}" \ + CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty + + - name: Notify on Failure + if: failure() + run: echo "Notify sdk_developers@cloudinary.com of failure" From 1490a2013f71d1a30f3bd2d27fd82a51bee04779 Mon Sep 17 00:00:00 2001 From: adimiz1 Date: Wed, 30 Jul 2025 10:07:44 +0300 Subject: [PATCH 7/8] Update matrix --- .github/workflows/ios-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ios-tests.yml b/.github/workflows/ios-tests.yml index 4c500c21..171fd993 100644 --- a/.github/workflows/ios-tests.yml +++ b/.github/workflows/ios-tests.yml @@ -12,10 +12,10 @@ jobs: strategy: matrix: include: - - osx_image: xcode13.2 - xcode_version: '13.2' - ios_name: 'iPhone 8' - os_version: '15.2' + - osx_image: xcode15.4 + xcode_version: '15.4' + ios_name: 'iPhone 14' + os_version: '16.4' steps: - name: Checkout repository From c7b89c245855f7538c5b28149f6cf740a09efc95 Mon Sep 17 00:00:00 2001 From: adimiz1 Date: Wed, 30 Jul 2025 10:12:05 +0300 Subject: [PATCH 8/8] Update matrix --- .github/workflows/ios-tests.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ios-tests.yml b/.github/workflows/ios-tests.yml index 171fd993..7d3ba3e1 100644 --- a/.github/workflows/ios-tests.yml +++ b/.github/workflows/ios-tests.yml @@ -7,13 +7,13 @@ env: jobs: build: - name: Xcode ${{ matrix.osx_image }} - iOS ${{ matrix.os_version }} + name: Xcode ${{ matrix.xcode_version }} - iOS ${{ matrix.os_version }} runs-on: macos-13 + strategy: matrix: include: - - osx_image: xcode15.4 - xcode_version: '15.4' + - xcode_version: '15.4' ios_name: 'iPhone 14' os_version: '16.4' @@ -26,8 +26,10 @@ jobs: with: ruby-version: 3.2 - - name: Select Xcode version - run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version }}.app/Contents/Developer + - name: Setup Xcode ${{ matrix.xcode_version }} + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: ${{ matrix.xcode_version }} - name: Install CocoaPods run: sudo gem install cocoapods