Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into expressions-in-text-v…
Browse files Browse the repository at this point in the history
…ariable-anchor-offset
  • Loading branch information
random3940 committed Oct 5, 2024
2 parents 14e8709 + 56f6c5f commit 1889373
Show file tree
Hide file tree
Showing 609 changed files with 14,303 additions and 9,578 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Input hashes for repository rule npm_translate_lock(name = "npm", pnpm_lock = "//:pnpm-lock.yaml").
# This file should be checked into version control along with the pnpm-lock.yaml file.
pnpm-lock.yaml=172204574
package.json=-1427231250
package.json=794269200
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
bazel-bin
bazel-out
bazel-testlogs
node_modules
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.2.1
7.3.1
2 changes: 1 addition & 1 deletion .github/actions/aws-device-farm-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ runs:
run: |
arn="$(aws devicefarm schedule-run \
--project-arn ${{ inputs.AWS_DEVICE_FARM_PROJECT_ARN }} \
--name "MapLibre Native ${{ matrix.test.name }}" \
--name "MapLibre Native ${{ inputs.name }}" \
--app-arn ${{ env.app_arn }} \
--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 }} \
Expand Down
8 changes: 3 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,18 @@ updates:
- dependency-name: 'codecov/codecov-action'
versions: ['4']
groups:
dependencies:
github-actions:
patterns:
- '*'
- package-ecosystem: 'gradle'
open-pull-requests-limit: 1
directories:
- '/platform/android'
- '/render-test/android'
- '/test/android'
- '*'
schedule:
interval: 'weekly'
ignore:
- dependency-name: 'io.github.vvb2060.ndk:curl'
groups:
dependencies:
gradle-deps:
patterns:
- '*'
51 changes: 44 additions & 7 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,30 @@ jobs:
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: npm install
run: npm install --ignore-scripts
working-directory: platform/android
working-directory: .

- name: run platform/android/scripts/generate-style-code.mjs
run: node platform/android/scripts/generate-style-code.mjs
working-directory: .

- uses: pre-commit/[email protected]
continue-on-error: true # this can mean files are modified, which is not an error
with:
extra_args: clang-format --all-files

- uses: pre-commit/[email protected]
with:
extra_args: clang-format --all-files

- uses: infotroph/tree-is-clean@v1
with:
check_untracked: true

- uses: hendrikmuhs/[email protected]
with:
Expand Down Expand Up @@ -206,11 +227,27 @@ jobs:
./test/android/app-release-androidTest.apk
android-build-render-test:
strategy:
fail-fast: false
matrix:
flavor: [opengl, vulkan]
runs-on: ubuntu-latest
needs:
- pre_job
if: needs.pre_job.outputs.should_skip != 'true'
steps:
- name: Free Disk Space (Ubuntu)
if: startsWith(runner.name, 'GitHub Actions')
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: false
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false

- uses: actions/checkout@v4
with:
submodules: recursive
Expand All @@ -227,19 +264,19 @@ jobs:

- name: Build Render Test App
run: |
./gradlew assemble assembleAndroidTest
cp app/build/outputs/apk/release/app-release.apk RenderTestsApp.apk
cp app/build/outputs/apk/androidTest/release/app-release-androidTest.apk RenderTests.apk
./gradlew assemble${{ matrix.flavor }} assemble${{ matrix.flavor }}AndroidTest
cp app/build/outputs/apk/${{ matrix.flavor }}/release/app-${{ matrix.flavor }}-release.apk RenderTestsApp-${{ matrix.flavor }}.apk
cp app/build/outputs/apk/androidTest/${{ matrix.flavor }}/release/app-${{ matrix.flavor }}-release-androidTest.apk RenderTests-${{ matrix.flavor }}.apk
working-directory: ./render-test/android

- name: Store Render Test .apk files
uses: actions/upload-artifact@v4
with:
name: android-render-tests
name: android-render-tests-${{ matrix.flavor }}
if-no-files-found: error
path: |
./render-test/android/RenderTestsApp.apk
./render-test/android/RenderTests.apk
./render-test/android/RenderTestsApp-${{ matrix.flavor }}.apk
./render-test/android/RenderTests-${{ matrix.flavor }}.apk
android-ci-result:
runs-on: ubuntu-latest
Expand Down
38 changes: 26 additions & 12 deletions .github/workflows/android-device-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,24 @@ jobs:
matrix:
test: [
{
artifactName: android-render-tests,
testFile: RenderTests.apk,
appFile: RenderTestsApp.apk,
name: "Android Render Tests",
artifactName: android-render-tests-opengl,
testFile: RenderTests-opengl.apk,
appFile: RenderTestsApp-opengl.apk,
name: "Android Render Tests (OpenGL)",
# Google Pixel 7 Pro
devicePool: "arn:aws:devicefarm:us-west-2:373521797162:devicepool:20687d72-0e46-403e-8f03-0941850665bc/9692fe7f-86a9-4ecc-908f-175600968564"
},
{
artifactName: android-render-tests-vulkan,
testFile: RenderTests-vulkan.apk,
appFile: RenderTestsApp-vulkan.apk,
name: "Android Render Tests (Vulkan)",
# Google Pixel 7 Pro
devicePool: "arn:aws:devicefarm:us-west-2:373521797162:devicepool:20687d72-0e46-403e-8f03-0941850665bc/9692fe7f-86a9-4ecc-908f-175600968564",
# android-render-test.yml
# see https://github.com/maplibre/ci-runners/tree/main/aws-device-farm/custom-test-envs
testSpecArn: "arn:aws:devicefarm:us-west-2:373521797162:upload:20687d72-0e46-403e-8f03-0941850665bc/c1fc7d3e-dfe3-4a31-9ee0-7b0f71b08872"
},
{
artifactName: benchmarkAPKs,
testFile: "MapLibreAndroidTestApp-drawable-release-androidTest.apk",
Expand Down Expand Up @@ -147,17 +158,20 @@ jobs:
externalData: ${{ env.external_data_arn }}
testSpecArn: ${{ matrix.test.testSpecArn }}

- name: Upload benchmark results to S3
if: always() && env.run_device_test == 'true' && matrix.test.name == 'Android Benchmark'
- name: Store Test Artifacts
if: (matrix.test.name == 'Android Benchmark' || failure()) && env.run_device_test == 'true'
run: |
npm install
node scripts/aws-device-farm/download-benchmark-results.mjs ${{ steps.aws_device_farm_run.outputs.runArn }}
temp_dir="$(mktemp -d)"
node scripts/aws-device-farm/store-test-artifacts.mjs ${{ steps.aws_device_farm_run.outputs.runArn }} "$temp_dir"
zip -r test_artifacts.zip "$temp_dir"
- name: Log Test Spec Output
if: failure() && env.run_device_test == 'true'
run: |
npm install
node scripts/aws-device-farm/log-test-spec-output.mjs ${{ steps.aws_device_farm_run.outputs.runArn }}
- name: Upload Test Artifacts
if: (matrix.test.name == 'Android Benchmark' || failure()) && env.run_device_test == 'true'
uses: actions/upload-artifact@v4
with:
name: "Test Artifacts ${{ matrix.test.name }}"
path: test_artifacts.zip

- name: Generate another token (previous one could have expired)
if: always()
Expand Down
39 changes: 36 additions & 3 deletions .github/workflows/android-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ name: android-release

on:
workflow_dispatch:
inputs:
renderer:
description: 'Select renderering backend'
required: true
default: 'OpenGL'
type: choice
options:
- OpenGL
- Vulkan

jobs:
build:
Expand All @@ -19,6 +28,15 @@ jobs:
submodules: recursive
fetch-depth: 0

- name: Map renderer input
id: backend_lowercase
run: |
if [ "${{ github.event.inputs.renderer }}" = "OpenGL" ]; then
echo "backend_lowercase=drawable" >> "$GITHUB_ENV"
elif [ "${{ github.event.inputs.renderer }}" = "Vulkan" ]; then
echo "backend_lowercase=vulkan" >> "$GITHUB_ENV"
fi
- run: echo "cmake.dir=$(dirname "$(dirname "$(command -v cmake)")")" >> local.properties

- uses: actions/setup-java@v4
Expand Down Expand Up @@ -97,6 +115,8 @@ jobs:

- name: Build package
run: make apackage
env:
RENDERER: ${{ env.backend_lowercase }}

- name: Build release Test App
run: |
Expand All @@ -114,11 +134,23 @@ jobs:
id: prepare_release
run: |
RELEASE_NOTES_PATH="${PWD}/release_notes.txt"
./scripts/release-notes.js > "${RELEASE_NOTES_PATH}"
node scripts/release-notes.mjs > "${RELEASE_NOTES_PATH}"
echo release_notes="${RELEASE_NOTES_PATH}" >> "$GITHUB_OUTPUT"
echo version_tag="$( git describe --tags --match=android-v*.*.* --abbrev=0 )" >> "$GITHUB_OUTPUT"
shell: bash

- name: Check if version is valid semver
id: check_version
run: |
version_tag="${{ steps.prepare_release.outputs.version_tag }}"
if [[ $version_tag =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Valid semver: $version_tag"
echo "prerelease=false" >> "$GITHUB_ENV"
else
echo "Invalid semver: $version_tag"
echo "prerelease=true" >> "$GITHUB_ENV"
fi
- name: Create release
id: create_release
uses: actions/create-release@v1
Expand All @@ -129,7 +161,7 @@ jobs:
release_name: ${{steps.prepare_release.outputs.version_tag }}
body_path: ${{ steps.prepare_release.outputs.release_notes }}
draft: false
prerelease: false
prerelease: ${{ env.prerelease }}

- name: Upload aar
id: upload-release-asset
Expand All @@ -138,7 +170,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: platform/android/MapLibreAndroid/build/outputs/aar/MapLibreAndroid-drawable-release.aar
asset_path: platform/android/MapLibreAndroid/build/outputs/aar/MapLibreAndroid-${{ env.backend_lowercase }}-release.aar
asset_name: MapLibreAndroid-release.aar
asset_content_type: application/zip

Expand Down Expand Up @@ -172,3 +204,4 @@ jobs:
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
RENDERER: ${{ env.backend_lowercase }}
3 changes: 2 additions & 1 deletion .github/workflows/ios-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ jobs:
- name: Deploy DocC documentation (main) 🚀
if: github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
uses: JamesIves/[email protected]
continue-on-error: true
with:
branch: gh-pages
folder: build/docs
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ jobs:
${{ runner.os }}-bazel-
path: ~/.cache/bazel

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

- name: Start server
run: |
npm install
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,12 @@ jobs:
- name: Configure maplibre-native (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
cmake . -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
cmake . -B build `
-G Ninja `
-DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} `
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache `
-DMLN_WITH_NODE=ON
- name: Build maplibre-native (MacOS/Linux)
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.10
20.14.0
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ repos:
- id: check-yaml
args: [--allow-multiple-documents]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.8
rev: v19.1.0
hooks:
- id: clang-format
files: '.*\.(hpp|cpp|h)'
exclude: '(vendor/.*|darwin/include/mbgl/storage/reachability.h)'
- repo: https://github.com/keith/pre-commit-buildifier
rev: 7.1.2
rev: 7.3.1
hooks:
- id: buildifier
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
rev: v1.7.1.15
rev: v1.7.2.16
hooks:
- id: actionlint
additional_dependencies: [shellcheck-py]
- repo: https://github.com/nicklockwood/SwiftFormat
rev: "0.54.3"
rev: "0.54.5"
hooks:
- id: swiftformat
args: [--swiftversion, "5.8"]
Expand Down
9 changes: 4 additions & 5 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -214,30 +214,29 @@ js_binary(
":style-code",
":style-spec",
],
entry_point = "scripts/generate-style-code.js",
entry_point = "scripts/generate-style-code.mjs",
)

js_binary(
name = "generate-shader-code-script",
data = [
":node_modules/argparse",
],
entry_point = "shaders/generate_shader_code.js",
entry_point = "shaders/generate_shader_code.mjs",
)

js_library(
name = "style-spec",
srcs = ["scripts/style-spec.js"],
srcs = ["scripts/style-spec.mjs"],
data = glob([
"scripts/style-spec-reference/*.js",
"scripts/style-spec-reference/*.json",
]),
visibility = ["//visibility:public"],
)

js_library(
name = "style-code",
srcs = ["scripts/style-code.js"],
srcs = ["scripts/style-code.mjs"],
visibility = ["//visibility:public"],
deps = [
":node_modules/ejs",
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### ✨ New features

- *...Add new stuff here...*
- [core] Added new map observer events: onPreCompileShader, onPostCompileShader, onShaderCompileFailed, onGlyphsLoaded, onGlyphsError, onGlyphsRequested, onTileAction, onSpriteLoaded, onSpriteError, onSpriteRequested ([#2694](https://github.com/maplibre/maplibre-native/pull/2694)).
- [core] Add WebP image decoding support to default platform (Linux, Windows)
- [core] All CMake properties are now prefixed `MLN_*` [1054](https://github.com/maplibre/maplibre-native/pull/1054).
- [windows] Added windows build support for core applications and node [#707](https://github.com/maplibre/maplibre-native/pull/707)
Expand Down
Loading

0 comments on commit 1889373

Please sign in to comment.