* [android] - disable building x86-64 on CI for scheduled workflow. Broken with NDK14. * corrected abis flag for gradle invocation * add mips 64
236 lines
9.8 KiB
YAML
236 lines
9.8 KiB
YAML
---
|
|
format_version: 1.0.0
|
|
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
|
|
trigger_map:
|
|
- pattern: devicefarmUpload
|
|
workflow: devicefarmUpload
|
|
- pattern: scheduled
|
|
workflow: scheduled
|
|
- pattern: nightly-release
|
|
workflow: nightly-release
|
|
- pattern: "*"
|
|
workflow: primary
|
|
workflows:
|
|
primary:
|
|
steps:
|
|
- script:
|
|
title: Build libmapbox-gl.so for armeabi-v7a
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
echo "Compile libmapbox-gl.so for armeabi-v7a abi:"
|
|
ccache -z
|
|
BUILDTYPE=Debug make android-lib-arm-v7
|
|
ccache -s
|
|
- script:
|
|
title: Compile Core tests
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
echo "Compiling core tests:"
|
|
ccache -z
|
|
BUILDTYPE=Debug make android-test-lib-arm-v7
|
|
ccache -s
|
|
- script:
|
|
title: Run local JVM Unit tests on phone module
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
echo "Running unit tests from MapboxGLAndroidSDKTestApp/src/test:"
|
|
make run-android-unit-test
|
|
- script:
|
|
title: Run local JVM Unit tests on wear module
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
echo "Running unit tests from MapboxGLAndroidSDKWearTestApp/src/test:"
|
|
make run-android-wear-unit-test
|
|
- script:
|
|
title: Generate Espresso sanity tests
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
echo "Generate these test locally by executing:"
|
|
make test-code-android
|
|
- script:
|
|
title: Run Checkstyle
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
# Run checkstyle gradle task on all modules
|
|
make android-checkstyle
|
|
- script:
|
|
title: Run Firebase instrumentation tests
|
|
run_if: '{{getenv "BITRISEIO_GCLOUD_SERVICE_ACCOUNT_JSON_URL" | ne ""}}'
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
set -euo pipefail
|
|
echo "Downloading Google Cloud authentication:"
|
|
wget -O secret.json "$BITRISEIO_GCLOUD_SERVICE_ACCOUNT_JSON_URL"
|
|
|
|
echo "Downloading Mapbox accesstoken for running tests:"
|
|
wget -O platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/developer-config.xml "$BITRISEIO_TEST_ACCESS_TOKEN_UI_TEST_URL"
|
|
|
|
echo "Build seperate test apk:"
|
|
ccache -z
|
|
make android-ui-test-arm-v7
|
|
ccache -s
|
|
|
|
echo "Run tests on firebase:"
|
|
gcloud auth activate-service-account --key-file secret.json --project android-gl-native
|
|
gcloud beta test android devices list
|
|
gcloud beta test android run --type instrumentation --app platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/MapboxGLAndroidSDKTestApp-debug.apk --test platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/MapboxGLAndroidSDKTestApp-debug-androidTest.apk --device-ids shamu --os-version-ids 22 --locales en --orientations portrait --timeout 15m --test-targets "class com.mapbox.mapboxsdk.testapp.maps.widgets.AttributionTest"
|
|
- script:
|
|
title: Download Firebase results
|
|
is_always_run: true
|
|
run_if: '{{getenv "BITRISEIO_GCLOUD_SERVICE_ACCOUNT_JSON_URL" | ne ""}}'
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
set -euo pipefail
|
|
mkdir -p platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk
|
|
|
|
echo "The details from Firebase will be downloaded, zipped and attached as a build artefact."
|
|
testUri=$(gsutil ls "gs://test-lab-wrrntqk05p31w-h3y1qk44vuunw/" | tail -n1)
|
|
echo "Downloading from : "$testUri
|
|
gsutil -m cp -R -Z $testUri platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk
|
|
|
|
echo "Try running ndk-stack on downloaded logcat to symbolicate the stacktraces:"
|
|
find platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk -type f -name "logcat" -print0 | xargs -0 -Imylogcat mv -i mylogcat ./
|
|
cat logcat | ndk-stack -sym build/android-arm-v7/Debug
|
|
- deploy-to-bitrise-io:
|
|
inputs:
|
|
- deploy_path: platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk
|
|
- is_compress: 'true'
|
|
- notify_user_groups: none
|
|
- slack:
|
|
title: Post to Slack
|
|
inputs:
|
|
- webhook_url: "$SLACK_HOOK_URL"
|
|
- channel: "#gl-bots"
|
|
- from_username: 'Bitrise Android'
|
|
- from_username_on_error: 'Bitrise Android'
|
|
- message: '<${BITRISE_BUILD_URL}|Build #${BITRISE_BUILD_NUMBER}>
|
|
for <https://github.com/mapbox/mapbox-gl-native/compare/${BITRISE_GIT_BRANCH}|mapbox/mapbox-gl-native@${BITRISE_GIT_BRANCH}>
|
|
by ${GIT_CLONE_COMMIT_COMMITER_NAME}
|
|
passed'
|
|
- message_on_error: '<${BITRISE_BUILD_URL}|Build #${BITRISE_BUILD_NUMBER}>
|
|
for <https://github.com/mapbox/mapbox-gl-native/compare/${BITRISE_GIT_BRANCH}|mapbox/mapbox-gl-native@${BITRISE_GIT_BRANCH}>
|
|
by ${GIT_CLONE_COMMIT_COMMITER_NAME}
|
|
failed'
|
|
- icon_url: https://bitrise-public-content-production.s3.amazonaws.com/slack/bitrise-slack-icon-128.png
|
|
- icon_url_on_error: https://bitrise-public-content-production.s3.amazonaws.com/slack/bitrise-slack-error-icon-128.png
|
|
scheduled:
|
|
steps:
|
|
- script:
|
|
title: Download maven credentials
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
aws s3 cp s3://mapbox/android/signing-credentials/secring.gpg platform/android/MapboxGLAndroidSDK/secring.gpg
|
|
|
|
# Add maven credentals for publishing
|
|
echo "NEXUS_USERNAME=$PUBLISH_NEXUS_USERNAME
|
|
NEXUS_PASSWORD=$PUBLISH_NEXUS_PASSWORD
|
|
signing.keyId=$SIGNING_KEYID
|
|
signing.password=$SIGNING_PASSWORD
|
|
signing.secretKeyRingFile=secring.gpg" >> platform/android/MapboxGLAndroidSDK/gradle.properties
|
|
- script:
|
|
title: Build release
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
echo "Compile libmapbox-gl.so for all supportd abi's:"
|
|
BUILDTYPE=Release make android-lib-arm-v5
|
|
BUILDTYPE=Release make android-lib-arm-v7
|
|
BUILDTYPE=Release make android-lib-arm-v8
|
|
BUILDTYPE=Release make android-lib-x86
|
|
BUILDTYPE=Release make android-lib-mips
|
|
BUILDTYPE=Release make android-lib-mips-64
|
|
cd platform/android && ./gradlew -Pmapbox.abis=armeabi-v7a MapboxGLAndroidSDK:assembleRelease
|
|
- script:
|
|
title: Publish to maven
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
echo "Upload aar file to maven:"
|
|
make run-android-upload-archives
|
|
- slack:
|
|
title: Post to Slack
|
|
inputs:
|
|
- webhook_url: "$SLACK_HOOK_URL"
|
|
- channel: "#gl-bots"
|
|
- from_username: 'Bitrise Android'
|
|
- from_username_on_error: 'Bitrise Android'
|
|
- message: '<${BITRISE_BUILD_URL}|Build #${BITRISE_BUILD_NUMBER}> Publish of nightly Android SDK SNAPSHOT to maven succeeded.'
|
|
- message_on_error: '<${BITRISE_BUILD_URL}|Build #${BITRISE_BUILD_NUMBER}> Publish of nightly Android SDK SNAPSHOT to maven failed. @android_team.'
|
|
- icon_url: https://bitrise-public-content-production.s3.amazonaws.com/slack/bitrise-slack-icon-128.png
|
|
- icon_url_on_error: https://bitrise-public-content-production.s3.amazonaws.com/slack/bitrise-slack-error-icon-128.png
|
|
devicefarmUpload:
|
|
steps:
|
|
- script:
|
|
title: Build release
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
echo "Compile libmapbox-gl.so for all supportd abi's:"
|
|
export BUILDTYPE=Release
|
|
make apackage
|
|
- script:
|
|
title: Add AWS credentials
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
echo "AWS_ACCESS_KEY_ID_DEVICE_FARM=$AWS_ACCESS_KEY_ID_DEVICE_FARM" >> platform/android/MapboxGLAndroidSDKTestApp/gradle.properties
|
|
echo "AWS_SECRET_ACCESS_KEY_DEVICE_FARM=$AWS_SECRET_ACCESS_KEY_DEVICE_FARM" >> platform/android/MapboxGLAndroidSDKTestApp/gradle.properties
|
|
- script:
|
|
title: Generate sanity tests
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
echo "Generate these test locally by executing:"
|
|
make test-code-android
|
|
- script:
|
|
title: Run AWS Device Farm instrumentation tests
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
echo "Run tests on device farm:"
|
|
make run-android-ui-test-aws
|
|
- slack:
|
|
title: Post to Slack
|
|
inputs:
|
|
- webhook_url: "$SLACK_HOOK_URL"
|
|
- channel: "#gl-bots"
|
|
- from_username: 'Bitrise Android'
|
|
- from_username_on_error: 'Bitrise Android'
|
|
- message: '<${BITRISE_BUILD_URL}|Build #${BITRISE_BUILD_NUMBER}> for devicefarmUpload passed'
|
|
- message_on_error: '<${BITRISE_BUILD_URL}|Build #${BITRISE_BUILD_NUMBER}> for devicefarmUpload failed'
|
|
- icon_url: https://bitrise-public-content-production.s3.amazonaws.com/slack/bitrise-slack-icon-128.png
|
|
- icon_url_on_error: https://bitrise-public-content-production.s3.amazonaws.com/slack/bitrise-slack-error-icon-128.png
|
|
nightly-release:
|
|
steps:
|
|
- script:
|
|
title: Configure AWS-CLI
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
apt-get install -y python-pip python-dev build-essential
|
|
pip install awscli
|
|
- script:
|
|
title: Build release
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
echo "Compile libmapbox-gl.so for all supportd abi's:"
|
|
export BUILDTYPE=Release
|
|
make apackage
|
|
- script:
|
|
title: Log metrics
|
|
inputs:
|
|
- content: |-
|
|
#!/bin/bash
|
|
echo "Log binary size metrics to AWS CloudWatch:"
|
|
CLOUDWATCH=true platform/android/scripts/metrics.sh
|