summaryrefslogtreecommitdiff
path: root/platform/ios/scripts
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-04-03 15:16:49 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-04-07 18:01:02 -0700
commitf964e40e7e9220d08751d8607af61ac5a7c0794c (patch)
treed34ca5407188fe3d71396faa8a8acceb52d9bd4b /platform/ios/scripts
parentf5d66f362272db034a311d2077dbdb2937c9bbdf (diff)
downloadqtlocation-mapboxgl-f964e40e7e9220d08751d8607af61ac5a7c0794c.tar.gz
[build] Refactor and simplify build system
* Main gyp files are now standardized as platform/<platform>/platform.gyp. * Each platform gyp file defines appropriate loop_lib and headless_lib variables. * Each platform gyp file includes mbgl.gypi, which defines base targets which may be useful to all platforms. * CI targets are consistent across platforms: `make $(PLATFORM) && make test-$(PLATFORM)`. * Renamed the "linux" test app to "glfw". It's now built in OS X CI. * Android build flakiness is fixed. * iOS CI builds the bench and iosapp targets. * Mesa version is now in one place. * CI scripts use bash "strict mode" and correct error handling. * All build output goes to the build directory. * Removed vestigial iOS/OS X/Android Travis scripts.
Diffstat (limited to 'platform/ios/scripts')
-rwxr-xr-xplatform/ios/scripts/after_failure.sh13
-rw-r--r--platform/ios/scripts/defaults.mk9
-rwxr-xr-xplatform/ios/scripts/install.sh20
-rwxr-xr-xplatform/ios/scripts/package.sh46
-rwxr-xr-xplatform/ios/scripts/run.sh52
-rw-r--r--platform/ios/scripts/setup.sh5
-rwxr-xr-xplatform/ios/scripts/test.sh7
7 files changed, 16 insertions, 136 deletions
diff --git a/platform/ios/scripts/after_failure.sh b/platform/ios/scripts/after_failure.sh
deleted file mode 100755
index 88a6427f75..0000000000
--- a/platform/ios/scripts/after_failure.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-set -o pipefail
-set -u
-
-ls $KIF_SCREENSHOTS/
-
-REPO_NAME=$(basename $TRAVIS_REPO_SLUG)
-
-aws s3 cp $KIF_SCREENSHOTS/ s3://mapbox/$REPO_NAME/ios/tests/$TRAVIS_JOB_NUMBER/ --acl public-read --recursive > /dev/null
-
-echo http://mapbox.s3.amazonaws.com/$REPO_NAME/ios/tests/$TRAVIS_JOB_NUMBER/index.html
diff --git a/platform/ios/scripts/defaults.mk b/platform/ios/scripts/defaults.mk
deleted file mode 100644
index 9debff4ce0..0000000000
--- a/platform/ios/scripts/defaults.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-HEADLESS = eagl
-PLATFORM ?= ios
-ASSET ?= fs
-HTTP ?= nsurl
-LOOP ?= darwin
-
-HOST_VERSION = all
-
-PROVISIONING_PROFILE ?= 19324a54-7455-4f0b-8e1c-e6957c718ebc
diff --git a/platform/ios/scripts/install.sh b/platform/ios/scripts/install.sh
deleted file mode 100755
index 437193b1f2..0000000000
--- a/platform/ios/scripts/install.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-set -o pipefail
-
-git fetch --tags
-
-mapbox_time "checkout_mason" \
-git submodule update --init .mason
-
-mapbox_time "install_recent_git" \
-brew install git
-
-mapbox_time "install_awscli" \
-brew install awscli
-
-mapbox_time "install_jazzy" \
-gem install jazzy
-
-mkdir -p ${KIF_SCREENSHOTS}
diff --git a/platform/ios/scripts/package.sh b/platform/ios/scripts/package.sh
index b0f63478df..02a454aaf7 100755
--- a/platform/ios/scripts/package.sh
+++ b/platform/ios/scripts/package.sh
@@ -72,12 +72,6 @@ echo ${HASH}
echo ${HASH} >> ${VERSION}
-step "Creating build files…"
-export MASON_PLATFORM=ios
-export BUILDTYPE=${BUILDTYPE:-Release}
-export HOST=ios
-make Xcode/ios
-
PROJ_VERSION=$(git rev-list --count HEAD)
if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
@@ -91,13 +85,9 @@ if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
DEPLOYMENT_POSTPROCESSING=YES \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGN_IDENTITY= \
- -project ./build/ios-all/gyp/mbgl.xcodeproj \
+ -project ./build/ios-all/platform/ios/platform.xcodeproj \
-configuration ${BUILDTYPE} \
- -target core \
- -target platform-ios \
- -target http-nsurl \
- -target asset-fs \
- -target headless-eagl \
+ -target platform-lib \
-jobs ${JOBS}
fi
@@ -112,7 +102,7 @@ if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
CURRENT_PROJECT_VERSION=${PROJ_VERSION} \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGN_IDENTITY= \
- -project ./build/ios-all/gyp/ios.xcodeproj \
+ -project ./build/ios-all/platform/ios/platform.xcodeproj \
-configuration ${BUILDTYPE} \
-target iossdk \
-jobs ${JOBS}
@@ -125,13 +115,9 @@ if [[ ${BUILD_STATIC} == true ]]; then
ARCHS="x86_64 i386" \
ONLY_ACTIVE_ARCH=NO \
GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \
- -project ./build/ios-all/gyp/mbgl.xcodeproj \
+ -project ./build/ios-all/platform/ios/platform.xcodeproj \
-configuration ${BUILDTYPE} \
- -target core \
- -target platform-ios \
- -target http-nsurl \
- -target asset-fs \
- -target headless-eagl \
+ -target platform-lib \
-jobs ${JOBS}
fi
@@ -143,13 +129,13 @@ if [[ ${BUILD_DYNAMIC} == true ]]; then
GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \
ENABLE_BITCODE=${ENABLE_BITCODE} \
CURRENT_PROJECT_VERSION=${PROJ_VERSION} \
- -project ./build/ios-all/gyp/ios.xcodeproj \
+ -project ./build/ios-all/platform/ios/platform.xcodeproj \
-configuration ${BUILDTYPE} \
-target iossdk \
-jobs ${JOBS}
fi
-LIBS=(core.a platform-ios.a asset-fs.a http-nsurl.a)
+LIBS=(core.a platform-ios.a)
# https://medium.com/@syshen/create-an-ios-universal-framework-148eb130a46c
if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
@@ -159,22 +145,22 @@ if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
libtool -static -no_warning_for_no_symbols \
`find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojsonvt.a` \
-o ${OUTPUT}/static/${NAME}.framework/${NAME} \
- ${LIBS[@]/#/gyp/build/${BUILDTYPE}-iphoneos/libmbgl-} \
- ${LIBS[@]/#/gyp/build/${BUILDTYPE}-iphonesimulator/libmbgl-}
+ ${LIBS[@]/#/build/ios-all/${BUILDTYPE}-iphoneos/libmbgl-} \
+ ${LIBS[@]/#/build/ios-all/${BUILDTYPE}-iphonesimulator/libmbgl-}
fi
if [[ ${BUILD_DYNAMIC} == true ]]; then
step "Copying dynamic framework into place for iOS devices"
cp -r \
- gyp/build/${BUILDTYPE}-iphoneos/${NAME}.framework \
+ build/ios-all/${BUILDTYPE}-iphoneos/${NAME}.framework \
${OUTPUT}/dynamic/
- cp -r gyp/build/${BUILDTYPE}-iphoneos/${NAME}.framework.dSYM \
+ cp -r build/ios-all/${BUILDTYPE}-iphoneos/${NAME}.framework.dSYM \
${OUTPUT}/dynamic/
step "Merging simulator dynamic library into device dynamic library…"
lipo \
- gyp/build/${BUILDTYPE}-iphoneos/${NAME}.framework/${NAME} \
- gyp/build/${BUILDTYPE}-iphonesimulator/${NAME}.framework/${NAME} \
+ build/ios-all/${BUILDTYPE}-iphoneos/${NAME}.framework/${NAME} \
+ build/ios-all/${BUILDTYPE}-iphonesimulator/${NAME}.framework/${NAME} \
-create -output ${OUTPUT}/dynamic/${NAME}.framework/${NAME} | echo
fi
else
@@ -184,15 +170,15 @@ else
libtool -static -no_warning_for_no_symbols \
`find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojsonvt.a` \
-o ${OUTPUT}/static/${NAME}.framework/${NAME} \
- ${LIBS[@]/#/gyp/build/${BUILDTYPE}-iphonesimulator/libmbgl-}
+ ${LIBS[@]/#/build/ios-all/${BUILDTYPE}-iphonesimulator/libmbgl-}
fi
if [[ ${BUILD_DYNAMIC} == true ]]; then
step "Copying dynamic framework into place for iOS Simulator…"
cp -r \
- gyp/build/${BUILDTYPE}-iphonesimulator/${NAME}.framework \
+ build/ios-all/${BUILDTYPE}-iphonesimulator/${NAME}.framework \
${OUTPUT}/dynamic/${NAME}.framework
- cp -r gyp/build/${BUILDTYPE}-iphonesimulator/${NAME}.framework.dSYM \
+ cp -r build/ios-all/${BUILDTYPE}-iphonesimulator/${NAME}.framework.dSYM \
${OUTPUT}/dynamic/
fi
fi
diff --git a/platform/ios/scripts/run.sh b/platform/ios/scripts/run.sh
deleted file mode 100755
index 44c21e7562..0000000000
--- a/platform/ios/scripts/run.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-set -o pipefail
-set -u
-
-source ./platform/ios/scripts/setup.sh
-
-BUILDTYPE=${BUILDTYPE:-Release}
-
-PUBLISH_TAG=($(git show -s --format=%B | sed -n 's/.*\[publish \([a-z]\{1,\}\)-v\([0-9a-z.\-]\{1,\}\)\].*/\1 \2/p'))
-PUBLISH_PLATFORM=${PUBLISH_TAG[0],-}
-PUBLISH_VERSION=${PUBLISH_TAG[1],-}
-
-
-################################################################################
-# Build
-################################################################################
-
-if [[ ${PUBLISH_PLATFORM} = 'ios' ]]; then
- # default, with debug symbols
- mapbox_time "package_ios_symbols" \
- make ipackage
-
- mapbox_time "deploy_ios_symbols"
- ./platform/ios/scripts/publish.sh "${PUBLISH_VERSION}" symbols
-
- # no debug symbols, for smaller distribution
- mapbox_time "package_ios_stripped" \
- make ipackage-strip
-
- mapbox_time "deploy_ios_stripped"
- ./platform/ios/scripts/publish.sh "${PUBLISH_VERSION}"
-
- # dynamic, with debug symbols
- mapbox_time "package_ios_dynamic" \
- make iframework
-
- mapbox_time "deploy_ios_dynamic"
- ./platform/ios/scripts/publish.sh "${PUBLISH_VERSION}" symbols-dynamic
-
- # dynamic, without debug symbols
- mapbox_time "package_ios_dynamic_stripped" \
- make iframework SYMBOLS=NO
-
- mapbox_time "deploy_ios_dynamic_stripped"
- ./platform/ios/scripts/publish.sh "${PUBLISH_VERSION}" dynamic
-else
- # build & test iOS
- mapbox_time "run_ios_tests" \
- make itest
-fi
diff --git a/platform/ios/scripts/setup.sh b/platform/ios/scripts/setup.sh
deleted file mode 100644
index d115cf9020..0000000000
--- a/platform/ios/scripts/setup.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env bash
-# This script is sourced; do not set -e or -o pipefail here.
-
-# Ensure mason is on the PATH
-export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason"
diff --git a/platform/ios/scripts/test.sh b/platform/ios/scripts/test.sh
deleted file mode 100755
index a2515e6fea..0000000000
--- a/platform/ios/scripts/test.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-set -o pipefail
-set -u
-
-# No tests for now. KIF tests are too unreliable.