summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/package_ios.sh1
-rwxr-xr-xscripts/publish_ios.sh24
-rwxr-xr-xscripts/travis_script.sh25
-rw-r--r--scripts/valgrind.sup91
4 files changed, 134 insertions, 7 deletions
diff --git a/scripts/package_ios.sh b/scripts/package_ios.sh
index 7f4213bf6c..da55b297ae 100755
--- a/scripts/package_ios.sh
+++ b/scripts/package_ios.sh
@@ -70,6 +70,7 @@ cp -pv include/mbgl/ios/* "${OUTPUT}/static/Headers"
# complications between faked GYP bundles-as-executables, device build
# dependencies, and code signing.
step "Copying Resources..."
+cp -pv LICENSE.md "${OUTPUT}/static"
mkdir -p "${OUTPUT}/static/${NAME}.bundle"
cp -pv platform/ios/resources/* "${OUTPUT}/static/${NAME}.bundle"
cp -prv styles/styles "${OUTPUT}/static/${NAME}.bundle/styles"
diff --git a/scripts/publish_ios.sh b/scripts/publish_ios.sh
new file mode 100755
index 0000000000..f65f3e5609
--- /dev/null
+++ b/scripts/publish_ios.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+set -e
+set -o pipefail
+set -u
+
+#
+# iOS release tag format is `ios-vX.Y.Z`; `X.Y.Z` gets passed in
+#
+PUBLISH_VERSION="$1"
+
+#
+# zip
+#
+cd build/ios/pkg/static
+ZIP=mapbox-gl-ios-${PUBLISH_VERSION}.zip
+rm -f ../${ZIP}
+zip -r ../${ZIP} *
+#
+# upload
+#
+REPO_NAME=$(basename $TRAVIS_REPO_SLUG)
+aws s3 cp ../${ZIP} s3://mapbox/$REPO_NAME/ios/builds/ --acl public-read > /dev/null
+echo http://mapbox.s3.amazonaws.com/$REPO_NAME/ios/builds/${ZIP}
diff --git a/scripts/travis_script.sh b/scripts/travis_script.sh
index 45bda62c37..0351f94144 100755
--- a/scripts/travis_script.sh
+++ b/scripts/travis_script.sh
@@ -1,5 +1,10 @@
#!/usr/bin/env bash
+COMMIT_MESSAGE=$(git show -s --format=%B $1 | tr -d '\n')
+PUBLISH_TAG=$(echo "$COMMIT_MESSAGE" | grep -oE '\[publish [a-z0-9\.\-]+\]' | grep -oE '[a-z0-9\.\-]+' | tail -n1)
+PUBLISH_PLATFORM=$(echo "$PUBLISH_TAG" | awk -F '-v' '{ print $1 }')
+PUBLISH_VERSION=$(echo "$PUBLISH_TAG" | awk -F '-v' '{ print $2 }')
+
set -e
set -o pipefail
@@ -34,18 +39,24 @@ elif [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
mapbox_time_finish
fi
-elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
+elif [[ ${TRAVIS_OS_NAME} == "osx" && ${MASON_PLATFORM} == "osx" ]]; then
#
# build OS X
#
- mapbox_time "build_osx_project" \
+ mapbox_time "build_osx" \
make xosx -j$JOBS
+elif [[ ${TRAVIS_OS_NAME} == "osx" && ${MASON_PLATFORM} == "ios" ]]; then
+ #
+ # build & package iOS
#
- # build iOS
+ mapbox_time "package_ios"
+ make ipackage
#
- mapbox_time "build_ios_project_device_release" \
- make ios -j$JOBS
- mapbox_time "build_ios_project_simulator_debug" \
- make isim -j$JOBS
+ # conditionally deploy iOS build
+ #
+ if [[ -n "$PUBLISH_TAG" ]]; then
+ mapbox_time "deploy_ios"
+ ./scripts/publish_ios.sh "$PUBLISH_VERSION"
+ fi
fi
diff --git a/scripts/valgrind.sup b/scripts/valgrind.sup
new file mode 100644
index 0000000000..fcde049d9c
--- /dev/null
+++ b/scripts/valgrind.sup
@@ -0,0 +1,91 @@
+{
+ Valgrind gets confused with buffers managed by the graphics driver
+ Memcheck:Leak
+ ...
+ obj:/usr/*/dri/r600_dri.so
+ ...
+}
+{
+ GLFW _glfwCreateCursor()
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ ...
+ obj:/usr/*/libX11.so.6.3.0
+ ...
+ fun:_glfwCreateCursor
+ ...
+}
+{
+ GLFW _glfwPlatform*()
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ ...
+ fun:_glfwPlatform*
+ ...
+}
+{
+ Buffer managed by OpenGL?
+ Memcheck:Cond
+ ...
+ fun:_ZN4mbgl*Uniform*
+ ...
+ fun:_ZN8GLFWView10invalidateEv
+ ...
+}
+{
+ Buffer managed by OpenGL?
+ Memcheck:Cond
+ fun:_ZNSt7__equalILb0EE5equalIPKfS3_EEbT_S4_T0_
+ ...
+ fun:_ZN4mbgl7Painter11renderLayerERKNS_10StyleLayerEPKNS_4Tile2IDEPKSt5arrayIfLm16EE
+}
+{
+ Valgrind doesn't like our make_unique (C++14 polyfill)
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ fun:malloc
+ ...
+ fun:_ZN4mbgl4util11make_unique*
+ ...
+}
+{
+ dlopen doing its magic
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ ...
+ fun:_dl_open
+ ...
+}
+{
+ X11 false positive
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ ...
+ obj:/usr/*/libX11.so.6.3.0
+ ...
+ fun:_XrmInitParseInfo
+ ...
+}
+{
+ OpenSSL false positive
+ Memcheck:Leak
+ ...
+ fun:CRYPTO_malloc
+ ...
+}
+{
+ OpenSSL false positive
+ Memcheck:Leak
+ ...
+ fun:CRYPTO_realloc
+ ...
+}
+{
+ Libcurl false positive
+ Memcheck:Leak
+ fun:malloc
+ ...
+ obj:/usr/*/libcurl.so.4.3.0
+ fun:curl_multi_socket_action
+ ...
+}