Update Plugins for MapLibre Native Android v11 #75
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
workflow_dispatch: | |
push: | |
tags-ignore: | |
- '**' | |
paths-ignore: | |
- ".github/**" | |
- "README.md" | |
- ".gitignore" | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
env: | |
LIBSYSCONFCPUS: 8 | |
JOBS: 8 | |
BUILDTYPE: Release | |
IS_LOCAL_DEVELOPMENT: false | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
- name: Download Dependencies | |
run: ./gradlew androidDependencies | |
- name: Run nitpick | |
run: ./gradlew plugin-annotation:nitpick | |
- name: Check Java code style | |
run: make checkstyle | |
- name: Build Plugins SDK | |
run: make build-release | |
- name: Run unit tests | |
run: make test | |
- name: Generate Activity Sanity tests | |
run: make generate-sanity-test | |
- name: Build testapp APK | |
run: | | |
./gradlew accessToken | |
./gradlew app:assembleDebug | |
env: | |
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }} | |
- name: Build Test APK | |
run: | | |
./gradlew app:assembleAndroidTest | |
- name: Build release to test ProGuard rules | |
run: ./gradlew app:assembleRelease | |
# https://cloud.google.com/iam/docs/creating-managing-service-account-keys | |
- name: Log in to Google Cloud Platform | |
run: | | |
GLCLOUD_SERVICE_JSON='${{ secrets.GLCLOUD_SERVICE_JSON }}' | |
if [ -n "${GCLOUD_SERVICE_ACCOUNT_JSON}" ]; then | |
echo "${GCLOUD_SERVICE_ACCOUNT_JSON}" > secret.json | |
gcloud auth activate-service-account --key-file secret.json --project maptiler-gl-mobile | |
rm secret.json | |
fi | |
- name: Run instrumentation tests on Firebase | |
run: | | |
GLCLOUD_SERVICE_JSON='${{ secrets.GLCLOUD_SERVICE_JSON }}' | |
if [ -n "${GCLOUD_SERVICE_ACCOUNT_JSON}" ]; then | |
gcloud firebase test android models list | |
gcloud firebase test android run --type instrumentation \ | |
--app app/build/outputs/apk/debug/app-debug.apk \ | |
--test app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \ | |
--device-ids sailfish --os-version-ids 26 --locales en --orientations portrait --timeout 20m | |
fi |