Skip to content

Commit

Permalink
Merge branch 'main' into wide-line-gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
stefankarschti committed May 20, 2024
2 parents cd86a64 + 1d0fc57 commit ca0de02
Show file tree
Hide file tree
Showing 1,739 changed files with 19,886 additions and 18,579 deletions.
6 changes: 3 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# https://github.com/aspect-build/rules_js/issues/1408
startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1

# TODO: remove with bazel 7.x
common --enable_bzlmod

common --enable_platform_specific_config
# TODO: remove once bazel flips this flag
common --incompatible_disallow_empty_glob

coverage --experimental_ui_max_stdouterr_bytes=10485760

common:macos --linkopt=-L/opt/homebrew/lib
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.0
7.1.0
6 changes: 5 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ BinPackParameters: false
ColumnLimit: 120
IncludeBlocks: Preserve
IndentWidth: 4
Language: Cpp
PackConstructorInitializers: Never
PenaltyBreakAssignment: 80
SortIncludes: false
SpacesBeforeTrailingComments: 1
Standard: c++17
---
Language: Cpp
---
Language: ObjC
BasedOnStyle: Google
...
1 change: 1 addition & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ self-hosted-runner:
# Labels of self-hosted runner in array of strings.
labels:
- macos-14 # can be removed once actionlint is updated
- ubuntu-24.04 # can be removed once actionlint is updated
# Configuration variables in array of strings defined in your repository or
# organization. `null` means disabling configuration variables check.
# Empty array means no configuration variable is allowed.
Expand Down
8 changes: 8 additions & 0 deletions .github/actions/aws-device-farm-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ inputs:
testSpecArn:
description: "ARN of test spec"
required: false
outputs:
runArn:
description: ARN of run
value: ${{ steps.schedule_run.outputs.runArn }}
runs:
using: "composite"
steps:
Expand Down Expand Up @@ -107,6 +111,7 @@ runs:
done
- name: Schedule test run
id: schedule_run
shell: bash
run: |
arn="$(aws devicefarm schedule-run \
Expand All @@ -116,8 +121,11 @@ runs:
--device-pool-arn ${{ inputs.AWS_DEVICE_FARM_DEVICE_POOL_ARN }} \
--test type=${{ inputs.testType }},testPackageArn=${{ env.test_package_arn }}${{ inputs.testFilter && ',filter=' }}${{ inputs.testFilter }}${{ inputs.testSpecArn && ',testSpecArn=' }}${{ inputs.testSpecArn }} \
${{ inputs.externalData && '--configuration extraDataPackageArn=' }}${{ inputs.externalData }} \
--execution-configuration videoCapture=false \
--output text --query "run.arn")"
echo "runArn=$arn" >> "$GITHUB_OUTPUT"
# wait until result is not PENDING
# https://awscli.amazonaws.com/v2/documentation/api/latest/reference/devicefarm/get-run.html#output
while true; do
Expand Down
1 change: 1 addition & 0 deletions .github/changed-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ ios:
- 'BUILD.bazel'
- '.bazelrc'
- '.bazelversion'
- 'pnpm-lock.yaml'
android:
- 'CMakeLists.txt'
- 'platform/android/**'
Expand Down
19 changes: 18 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,23 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
open-pull-requests-limit: 1
directory: '/'
schedule:
interval: 'daily'
interval: 'weekly'
ignore:
- dependency-name: 'codecov/codecov-action'
versions: ['4']
groups:
dependencies:
patterns:
- '*'
- package-ecosystem: 'gradle'
open-pull-requests-limit: 1
directory: '/platform/android'
schedule:
interval: 'weekly'
groups:
dependencies:
patterns:
- '*'
120 changes: 15 additions & 105 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Get all Android files that have changed
if: github.event_name != 'workflow_dispatch'
id: changed-files
uses: tj-actions/changed-files@v42
uses: tj-actions/changed-files@v44
with:
files_yaml_from_source_file: .github/changed-files.yml

Expand Down Expand Up @@ -106,105 +106,51 @@ jobs:
- name: Run Android unit tests
run: make run-android-unit-test

- name: Build libmapbox-gl.so for arm-v8
- name: Build libmaplibre.so for arm-v8
run: make android-lib-arm-v8

- name: Copy developer config with API key for UI tests
if: github.ref == 'refs/heads/main'
run: |
MAPLIBRE_DEVELOPER_CONFIG_XML='${{ secrets.MAPLIBRE_DEVELOPER_CONFIG_XML }}'
if [ -n "${MAPLIBRE_DEVELOPER_CONFIG_XML}" ]; then
echo "${MAPLIBRE_DEVELOPER_CONFIG_XML}" > MapboxGLAndroidSDKTestApp/src/main/res/values/developer-config.xml
echo "${MAPLIBRE_DEVELOPER_CONFIG_XML}" > MapLibreAndroidTestApp/src/main/res/values/developer-config.xml
else
echo "No secrets.MAPLIBRE_DEVELOPER_CONFIG_XML variable set, not copying..."
fi
- name: Build Benchmark, copy to platform/android
if: github.ref != 'refs/heads/main'
run: |
./gradlew assembleDrawableRelease assembleDrawableReleaseAndroidTest -PtestBuildType=release
cp MapboxGLAndroidSDKTestApp/build/outputs/apk/drawable/release/MapboxGLAndroidSDKTestApp-drawable-release.apk .
cp MapboxGLAndroidSDKTestApp/build/outputs/apk/androidTest/drawable/release/MapboxGLAndroidSDKTestApp-drawable-release-androidTest.apk .
cp MapLibreAndroidTestApp/build/outputs/apk/drawable/release/MapLibreAndroidTestApp-drawable-release.apk .
cp MapLibreAndroidTestApp/build/outputs/apk/androidTest/drawable/release/MapLibreAndroidTestApp-drawable-release-androidTest.apk .
- name: Create artifact for benchmark APKs
uses: actions/upload-artifact@v4
if: github.ref != 'refs/heads/main'
with:
if-no-files-found: error
name: benchmarkAPKs
path: |
platform/android/MapboxGLAndroidSDKTestApp-drawable-release.apk
platform/android/MapboxGLAndroidSDKTestApp-drawable-release-androidTest.apk
platform/android/MapLibreAndroidTestApp-drawable-release.apk
platform/android/MapLibreAndroidTestApp-drawable-release-androidTest.apk
- if: github.event_name == 'pull_request'
uses: ./.github/actions/save-pr-number

- name: Build UI tests
if: github.ref == 'refs/heads/main'
- name: Build Instrumentation Tests, copy to platform/android
run: |
./gradlew assembleLegacyDebug assembleLegacyDebugAndroidTest -PtestBuildType=debug
cp MapLibreAndroidTestApp/build/outputs/apk/legacy/debug/MapLibreAndroidTestApp-legacy-debug.apk InstrumentationTestApp.apk
cp MapLibreAndroidTestApp/build/outputs/apk/androidTest/legacy/debug/MapLibreAndroidTestApp-legacy-debug-androidTest.apk InstrumentationTests.apk
- name: Configure AWS Credentials
if: github.ref == 'refs/heads/main'
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
role-to-assume: ${{ vars.AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 21600
role-session-name: MySessionName

- name: Create upload
if: github.ref == 'refs/heads/main'
uses: realm/aws-devicefarm/create-upload@master
id: upload-android-app
with:
project_arn: ${{ vars.AWS_DEVICE_FARM_PROJECT_ARN }}
name: MapboxGLAndroidSDKTestApp-debug.apk
type: ANDROID_APP

- name: Create upload
if: github.ref == 'refs/heads/main'
uses: realm/aws-devicefarm/create-upload@master
id: upload-android-test
with:
project_arn: ${{ vars.AWS_DEVICE_FARM_PROJECT_ARN }}
name: MapboxGLAndroidSDKTestApp-debug-androidTest.apk
type: INSTRUMENTATION_TEST_PACKAGE

- name: Upload Android UI test
if: github.ref == 'refs/heads/main'
run: |
curl -T MapboxGLAndroidSDKTestApp/build/outputs/apk/legacy/debug/MapboxGLAndroidSDKTestApp-legacy-debug.apk '${{ steps.upload-android-app.outputs.url }}'
curl -T MapboxGLAndroidSDKTestApp/build/outputs/apk/androidTest/legacy/debug/MapboxGLAndroidSDKTestApp-legacy-debug-androidTest.apk '${{ steps.upload-android-test.outputs.url }}'
- name: Write uploads.env
if: github.ref == 'refs/heads/main'
working-directory: .
run: |
echo "ANDROID_APP_ARN=${{ steps.upload-android-app.outputs.arn }}" >> uploads.env
echo "ANDROID_TEST_ARN=${{ steps.upload-android-test.outputs.arn }}" >> uploads.env
- uses: actions/upload-artifact@v4
if: github.ref == 'refs/heads/main'
with:
if-no-files-found: error
name: uploadsEnv
path: uploads.env

- name: Store debug artifacts
- name: Upload android-ui-test
uses: actions/upload-artifact@v4
with:
name: debug-artifacts
if-no-files-found: error
name: android-ui-test
path: |
MapboxGLAndroidSDKTestApp/build/outputs/apk/debug
MapboxGLAndroidSDK/build/reports/lint-results.html
MapboxGLAndroidSDK/lint-baseline.xml
MapboxGLAndroidSDKTestApp/build/reports/lint-results.html
MapboxGLAndroidSDKTestApp/build/reports/lint-results.xml
MapboxGLAndroidSDKTestApp/lint-baseline.xml
MapboxGLAndroidSDK/build/intermediates/cmake/debug/obj
platform/android/InstrumentationTestApp.apk
platform/android/InstrumentationTests.apk
android-build-render-test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -242,42 +188,6 @@ jobs:
./render-test/android/RenderTestsApp.apk
./render-test/android/RenderTests.apk
android-instrumentation-test:
needs: android-build

runs-on: ubuntu-latest
if: github.repository_owner == 'maplibre' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/android-annotations')
steps:
- uses: actions/download-artifact@v4
with:
name: uploadsEnv

- name: Read uploads.env
run: cat uploads.env >> "$GITHUB_ENV"

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
role-to-assume: ${{ vars.AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 21600
role-session-name: MySessionName

- name: Schedule test run
uses: realm/aws-devicefarm/test-application@master
with:
name: MapLibre Native Android Instrumentation Test
project_arn: ${{ vars.AWS_DEVICE_FARM_PROJECT_ARN }}
device_pool_arn: ${{ vars.AWS_DEVICE_FARM_DEVICE_POOL_ARN }}
app_arn: ${{ env.ANDROID_APP_ARN }}
test_spec_arn: ${{ vars.AWS_DEVICE_FARM_TEST_SPEC_ARN_ANDROID_UI_TESTS }}
app_type: ANDROID_APP
test_type: INSTRUMENTATION
test_package_arn: ${{ env.ANDROID_TEST_ARN }}
timeout: 28800

android-ci-result:
runs-on: ubuntu-latest
if: needs.pre_job.outputs.should_skip != 'true' && always()
Expand Down
Loading

0 comments on commit ca0de02

Please sign in to comment.