summaryrefslogtreecommitdiff
path: root/platform/ios
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-04-07 18:55:48 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-04-11 11:00:34 -0700
commit1c7c5af69df3edc19ba48697d350de087b9243cf (patch)
treec9538a61d974634db4aa6f3ae20d4ff9078ad75e /platform/ios
parentc507b8a693d91dea1b0018f9105553128a245146 (diff)
downloadqtlocation-mapboxgl-1c7c5af69df3edc19ba48697d350de087b9243cf.tar.gz
[ios] Run core unit tests in CI
Diffstat (limited to 'platform/ios')
-rw-r--r--platform/ios/INSTALL.md7
-rw-r--r--platform/ios/bitrise.yml2
-rw-r--r--platform/ios/platform.gyp35
3 files changed, 44 insertions, 0 deletions
diff --git a/platform/ios/INSTALL.md b/platform/ios/INSTALL.md
index 416bbc6381..4c769cedc4 100644
--- a/platform/ios/INSTALL.md
+++ b/platform/ios/INSTALL.md
@@ -20,6 +20,13 @@ The Mapbox iOS SDK and iosapp demo application build against the iOS 7.0 SDK. Th
[sudo] gem install jazzy
```
+1. Install ios-sim version 3.2.0 (not any other version) for running `make test-ios`:
+
+ ```
+ brew tap mapbox/homebrew-ios-sim-3
+ brew install mapbox/homebrew-ios-sim-3/ios-sim
+ ```
+
1. Run `make ipackage`. The packaging script will produce a `build/ios/pkg/` folder containing:
- a `dynamic` folder containing a dynamically-linked fat framework with debug symbols for devices and the iOS Simulator
- a `static` folder containing a statically-linked framework with debug symbols for devices and the iOS Simulator
diff --git a/platform/ios/bitrise.yml b/platform/ios/bitrise.yml
index 83dba2239e..3d1e34ae47 100644
--- a/platform/ios/bitrise.yml
+++ b/platform/ios/bitrise.yml
@@ -29,6 +29,8 @@ workflows:
- content: |-
#!/bin/bash
set -eu -o pipefail
+ brew tap mapbox/homebrew-ios-sim-3
+ brew install mapbox/homebrew-ios-sim-3/ios-sim
gem install jazzy --no-rdoc --no-ri
export BUILDTYPE=Debug
make ios
diff --git a/platform/ios/platform.gyp b/platform/ios/platform.gyp
index f182767b56..b4190d6fef 100644
--- a/platform/ios/platform.gyp
+++ b/platform/ios/platform.gyp
@@ -10,6 +10,7 @@
},
'includes': [
'../../mbgl.gypi',
+ '../../test/test.gypi',
],
'target_defaults': {
'target_conditions': [
@@ -34,6 +35,40 @@
},
'targets': [
{
+ 'target_name': 'test',
+ 'type': 'executable',
+ 'product_name': 'ios-test',
+ 'product_extension': 'app',
+ 'mac_bundle': 1,
+
+ 'dependencies': [
+ 'test-lib',
+ 'platform-lib',
+ ],
+
+ 'sources': [
+ '../../test/src/main.mm',
+# '../../src/mbgl/util/premultiply.cpp',
+ ],
+
+ 'xcode_settings': {
+ 'SDKROOT': 'iphoneos',
+ 'SUPPORTED_PLATFORMS': 'iphonesimulator iphoneos',
+ 'INFOPLIST_FILE': '../../test/src/app-info.plist',
+ 'IPHONEOS_DEPLOYMENT_TARGET': '8.0',
+ 'TARGETED_DEVICE_FAMILY': '1,2',
+ 'COPY_PHASE_STRIP': 'NO',
+ 'CLANG_ENABLE_OBJC_ARC': 'YES',
+ 'CLANG_ENABLE_MODULES': 'YES',
+ 'CODE_SIGN_IDENTITY': 'iPhone Developer',
+ },
+
+ 'copies': [{
+ 'destination': '<(PRODUCT_DIR)/$(WRAPPER_NAME)/test',
+ 'files': [ '../../test/fixtures' ],
+ }]
+ },
+ {
'target_name': 'platform-lib',
'product_name': 'mbgl-platform-ios',
'type': 'static_library',