From 5e88f6bb42f75923f4910d6c27fd271c82fa0f08 Mon Sep 17 00:00:00 2001 From: Bahadir Oncel Date: Wed, 14 Oct 2020 17:48:40 +0300 Subject: [PATCH] fixup! Build sample app as part of CI --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ fastlane/Fastfile | 5 +++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb66632961c..33eaef22b8d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -200,3 +200,28 @@ jobs: run: bundle install - name: Build v3 Sample run: bundle exec fastlane build_sample_v3 + + build-sample-v3-ios12: + name: Build v3 Sample (iOS12.4) + runs-on: macos-latest + steps: + - uses: actions/checkout@v1 + - name: Cache RubyGems + uses: actions/cache@v2 + id: rubygem-cache + with: + path: vendor/bundle + key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: ${{ runner.os }}-gem- + - name: Install RubyGems + if: steps.rubygem-cache.outputs.cache-hit != 'true' + run: bundle install + - name: Prepare iOS 12 simulator + run: | + sudo mkdir -p /Library/Developer/CoreSimulator/Profiles/Runtimes + sudo ln -s /Applications/Xcode_10.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 12.4.simruntime + xcrun simctl list runtimes + xcrun simctl create custom-test-device "iPhone 7" "com.apple.CoreSimulator.SimRuntime.iOS-12-4" + xcrun simctl list devices 12.4 + - name: Build v3 Sample + run: bundle exec fastlane build_sample_v3 device:"iPhone 7 (12.4)" diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 0d3a3990c3e..85c1a2fc8a8 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -341,11 +341,12 @@ lane :stress_test_v3_release do end desc "Builds v3 Sample app" -lane :build_sample_v3 do +lane :build_sample_v3 do |options| scan( project: "StreamChat_v3.xcodeproj", scheme: "Sample", clean: true, - build_for_testing: true + build_for_testing: true, + devices: options[:device], ) end