[build] Enable iOS benchmark runner in CI
This commit is contained in:
69
circle.yml
69
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:
|
||||
|
||||
Reference in New Issue
Block a user