Skip to content

Commit

Permalink
Fix CI not running tests below iOS 14
Browse files Browse the repository at this point in the history
  • Loading branch information
nuno-vieira committed Mar 26, 2021
1 parent 7d4c9dd commit 49f157e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 12 deletions.
23 changes: 17 additions & 6 deletions .github/actions/prepare-ios-simulator/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 10 additions & 6 deletions .github/workflows/full-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)"

Expand All @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/smoke-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 49f157e

Please sign in to comment.