Skip to content

Commit

Permalink
Merge branch 'main' into alasram/android_tile_lod_controls
Browse files Browse the repository at this point in the history
  • Loading branch information
louwers authored Nov 14, 2024
2 parents a1f6780 + 38bf215 commit c1b30b6
Show file tree
Hide file tree
Showing 93 changed files with 3,878 additions and 1,453 deletions.
139 changes: 0 additions & 139 deletions .github/actions/aws-device-farm-run/action.yml

This file was deleted.

11 changes: 10 additions & 1 deletion .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,11 @@ jobs:
- name: Build libmaplibre.so for arm-v8
run: make android-lib-arm-v8

- name: Build documentation
- name: Build API documentation
run: ./gradlew dokkaHtml

- name: Build Examples documentation
run: make mkdocs-build

- name: Copy developer config with API key for UI tests
if: github.ref == 'refs/heads/main'
Expand All @@ -162,6 +165,12 @@ jobs:
cp MapLibreAndroidTestApp/build/outputs/apk/drawable/release/MapLibreAndroidTestApp-drawable-release.apk .
cp MapLibreAndroidTestApp/build/outputs/apk/androidTest/drawable/release/MapLibreAndroidTestApp-drawable-release-androidTest.apk .
# https://developer.android.com/guide/practices/page-sizes
- name: Check alignment of .apk
run: |
unzip -o MapLibreAndroidTestApp/build/outputs/apk/drawable/release/MapLibreAndroidTestApp-drawable-release.apk -d /tmp/my_apk_out
scripts/check-alignment.sh /tmp/my_apk_out
- name: Create artifact for benchmark APKs
uses: actions/upload-artifact@v4
with:
Expand Down
60 changes: 25 additions & 35 deletions .github/workflows/android-device-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- id: parent_workflow
run: |
conclusion=$(curl ${{ github.event.workflow_run.jobs_url }} | jq -r '.jobs[] | select(.name == "android-build").conclusion')
Expand Down Expand Up @@ -130,53 +134,39 @@ jobs:
aws-region: us-west-2
role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }}
role-session-name: ${{ github.run_id }}

- name: Upload external data
if: env.run_device_test == 'true'
role-duration-seconds: 14400

- name: Run ${{ matrix.test.name }} on AWS Device Farm
run: |
export RESULTS_API=${{ secrets.MLN_RESULTS_API }}
export AWS_DEVICE_FARM_PROJECT_ARN=${{ vars.AWS_DEVICE_FARM_PROJECT_ARN }}
upload_arn="$(.github/workflows/android-device-test/upload-external-data.sh)"
echo external_data_arn="$upload_arn" >> "$GITHUB_ENV"
- uses: ./.github/actions/aws-device-farm-run
id: aws_device_farm_run
if: env.run_device_test == 'true'
with:
name: ${{ matrix.test.name }}
appType: ANDROID_APP
appFile: ${{ matrix.test.appFile }}
testFile: ${{ matrix.test.testFile }}
testPackageType: INSTRUMENTATION_TEST_PACKAGE
testType: INSTRUMENTATION
testFilter: ${{ matrix.test.testFilter }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ROLE_TO_ASSUME: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }}
AWS_DEVICE_FARM_PROJECT_ARN: ${{ vars.AWS_DEVICE_FARM_PROJECT_ARN }}
AWS_DEVICE_FARM_DEVICE_POOL_ARN: ${{ matrix.test.devicePool }}
externalData: ${{ env.external_data_arn }}
testSpecArn: ${{ matrix.test.testSpecArn }}
export name="${{ matrix.test.name }}"
export appType=ANDROID_APP
export appFile="${{ matrix.test.appFile }}"
export testFile="${{ matrix.test.testFile }}"
export testPackageType=INSTRUMENTATION_TEST_PACKAGE
export testType=INSTRUMENTATION
export testFilter="${{ matrix.test.testFilter }}"
export AWS_DEVICE_FARM_PROJECT_ARN="${{ vars.AWS_DEVICE_FARM_PROJECT_ARN }}"
export AWS_DEVICE_FARM_DEVICE_POOL_ARN="${{ matrix.test.devicePool }}"
export testSpecArn="${{ matrix.test.testSpecArn }}"
export wait_for_completion=true
echo run_arn="$(./scripts/aws-device-farm/aws-device-farm-run.sh)" > "$GITHUB_ENV"
- name: Store Test Artifacts
if: (matrix.test.name == 'Android Benchmark' || failure()) && env.run_device_test == 'true'
run: |
npm install
results_dir="$(mktemp -d)"
echo results_dir="$results_dir" >> "$GITHUB_ENV"
node scripts/aws-device-farm/store-test-artifacts.mjs --runArn ${{ steps.aws_device_farm_run.outputs.runArn }} --outputDir "$results_dir"
zip -r test_artifacts.zip ${{ env.results_dir }}
node scripts/aws-device-farm/store-test-artifacts.mjs --runArn ${{ env.run_arn }} --outputDir "$results_dir"
zip -r test_artifacts.zip "$results_dir"
- name: Store Benchmark Results
if: matrix.test.name == 'Android Benchmark' && env.run_device_test == 'true'
run: |
for zipfile in ${{ env.results_dir }}/*.zip; do
unzip "$zipfile" -d "${zipfile%.zip}"
done
find "${{ env.results_dir }}" -name 'benchmark_results.json' | while read -r benchmark_json; do
aws s3 cp "$benchmark_json" "s3://maplibre-native/android-benchmark-render/$(uuidgen).json"
done
benchmark_results_dir="$(mktemp -d)"
node scripts/aws-device-farm/collect-benchmark-outputs.mjs --inputDir "${{ env.results_dir }}" --outputDir "$benchmark_results_dir"
node scripts/aws-device-farm/upload-benchmark-outputs-to-s3.mjs --dir "$benchmark_results_dir"
- name: Upload Test Artifacts
if: (matrix.test.name == 'Android Benchmark' || failure()) && env.run_device_test == 'true'
Expand Down
46 changes: 0 additions & 46 deletions .github/workflows/android-device-test/upload-external-data.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/gh-pages-android-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: ./gradlew dokkaHtml

- name: Deploy 🚀
uses: JamesIves/[email protected].8
uses: JamesIves/[email protected].9
with:
branch: gh-pages
folder: platform/android/MapLibreAndroid/build/dokka/html
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/gh-pages-android-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: gh-pages-android-examples

on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'platform/android/**'

jobs:
gh-pages-android-examples:
runs-on: ubuntu-latest
defaults:
run:
working-directory: platform/android
shell: bash
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Generate documentation
run: make mkdocs-build

- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: platform/android/site
target-folder: maplibre-native/android/examples/
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages-cpp-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: doxygen

- name: Deploy 🚀
uses: JamesIves/[email protected].8
uses: JamesIves/[email protected].9
with:
branch: gh-pages
folder: docs/doxygen/html
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages-mdbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
name: book
path: artifacts/book
- name: Deploy
uses: JamesIves/[email protected].8
uses: JamesIves/[email protected].9
with:
branch: gh-pages
folder: artifacts/book
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ jobs:
- name: Deploy DocC documentation (main) 🚀
if: github.ref == 'refs/heads/main'
uses: JamesIves/[email protected].8
uses: JamesIves/[email protected].9
continue-on-error: true
with:
branch: gh-pages
Expand Down
Loading

0 comments on commit c1b30b6

Please sign in to comment.