summaryrefslogtreecommitdiff
path: root/circle.yml
diff options
context:
space:
mode:
authorJuha Alanen <juha.alanen@mapbox.com>2020-02-03 16:58:59 +0200
committerJuha Alanen <juha.alanen@mapbox.com>2020-02-18 16:10:23 +0200
commit4fb715f1fedf159272c0354721f534273bea0648 (patch)
tree16b08d43bf75ea742b6f62642893627e5c773e6a /circle.yml
parentcea87c9f2d0eb66e3a918d1b84e316b27462dd07 (diff)
downloadqtlocation-mapboxgl-4fb715f1fedf159272c0354721f534273bea0648.tar.gz
[build] Enable iOS benchmark runner in CI
Diffstat (limited to 'circle.yml')
-rw-r--r--circle.yml69
1 files changed, 69 insertions, 0 deletions
diff --git a/circle.yml b/circle.yml
index a9c10b6395..d5e89b44d0 100644
--- a/circle.yml
+++ b/circle.yml
@@ -21,6 +21,7 @@ workflows:
- android-unit-test-runner
- ios-render-test-runner
- ios-unit-test-runner
+ - ios-benchmark-runner
- baselines:
requires:
- android-arm64-v8a-release
@@ -459,6 +460,74 @@ jobs:
if ls unit-test-app/TestLogs/*.xml 1> /dev/null 2>&1; then cp unit-test-app/TestLogs/*.xml /tmp/tests/unit-test/results.xml; fi
fi
- save
+ ios-benchmark-runner:
+ executor: macos-11_0_0
+ steps:
+ - checkout
+ - prepare
+ - prepare-macos
+ - run:
+ name: Prepare codesign keychain
+ command: |
+ cd benchmark/ios
+ fastlane run create_keychain name:fastlane_keychain password:$FASTLANE_PASSWORD timeout:false unlock:true
+ fastlane match
+ security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $FASTLANE_PASSWORD fastlane_keychain
+ /usr/bin/env xcrun security find-identity -v -p codesigning
+ - run:
+ name: Build IOS BenchmarkApp
+ command: |
+ cd benchmark/ios
+ ccache --zero-stats --max-size=2G
+ cmake ../.. -B Build -G Xcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DMBGL_IOS_BENCHMARK=1 -DCMAKE_OSX_ARCHITECTURES=arm64e
+ cmake --build Build --config Release
+ ccache --show-stats
+ - run:
+ name: Codesign BenchmarkApp for running on a physical device
+ command: |
+ cd benchmark/ios
+ ./codesigning/generate-entitlements.swift
+ cd Build
+ ../codesigning/codesign_all.sh
+ codesign -dv --verbose=4 Release-iphoneos/BenchmarkApp.app
+ - run:
+ name: Login to IOS Google Cloud Platform
+ command: |
+ if [[ -n "${GCLOUD_SERVICE_ACCOUNT_JSON_IOS}" ]]; then
+ echo "${GCLOUD_SERVICE_ACCOUNT_JSON_IOS}" > iosAccount.json
+ gcloud auth activate-service-account --key-file iosAccount.json --project ios-mapbox-gl-native
+ rm iosAccount.json
+ fi
+ - run:
+ name: Run BenchmarkApp on Firebase
+ no_output_timeout: 20m
+ command: |
+ if [[ -n "${GCLOUD_SERVICE_ACCOUNT_JSON_IOS}" ]]; then
+ # arrange files in a way Firebase expects it, and package them in a zip file
+ cd benchmark/ios/Build
+ cp ../BenchmarkApp_iphoneos13.2-arm64e-release.xctestrun .
+ zip testapp.zip -r Release-iphoneos/BenchmarkApp.app --quiet
+ zip testapp.zip BenchmarkApp_iphoneos13.2-arm64e-release.xctestrun
+ gcloud firebase test ios models list
+ gcloud firebase test ios run \
+ --test testapp.zip \
+ --device model=iphonexs,version=12.0,locale=en,orientation=portrait --xcode-version=11.1 --timeout 20m \
+ --verbosity=debug --no-record-video --results-dir ios-benchmark-app-${CIRCLE_BUILD_NUM}
+ fi
+ - run:
+ name: Retrieve Test Result from gcloud
+ when: always
+ command: |
+ if [[ -n "${GCLOUD_SERVICE_ACCOUNT_JSON_IOS}" ]]; then
+ testResult=$(gsutil ls -d gs://test-lab-hn7kwqcz3108z-hjm4qtbqqkymk/ios-benchmark-app-${CIRCLE_BUILD_NUM}/iphonexs-12.0-en-portrait/TestLogs/)
+ mkdir -p benchmark-app
+ gsutil -m cp -r $testResult benchmark-app
+ cd benchmark-app/TestLogs
+ xcparse attachments *.xcresult && ls
+ cd ../.. && mkdir -p /tmp/tests/benchmark
+ if ls benchmark-app/TestLogs/*.json 1> /dev/null 2>&1; then cp benchmark-app/TestLogs/*.json /tmp/tests/benchmark/results.json; fi
+ fi
+ - save
android-benchmark-runner:
executor: ubuntu-disco
steps: