@@ -35,7 +35,10 @@ matrix:
|
||||
env: BUILDTYPE=Release JOBS=8
|
||||
compiler: gcc
|
||||
- os: osx
|
||||
env: BUILDTYPE=Debug JOBS=8
|
||||
env: BUILDTYPE=Debug JOBS=8 MASON_PLATFORM=osx
|
||||
compiler: clang
|
||||
- os: osx
|
||||
env: BUILDTYPE=Release JOBS=8 MASON_PLATFORM=ios
|
||||
compiler: clang
|
||||
|
||||
env:
|
||||
|
||||
5
Makefile
5
Makefile
@@ -114,7 +114,7 @@ xproj: xosx-proj
|
||||
Xcode/ios: ios/app/mapboxgl-app.gyp config/ios.gypi styles/styles SMCalloutView
|
||||
deps/run_gyp ios/app/mapboxgl-app.gyp $(CONFIG_ios) $(LIBS_ios) --generator-output=./build/ios -f xcode
|
||||
|
||||
.PHONY: ios-proj ios run-ios
|
||||
.PHONY: ios-proj ios isim ipackage
|
||||
ios-proj: Xcode/ios
|
||||
open ./build/ios/ios/app/mapboxgl-app.xcodeproj
|
||||
|
||||
@@ -124,6 +124,9 @@ ios: Xcode/ios
|
||||
isim: Xcode/ios
|
||||
xcodebuild -sdk iphonesimulator ARCHS="x86_64 i386" -project ./build/ios/ios/app/mapboxgl-app.xcodeproj -configuration Debug -target iosapp -jobs $(JOBS)
|
||||
|
||||
ipackage: clean Xcode/ios
|
||||
./scripts/package_ios.sh
|
||||
|
||||
# Legacy name
|
||||
iproj: ios-proj
|
||||
|
||||
|
||||
24
scripts/publish_ios.sh
Executable file
24
scripts/publish_ios.sh
Executable file
@@ -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}
|
||||
@@ -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 iOS
|
||||
# build & package iOS
|
||||
#
|
||||
mapbox_time "build_ios_project_device_release" \
|
||||
make ios -j$JOBS
|
||||
mapbox_time "build_ios_project_simulator_debug" \
|
||||
make isim -j$JOBS
|
||||
mapbox_time "package_ios"
|
||||
make ipackage
|
||||
#
|
||||
# conditionally deploy iOS build
|
||||
#
|
||||
if [[ -n "$PUBLISH_TAG" ]]; then
|
||||
mapbox_time "deploy_ios"
|
||||
./scripts/publish_ios.sh "$PUBLISH_VERSION"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user