-
-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release build scripts for Metal support #50
Changes from all commits
d75d5c3
cfb505b
8abe97e
5f90fcc
1af8d5d
c2edda0
ec35f94
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,21 @@ let package = Package( | |
products: [ | ||
.library( | ||
name: "Mapbox", | ||
targets: ["Mapbox"]) | ||
targets: ["Mapbox"]), | ||
.library( | ||
name: "MetalANGLE", | ||
targets: ["MetalANGLE"]) | ||
], | ||
dependencies: [ | ||
], | ||
targets: [ | ||
.binaryTarget( | ||
name: "Mapbox", | ||
url: "MAPBOX_PACKAGE_URL", | ||
checksum: "MAPBOX_PACKAGE_CHECKSUM") | ||
checksum: "MAPBOX_PACKAGE_CHECKSUM"), | ||
.binaryTarget( | ||
name: "MetalANGLE", | ||
url: "METAL_ANGLE_PACKAGE_URL", | ||
checksum: "METAL_ANGLE_PACKAGE_CHECKSUM") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For future reviewers (assume Petr already knows this) Please see notes at maplibre/maplibre-gl-native-distribution#5 on how to test locally built |
||
] | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,11 +12,7 @@ LOG_PATH=build/xcodebuild-$(date +"%Y-%m-%d_%H%M%S").log | |
|
||
BUILD_DOCS=${BUILD_DOCS:-true} | ||
SYMBOLS=${SYMBOLS:-YES} | ||
|
||
BUILDTYPE=${BUILDTYPE:-Debug} | ||
if [[ ${SYMBOLS} == YES && ${BUILDTYPE} == Release ]]; then | ||
BUILDTYPE='RelWithDebInfo' | ||
fi | ||
|
||
FORMAT=${FORMAT:-dynamic} | ||
if [[ ${FORMAT} != "dynamic" ]]; then | ||
|
@@ -51,6 +47,11 @@ PROJ_VERSION=$(git rev-list --count HEAD) | |
SEM_VERSION=$( git describe --tags --match=ios-v*.*.* --abbrev=0 | sed 's/^ios-v//' ) | ||
SHORT_VERSION=${SEM_VERSION%-*} | ||
|
||
echo "Version=${SHORT_VERSION}" | ||
|
||
step "Fetching MetalANGLE dependencies" | ||
platform/ios/vendor/metalangle/ios/xcode/fetchDependencies.sh | ||
|
||
step "Building targets (build ${PROJ_VERSION}, version ${SEM_VERSION})" | ||
|
||
SCHEME='dynamic' | ||
|
@@ -127,6 +128,16 @@ echo "Creating ${NAME}.xcframework with args: $BUILD_ARGS" | |
xcodebuild -create-xcframework $BUILD_ARGS | ||
echo "${NAME}.xcframework created" | ||
|
||
# MetalANGLE | ||
METAL_ANGLE_NAME="MetalANGLE" | ||
BUILD_ARGS="" | ||
BUILD_ARGS="$BUILD_ARGS -output ${BINOUT}/${METAL_ANGLE_NAME}.xcframework" | ||
addFramework "${BINOUT}/${NAME}-iphoneos.xcarchive" ${METAL_ANGLE_NAME} ${INCLUDE_DEBUG_SYMBOLS} | ||
addFramework "${BINOUT}/${NAME}-iphonesimulator.xcarchive" ${METAL_ANGLE_NAME} ${INCLUDE_DEBUG_SYMBOLS} | ||
echo "Creating ${METAL_ANGLE_NAME}.xcframework with args: $BUILD_ARGS" | ||
xcodebuild -create-xcframework $BUILD_ARGS | ||
echo "${METAL_ANGLE_NAME}.xcframework created" | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This works great! |
||
step "Copying library resources…" | ||
cp -pv LICENSE.md ${OUTPUT} | ||
sed -n -e '/^## /,$p' platform/ios/CHANGELOG.md > "${OUTPUT}/CHANGELOG.md" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version numbers of the binaries are as below, but I think this script pulls the
{PUBLISH_VERSION}
from the git tags. If we cannot tag the MetalANGLE, then we may be able to use the binaries version as it is on disk.