From 49f157e917e47e1acc7d9cc1aa7b98755ff48231 Mon Sep 17 00:00:00 2001 From: Nuno Vieira Date: Fri, 26 Mar 2021 01:43:51 +0000 Subject: [PATCH] Fix CI not running tests below iOS 14 --- .../actions/prepare-ios-simulator/action.yml | 23 ++++++++++++++----- .github/workflows/full-checks.yml | 16 ++++++++----- .github/workflows/smoke-checks.yml | 1 + 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/.github/actions/prepare-ios-simulator/action.yml b/.github/actions/prepare-ios-simulator/action.yml index 4cd666cf363..755a979de0d 100644 --- a/.github/actions/prepare-ios-simulator/action.yml +++ b/.github/actions/prepare-ios-simulator/action.yml @@ -6,16 +6,27 @@ inputs: ios: description: 'The iOS version' required: true + xcode: + description: 'The Xcode version. The ios simulators supported for each xcode version: https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md#installed-simulators' + required: true runs: using: "composite" steps: - - run: + - run: | + xcode_version=${{ inputs.xcode }} + ios_version=${{ inputs.ios }} + ios_version_dash=${ios_version//./-} # ex: 12.4 -> 12-4 + sudo mkdir -p /Library/Developer/CoreSimulator/Profiles/Runtimes - sudo ln -s /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ ${{ inputs.ios }}.simruntime + + if [[ "$xcode_version" == "10.3" ]]; then + sudo ln -s /Applications/Xcode_$xcode_version.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ $ios_version.simruntime + else + sudo ln -s /Applications/Xcode_$xcode_version.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ $ios_version.simruntime + fi + xcrun simctl list runtimes - ios=${{ inputs.ios }} - ios_runtime=${ios//./-} - xcrun simctl create custom-test-device "${{ inputs.device }}" "com.apple.CoreSimulator.SimRuntime.iOS-$ios_runtime" - xcrun simctl list devices ${{ inputs.ios }} + xcrun simctl create custom-test-device "${{ inputs.device }}" "com.apple.CoreSimulator.SimRuntime.iOS-$ios_version_dash" + xcrun simctl list devices $ios_version shell: bash \ No newline at end of file diff --git a/.github/workflows/full-checks.yml b/.github/workflows/full-checks.yml index eca9d50c65d..ffcd7d7b363 100644 --- a/.github/workflows/full-checks.yml +++ b/.github/workflows/full-checks.yml @@ -92,9 +92,10 @@ jobs: - uses: ./.github/actions/prepare-ios-simulator with: device: "iPhone 11" - ios: "13.4" + ios: "13.5" + xcode: "11.5" - name: Run Stress Tests - iOS 13.4 (Release) - run: bundle exec fastlane stress_test_release device:"iPhone 11 (13.4)" + run: bundle exec fastlane stress_test_release device:"iPhone 11 (13.5)" stress-tests-ios12: name: Stress Test LLC - iOS 12.4 (Release) @@ -121,6 +122,7 @@ jobs: with: device: "iPhone 11" ios: "12.4" + xcode: "10.3" - name: Run Stress Tests run: bundle exec fastlane stress_test_release device:"iPhone 11 (12.4)" @@ -147,12 +149,13 @@ jobs: - uses: ./.github/actions/bootstrap - uses: ./.github/actions/prepare-ios-simulator with: - device: "iPhone 7" - ios: "13.4" + device: "iPhone 11" + ios: "13.5" + xcode: "11.5" - name: Build Sample App - iOS 13.4 - run: bundle exec fastlane build_sample device:"iPhone 7 (13.4)" + run: bundle exec fastlane build_sample device:"iPhone 11 (13.5)" - name: Build Demo App - iOS 13.4 - run: bundle exec fastlane build_demo device:"iPhone 7 (13.4)" + run: bundle exec fastlane build_demo device:"iPhone 11 (13.5)" - uses: 8398a7/action-slack@v3 with: status: ${{ job.status }} @@ -188,6 +191,7 @@ jobs: with: device: "iPhone 7" ios: "12.4" + xcode: "10.3" - name: Build Sample App - iOS 12.4 run: bundle exec fastlane build_sample device:"iPhone 7 (12.4)" - name: Build Demo App - iOS 12.4 diff --git a/.github/workflows/smoke-checks.yml b/.github/workflows/smoke-checks.yml index df005584ee6..0c4ffaf7e41 100644 --- a/.github/workflows/smoke-checks.yml +++ b/.github/workflows/smoke-checks.yml @@ -78,6 +78,7 @@ jobs: with: device: "iPhone 7" ios: "12.4" + xcode: "10.3" - name: Run LLC Tests (Debug - iOS < 13) run: bundle exec fastlane test device:"iPhone 7 (12.4)" - uses: codecov/codecov-action@v1