diff options
author | zmiao <miao.zhao@mapbox.com> | 2020-01-13 14:05:19 +0200 |
---|---|---|
committer | zmiao <miao.zhao@mapbox.com> | 2020-01-21 16:55:02 +0200 |
commit | cafdd4e027bddfca1e0e006c38e72d3c57b68f6f (patch) | |
tree | ada35c2d27a76c3228a848b108d1e19b6b38801e | |
parent | 4be43796510a6ddb7aaa7d8ec0cb8f6bc211c944 (diff) | |
download | qtlocation-mapboxgl-cafdd4e027bddfca1e0e006c38e72d3c57b68f6f.tar.gz |
Change to release build configuration
-rw-r--r-- | circle.yml | 31 | ||||
-rw-r--r-- | render-test/ios/AppDelegate.m | 2 | ||||
-rw-r--r-- | render-test/ios/RenderTestApp_iphoneos13.2-arm64e-debug.xctestrun (renamed from render-test/ios/RenderTestApp_iphoneos13.2-arm64e.xctestrun) | 0 | ||||
-rw-r--r-- | render-test/ios/RenderTestApp_iphoneos13.2-arm64e-release.xctestrun | 68 | ||||
-rw-r--r-- | render-test/ios/ViewController.m | 4 | ||||
-rwxr-xr-x | render-test/ios/codesigning/codesign_all.sh | 12 | ||||
-rw-r--r-- | render-test/ios/tests/Tests.m | 4 |
7 files changed, 98 insertions, 23 deletions
diff --git a/circle.yml b/circle.yml index d8b9a9463b..e6d8933983 100644 --- a/circle.yml +++ b/circle.yml @@ -141,12 +141,7 @@ workflows: - next-macos-xcode11-release config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug' style_tests: true - - next-build-template: - name: next-ios-xcode11-release - executor_name: macos-11_0_0 - target_is_macos: true - config_params: '-G Xcode -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_SYSROOT=iphonesimulator' - test_params: '-Q -N' + - next-ios-xcode11-release mbgl-legacy: jobs: # @@ -674,6 +669,18 @@ commands: fi jobs: + next-ios-xcode11-release: + executor: macos-11_0_0 + steps: + - checkout + - next-prepare + - next-prepare-macos + - run: + name: Build + command: | + cmake next -B Build -G Xcode -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_SYSROOT=iphonesimulator + cd Build && xcodebuild -sdk iphonesimulator -project Mapbox\ GL\ Native.xcodeproj -configuration Release + - next-save next-ios-render-test-runner: executor: macos-11_0_0 steps: @@ -694,8 +701,8 @@ jobs: cd render-test/ios && ./setup_test_data.sh cmake ../../next -B Build -G Xcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DIOS_RENDER_TESTING=ON cd Build - xcodebuild -sdk iphoneos -project Mapbox\ GL\ Native.xcodeproj -scheme RenderTestApp build-for-testing -arch arm64 CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO - xcodebuild -sdk iphoneos -project Mapbox\ GL\ Native.xcodeproj build -target RenderTestAppTests -arch arm64 CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO + xcodebuild -sdk iphoneos -project Mapbox\ GL\ Native.xcodeproj -scheme RenderTestApp build-for-testing -arch arm64 CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -configuration Release + xcodebuild -sdk iphoneos -project Mapbox\ GL\ Native.xcodeproj build -target RenderTestAppTests -arch arm64 CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -configuration Release - run: name: Codesign RenderTestApp for running on a physical device command: | @@ -704,7 +711,7 @@ jobs: ls codesigning cd Build ../codesigning/codesign_all.sh - codesign -dv --verbose=4 Debug-iphoneos/RenderTestApp.app # for debugging that app is signed or not + codesign -dv --verbose=4 Release-iphoneos/RenderTestApp.app # for debugging that app is signed or not - run: name: Login to IOS Google Cloud Platform command: | @@ -720,9 +727,9 @@ jobs: if [[ -n "${GCLOUD_SERVICE_ACCOUNT_JSON_IOS}" ]]; then # arrange files in a way Firebase expects it, and package them in a zip file cd render-test/ios/Build - cp ../RenderTestApp_iphoneos13.2-arm64e.xctestrun . - zip testapp.zip -r Debug-iphoneos/RenderTestApp.app - zip testapp.zip RenderTestApp_iphoneos13.2-arm64e.xctestrun + cp ../RenderTestApp_iphoneos13.2-arm64e-release.xctestrun . + zip testapp.zip -r Release-iphoneos/RenderTestApp.app + zip testapp.zip RenderTestApp_iphoneos13.2-arm64e-release.xctestrun gcloud firebase test ios run \ --test testapp.zip \ --device model=iphonexs,version=12.1,locale=en,orientation=portrait --xcode-version=11.1 --timeout 20m \ diff --git a/render-test/ios/AppDelegate.m b/render-test/ios/AppDelegate.m index d86c1ce7ae..874d18de2a 100644 --- a/render-test/ios/AppDelegate.m +++ b/render-test/ios/AppDelegate.m @@ -35,4 +35,4 @@ } -@end
\ No newline at end of file +@end diff --git a/render-test/ios/RenderTestApp_iphoneos13.2-arm64e.xctestrun b/render-test/ios/RenderTestApp_iphoneos13.2-arm64e-debug.xctestrun index b92ac8c32e..b92ac8c32e 100644 --- a/render-test/ios/RenderTestApp_iphoneos13.2-arm64e.xctestrun +++ b/render-test/ios/RenderTestApp_iphoneos13.2-arm64e-debug.xctestrun diff --git a/render-test/ios/RenderTestApp_iphoneos13.2-arm64e-release.xctestrun b/render-test/ios/RenderTestApp_iphoneos13.2-arm64e-release.xctestrun new file mode 100644 index 0000000000..20ce81e9c4 --- /dev/null +++ b/render-test/ios/RenderTestApp_iphoneos13.2-arm64e-release.xctestrun @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>RenderTestAppTests</key> + <dict> + <key>BlueprintName</key> + <string>RenderTestAppTests</string> + <key>BundleIdentifiersForCrashReportEmphasis</key> + <array> + <string>com.mapbox.RenderTestApp</string> + <string>com.mapbox.RenderTestAppTests</string> + </array> + <key>CommandLineArguments</key> + <array/> + <key>DependentProductPaths</key> + <array> + <string>__TESTROOT__/Release-iphoneos/RenderTestApp.app</string> + <string>__TESTROOT__/Release-iphoneos/RenderTestApp.app/PlugIns/RenderTestAppTests.xctest</string> + </array> + <key>EnvironmentVariables</key> + <dict> + <key>OS_ACTIVITY_DT_MODE</key> + <string>YES</string> + <key>SQLITE_ENABLE_THREAD_ASSERTIONS</key> + <string>1</string> + </dict> + <key>IsAppHostedTestBundle</key> + <true/> + <key>ProductModuleName</key> + <string>RenderTestAppTests</string> + <key>RunOrder</key> + <integer>0</integer> + <key>SystemAttachmentLifetime</key> + <string>deleteOnSuccess</string> + <key>TestBundlePath</key> + <string>__TESTHOST__/PlugIns/RenderTestAppTests.xctest</string> + <key>TestHostBundleIdentifier</key> + <string>com.mapbox.RenderTestApp</string> + <key>TestHostPath</key> + <string>__TESTROOT__/Release-iphoneos/RenderTestApp.app</string> + <key>TestLanguage</key> + <string></string> + <key>TestRegion</key> + <string></string> + <key>TestingEnvironmentVariables</key> + <dict> + <key>DYLD_FALLBACK_FRAMEWORK_PATH</key> + <string></string> + <key>DYLD_INSERT_LIBRARIES</key> + <string>__PLATFORMS__/iPhoneOS.platform/Developer/usr/lib/libXCTestBundleInject.dylib</string> + <key>XCInjectBundleInto</key> + <string>unused</string> + </dict> + <key>ToolchainsSettingValue</key> + <array/> + <key>UITargetAppCommandLineArguments</key> + <array/> + <key>UserAttachmentLifetime</key> + <string>deleteOnSuccess</string> + </dict> + <key>__xctestrun_metadata__</key> + <dict> + <key>FormatVersion</key> + <integer>1</integer> + </dict> +</dict> +</plist> diff --git a/render-test/ios/ViewController.m b/render-test/ios/ViewController.m index eb7bbb0754..e9c526122a 100644 --- a/render-test/ios/ViewController.m +++ b/render-test/ios/ViewController.m @@ -11,12 +11,12 @@ - (void)viewDidLoad { [super viewDidLoad]; -// i = [[IosTestRunner alloc]init]; +// In order to run test runner with app itself instead of with unit test, comment out the following line. +// i = [[IosTestRunner alloc]init]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. } @end diff --git a/render-test/ios/codesigning/codesign_all.sh b/render-test/ios/codesigning/codesign_all.sh index caa38731c6..37aad618ee 100755 --- a/render-test/ios/codesigning/codesign_all.sh +++ b/render-test/ios/codesigning/codesign_all.sh @@ -1,8 +1,8 @@ #!/bin/bash -codesign --force --sign $CODESIGNIDENTITY --entitlements ../codesigning/RenderTestApp.app.xcent --timestamp=none ./Debug-iphoneos/RenderTestApp.app -codesign --force --sign $CODESIGNIDENTITY --deep --preserve-metadata=identifier,entitlements,flags --timestamp=none ./Debug-iphoneos/RenderTestApp.app/Frameworks/libXCTestSwiftSupport.dylib -codesign --force --sign $CODESIGNIDENTITY --deep --preserve-metadata=identifier,entitlements,flags --timestamp=none ./Debug-iphoneos/RenderTestApp.app/Frameworks/libXCTestBundleInject.dylib -codesign --force --sign $CODESIGNIDENTITY --deep --preserve-metadata=identifier,entitlements,flags --timestamp=none ./Debug-iphoneos/RenderTestApp.app/Frameworks/XCTAutomationSupport.framework -codesign --force --sign $CODESIGNIDENTITY --deep --preserve-metadata=identifier,entitlements,flags --timestamp=none ./Debug-iphoneos/RenderTestApp.app/Frameworks/XCTest.framework -codesign --force --sign $CODESIGNIDENTITY --deep --entitlements ../codesigning/RenderTestAppTests.xctest.xcent --timestamp=none ./Debug-iphoneos/RenderTestApp.app/PlugIns/RenderTestAppTests.xctest +codesign --force --sign $CODESIGNIDENTITY --entitlements ../codesigning/RenderTestApp.app.xcent --timestamp=none ./Release-iphoneos/RenderTestApp.app +codesign --force --sign $CODESIGNIDENTITY --deep --preserve-metadata=identifier,entitlements,flags --timestamp=none ./Release-iphoneos/RenderTestApp.app/Frameworks/libXCTestSwiftSupport.dylib +codesign --force --sign $CODESIGNIDENTITY --deep --preserve-metadata=identifier,entitlements,flags --timestamp=none ./Release-iphoneos/RenderTestApp.app/Frameworks/libXCTestBundleInject.dylib +codesign --force --sign $CODESIGNIDENTITY --deep --preserve-metadata=identifier,entitlements,flags --timestamp=none ./Release-iphoneos/RenderTestApp.app/Frameworks/XCTAutomationSupport.framework +codesign --force --sign $CODESIGNIDENTITY --deep --preserve-metadata=identifier,entitlements,flags --timestamp=none ./Release-iphoneos/RenderTestApp.app/Frameworks/XCTest.framework +codesign --force --sign $CODESIGNIDENTITY --deep --entitlements ../codesigning/RenderTestAppTests.xctest.xcent --timestamp=none ./Release-iphoneos/RenderTestApp.app/PlugIns/RenderTestAppTests.xctest diff --git a/render-test/ios/tests/Tests.m b/render-test/ios/tests/Tests.m index 9ef36a16f3..7230c5d16c 100644 --- a/render-test/ios/tests/Tests.m +++ b/render-test/ios/tests/Tests.m @@ -14,7 +14,7 @@ [super tearDown]; } -- (void)testExample { +- (void)testStartRenderTestRunner { IosTestRunner* runner = [[IosTestRunner alloc] init]; XCTAssert(runner, @"IOSTestRunner is not initialized correctly"); @@ -27,7 +27,7 @@ NSURL *url = [NSURL fileURLWithPath:result]; XCTAttachment *attachmentURL = [XCTAttachment attachmentWithContentsOfFileAtURL: url]; - XCTAssert(attachmentURL); + XCTAssert(attachmentURL, @"Failed to attach test result '%@'", result); attachmentURL.lifetime = XCTAttachmentLifetimeKeepAlways; [self addAttachment:attachmentURL]; } |