From f32462ce9494be17ffd20684268bad7abce6e697 Mon Sep 17 00:00:00 2001 From: Kiryl Kaveryn Date: Fri, 27 Dec 2024 15:24:39 +0400 Subject: [PATCH] [ios] [github] add simulator pre-boot before running the tests Signed-off-by: Kiryl Kaveryn --- .github/workflows/ios-check.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ios-check.yaml b/.github/workflows/ios-check.yaml index 49575541e..8908c26f5 100644 --- a/.github/workflows/ios-check.yaml +++ b/.github/workflows/ios-check.yaml @@ -15,6 +15,7 @@ jobs: LANGUAGE: en_US.UTF-8 LC_ALL: en_US.UTF-8 TEST_RESULTS_BUNDLE_NAME: CoMaps-Test-Results + SIMULATOR_DEVICE: 'iPhone 16 Pro Max' strategy: fail-fast: false matrix: @@ -50,12 +51,15 @@ jobs: if: matrix.buildType == 'Debug' shell: bash run: | + # Start sim before the build to make sure it's booted when tests start. + xcrun simctl boot "${{ env.SIMULATOR_DEVICE }}" || true + xcrun simctl bootstatus "${{ env.SIMULATOR_DEVICE }}" -b xcodebuild test \ -workspace xcode/omim.xcworkspace \ -scheme OMaps \ -configuration Debug \ -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 16 Pro Max,OS=latest' \ + -destination "platform=iOS Simulator,name=${{ env.SIMULATOR_DEVICE }},OS=latest" \ -quiet \ -resultBundlePath ${{ env.TEST_RESULTS_BUNDLE_NAME }}.xcresult \ CODE_SIGNING_REQUIRED=NO \