[build] add binary size logging to Linux Release builds

This commit is contained in:
Konstantin Käfer
2016-11-07 18:38:01 +01:00
committed by John Firebaugh
parent c78c97f346
commit 223a95a74f
5 changed files with 97 additions and 36 deletions

View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -e
set -o pipefail
if [ "${TRAVIS_PULL_REQUEST_BRANCH:-${TRAVIS_BRANCH}}" = "master" ] && [ "${BUILDTYPE}" = "Release" ]; then
CLOUDWATCH=true platform/linux/scripts/metrics.sh
else
echo "Not logging binary size for branch or Debug build"
fi

View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -e
set -o pipefail
# Generate stripped version
ARCH=$(uname -m)
RENDER=build/linux-${ARCH}/Release/mbgl-render
strip -s -x "${RENDER}" -o "${RENDER}-stripped"
# Track individual architecture
scripts/log_binary_size.sh "${RENDER}-stripped" "Platform=Linux,Compiler=${_CC},Arch=${ARCH}"