Skip to content

Commit a8f4f70

Browse files
authored
1 parent 1455924 commit a8f4f70

File tree

297 files changed

+10307
-10321
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

297 files changed

+10307
-10321
lines changed

.clang-tidy

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
---
22
Checks: [
3-
android-*,
3+
android-*,
44
boost-*,
55
bugprone-*,
6-
clang-analyzer-core*,
7-
clang-analyzer-cplusplus*,
8-
clang-analyzer-deadcode*,
9-
clang-analyzer-optin.cplusplus*,
10-
clang-analyzer-optin.performance.Padding,
11-
clang-analyzer-security*,
6+
clang-analyzer-core*,
7+
clang-analyzer-cplusplus*,
8+
clang-analyzer-deadcode*,
9+
clang-analyzer-optin.cplusplus*,
10+
clang-analyzer-optin.performance.Padding,
11+
clang-analyzer-security*,
1212
clang-diagnostic-*,
1313
cppcoreguidelines-avoid-goto,
1414
cppcoreguidelines-no-malloc,
1515
google-*,
1616
llvm-*,
17-
misc-*,
18-
modernize-*,
19-
performance-*,
20-
portability-*,
17+
misc-*,
18+
modernize-*,
19+
performance-*,
20+
portability-*,
2121
readability-*,
2222
-bugprone-branch-clone,
2323
-bugprone-easily-swappable-parameters,
@@ -118,6 +118,6 @@ Checks: [
118118
]
119119
WarningsAsErrors: '*'
120120
HeaderFilterRegex: '.*'
121-
CheckOptions:
122-
- key: performance-unnecessary-value-param.AllowedTypes
121+
CheckOptions:
122+
- key: performance-unnecessary-value-param.AllowedTypes
123123
value: 'exception_ptr'

.github/workflows/android-device-test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
((github.event.workflow_run.head_branch == 'main' && github.event.workflow_run.event == 'push') ||
110110
matrix.test.name == 'Android Benchmark' && steps.benchmark_comment.outputs.comment-id ||
111111
matrix.test.name != 'Android Benchmark')
112-
run:
112+
run:
113113
echo "run_device_test=true" >> "$GITHUB_ENV"
114114

115115
- uses: LouisBrunner/checks-action@v2.0.0
@@ -135,7 +135,7 @@ jobs:
135135
role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }}
136136
role-session-name: ${{ github.run_id }}
137137
role-duration-seconds: 14400
138-
138+
139139
- name: Run ${{ matrix.test.name }} on AWS Device Farm
140140
run: |
141141
export name="${{ matrix.test.name }}"
@@ -160,7 +160,7 @@ jobs:
160160
echo results_dir="$results_dir" >> "$GITHUB_ENV"
161161
node scripts/aws-device-farm/store-test-artifacts.mjs --runArn ${{ env.run_arn }} --outputDir "$results_dir"
162162
zip -r test_artifacts.zip "$results_dir"
163-
163+
164164
- name: Store Benchmark Results
165165
if: matrix.test.name == 'Android Benchmark' && env.run_device_test == 'true'
166166
run: |

.github/workflows/ios-ci.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
- ios-*.*.x
2222
tags:
2323
- 'ios-*'
24-
24+
2525
pull_request:
2626
branches:
2727
- '*'
@@ -48,11 +48,11 @@ jobs:
4848
files_yaml_from_source_file: .github/changed-files.yml
4949

5050
- name: Run step if test file(s) change
51-
if: steps.changed-files-yaml.outputs.ios_any_modified == 'true'
51+
if: steps.changed-files-yaml.outputs.ios_any_modified == 'true'
5252
run: |
5353
echo "One or more iOS file(s) has changed."
5454
echo "List of changes: ${{ steps.changed-files-yaml.outputs.ios_all_changed_files }}"
55-
55+
5656
ios-build:
5757
needs: pre_job
5858
if: needs.pre_job.outputs.should_skip != 'true'
@@ -130,7 +130,7 @@ jobs:
130130
${{ env.render_test_artifacts_dir }}/RenderTestApp.ipa
131131
132132
# C++ unit tests
133-
133+
134134
- name: Build CppUnitTests .ipa and .xctest for AWS Device Farm
135135
run: |
136136
set -e
@@ -178,16 +178,16 @@ jobs:
178178
platform/ios/MapLibre_dynamic
179179
180180
- name: Configure AWS Credentials
181-
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
181+
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
182182
uses: aws-actions/configure-aws-credentials@v4
183183
with:
184184
aws-region: us-west-2
185185
role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }}
186186
role-session-name: ${{ github.run_id }}
187-
187+
188188
- name: Upload MapLibre_DWARF & MapLibre_dynamic to S3
189-
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
190-
run: |
189+
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
190+
run: |
191191
aws s3 cp MapLibre_DWARF s3://maplibre-native/size-test-ios/MapLibre_DWARF-main
192192
aws s3 cp MapLibre_dynamic s3://maplibre-native/size-test-ios/MapLibre_dynamic-main
193193
@@ -232,7 +232,7 @@ jobs:
232232
bazel build --compilation_mode=opt --features=dead_strip,thin_lto --objc_enable_binary_stripping \
233233
--apple_generate_dsym --output_groups=+dsyms --//:renderer=metal //platform/ios:MapLibre.dynamic --embed_label=maplibre_ios_"$(cat VERSION)"
234234
echo xcframework="$(bazel info execution_root)"/"$(bazel cquery --output=files --compilation_mode=opt --//:renderer=metal //platform/ios:MapLibre.dynamic)" >> "$GITHUB_ENV"
235-
235+
236236
- name: Create .zip with debug symbols
237237
if: env.make_release
238238
working-directory: ./bazel-bin/platform/ios/MapLibre.dynamic_dsyms

.github/workflows/linux-ci.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ jobs:
3737
- name: Get all Linux files that have changed
3838
if: github.event_name != 'workflow_dispatch'
3939
id: changed-files
40-
40+
4141
uses: tj-actions/changed-files@v45
4242
with:
4343
files_yaml_from_source_file: .github/changed-files.yml
4444

4545
- name: List changed files
46-
if: steps.changed-files.outputs.linux_any_modified == 'true'
46+
if: steps.changed-files.outputs.linux_any_modified == 'true'
4747
run: |
4848
echo "Changed file(s): ${{ steps.changed-files.outputs.linux_all_changed_files }}"
4949
@@ -114,32 +114,32 @@ jobs:
114114
# mbgl-render (used for size test) & mbgl-benchmark-runner
115115

116116
- name: Upload mbgl-render as artifact
117-
if: matrix.renderer == 'drawable' && github.event_name == 'pull_request'
117+
if: matrix.renderer == 'drawable' && github.event_name == 'pull_request'
118118
uses: actions/upload-artifact@v4
119119
with:
120120
name: mbgl-render
121121
path: |
122122
build/bin/mbgl-render
123-
123+
124124
- name: Upload mbgl-benchmark-runner as artifact
125-
if: matrix.renderer == 'drawable' && github.event_name == 'pull_request'
125+
if: matrix.renderer == 'drawable' && github.event_name == 'pull_request'
126126
uses: actions/upload-artifact@v4
127127
with:
128128
name: mbgl-benchmark-runner
129129
path: |
130130
build/mbgl-benchmark-runner
131131
132132
- name: Configure AWS Credentials
133-
if: matrix.renderer == 'drawable' && github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
133+
if: matrix.renderer == 'drawable' && github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
134134
uses: aws-actions/configure-aws-credentials@v4
135135
with:
136136
aws-region: us-west-2
137137
role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }}
138138
role-session-name: ${{ github.run_id }}
139139

140140
- name: Upload mbgl-render & mbgl-benchmark-runner to S3
141-
if: matrix.renderer == 'drawable' && github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
142-
run: |
141+
if: matrix.renderer == 'drawable' && github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
142+
run: |
143143
aws s3 cp build/bin/mbgl-render s3://maplibre-native/mbgl-render-main
144144
aws s3 cp build/mbgl-benchmark-runner s3://maplibre-native/mbgl-benchmark-runner-main
145145
@@ -178,7 +178,7 @@ jobs:
178178
name: render-test-result-${{ matrix.renderer }}
179179
path: |
180180
metrics/linux-${{ matrix.renderer }}.html
181-
181+
182182
# expression tests
183183

184184
- run: chmod +x build/expression-test/mbgl-expression-test

.github/workflows/macos-ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ jobs:
6969
restore-keys: |
7070
${{ runner.os }}-bazel-
7171
path: ~/.cache/bazel
72-
72+
7373
- name: Install dependencies
7474
run: |
7575
brew install bazelisk webp libuv webp icu4c jpeg-turbo glfw
7676
brew link icu4c --force
77-
77+
7878
- name: Build AppKit app, GLFW app, cache tool, render tool for macOS
7979
run: bazel build //platform/macos/app:macos_app //platform/glfw:glfw_app //bin:cache_tool //bin:render_tool --//:renderer=metal
80-
80+
8181
- name: Generate Xcode project for macOS
8282
run: bazel run //platform/macos:xcodeproj --@rules_xcodeproj//xcodeproj:extra_common_flags="--//:renderer=metal"

.github/workflows/macos-release.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: macos-release
22

33
on:
44
workflow_dispatch:
5-
5+
66
jobs:
77
build:
88
runs-on: macos-12
@@ -15,14 +15,14 @@ jobs:
1515
defaults:
1616
run:
1717
working-directory: platform/ios
18-
shell: bash
18+
shell: bash
1919

2020
steps:
2121
- uses: actions/checkout@v4
2222
with:
2323
submodules: recursive
2424
fetch-depth: 0
25-
25+
2626
- name: Install macos dependencies
2727
run: |
2828
brew list cmake || brew install cmake
@@ -46,33 +46,33 @@ jobs:
4646
run: npm install
4747

4848
- name: Prepare ccache
49-
run: ccache --clear
49+
run: ccache --clear
5050

5151
- name: Cache ccache
5252
uses: actions/cache@v4
5353
env:
54-
cache-name: ccache-v1
54+
cache-name: ccache-v1
5555
with:
5656
path: ~/.ccache'
5757
key: ${{ env.cache-name }}-${{ runner.os }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }}
5858
restore-keys: |
5959
${{ env.cache-name }}-${{ runner.os }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}
6060
${{ env.cache-name }}-${{ runner.os }}-${{ github.job }}-${{ github.ref }}
61-
${{ env.cache-name }}-${{ runner.os }}-${{ github.job }}
61+
${{ env.cache-name }}-${{ runner.os }}-${{ github.job }}
6262
6363
- name: Clear ccache statistics
6464
run: |
6565
ccache --zero-stats
6666
ccache --max-size=2G
67-
ccache --show-stats
67+
ccache --show-stats
6868
6969
- name: Install packaging dependencies
7070
run: |
7171
./platform/ios/scripts/install-packaging-dependencies.sh
7272
7373
- name: Build package
7474
run: make xpackage
75-
75+
7676
- name: Deploy package
7777
run: make xdeploy
7878
env:

.github/workflows/node-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ jobs:
168168
uses: jwlawson/actions-setup-cmake@v2
169169
with:
170170
cmake-version: '3.29.2'
171-
171+
172172
- name: cmake version
173173
run: |
174174
cmake --version

.github/workflows/node-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ jobs:
138138
uses: jwlawson/actions-setup-cmake@v2
139139
with:
140140
cmake-version: '3.29.2'
141-
141+
142142
- name: cmake version
143143
run: |
144144
cmake --version

.github/workflows/pr-bloaty-ios.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
run: bloaty/build/bloaty --debug-file MapLibre_DWARF --debug-file MapLibre_DWARF-main MapLibre_dynamic -n 0 -s vm -d compileunits -- MapLibre_dynamic-main > bloaty_diff.txt
7474

7575
- name: Configure AWS Credentials
76-
if: vars.OIDC_AWS_ROLE_TO_ASSUME
76+
if: vars.OIDC_AWS_ROLE_TO_ASSUME
7777
uses: aws-actions/configure-aws-credentials@v4
7878
with:
7979
aws-region: us-west-2

.github/workflows/pr-linux-tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
run: bloaty/build/bloaty mbgl-render -- mbgl-render-legacy -n 0 -s vm -d compileunits > tlus_diff_legacy.txt
8484

8585
- name: Configure AWS Credentials
86-
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
86+
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
8787
uses: aws-actions/configure-aws-credentials@v4
8888
with:
8989
aws-region: us-west-2
@@ -167,7 +167,7 @@ jobs:
167167
run: python3 vendor/benchmark/tools/compare.py --no-color benchmarks ./mbgl-benchmark-runner-main ./mbgl-benchmark-runner --benchmark_filter='^[^A][^P][^I].*' > benchmark_out.txt
168168

169169
- name: Configure AWS Credentials
170-
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
170+
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
171171
uses: aws-actions/configure-aws-credentials@v4
172172
with:
173173
aws-region: us-west-2

.github/workflows/windows-ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
files_yaml_from_source_file: .github/changed-files.yml
4848

4949
- name: List changed files
50-
if: steps.changed-files.outputs.windows_any_modified == 'true'
50+
if: steps.changed-files.outputs.windows_any_modified == 'true'
5151
run: |
5252
Write-Host "Changed file(s): ${{ steps.changed-files.outputs.windows_all_changed_files }}"
5353
@@ -149,7 +149,7 @@ jobs:
149149
uses: github/codeql-action/analyze@v3
150150
with:
151151
category: "/language:cpp"
152-
152+
153153
- name: Download Mesa3D
154154
if: matrix.renderer != 'egl'
155155
run: |
@@ -181,7 +181,7 @@ jobs:
181181
if: matrix.renderer == 'vulkan'
182182
run: |
183183
reg add 'HKLM\Software\Khronos\Vulkan\Drivers' /f /v '${{ github.workspace }}\build\lvp_icd.x86_64.json' /t REG_DWORD /d 0
184-
184+
185185
- name: Download and configure Vulkan
186186
if: matrix.renderer == 'vulkan'
187187
run: |
@@ -207,7 +207,7 @@ jobs:
207207
name: render-test-result-${{ matrix.renderer }}
208208
path: |
209209
metrics/windows-${{ matrix.renderer == 'osmesa' && 'opengl' || matrix.renderer }}.html
210-
210+
211211
# expression tests
212212

213213
- name: Run expression test

.pre-commit-config.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ repos:
55
- id: check-yaml
66
args: [--allow-multiple-documents, --unsafe]
77
- id: end-of-file-fixer
8+
- id: trailing-whitespace
9+
# FIXME: these autogenerate files contain trailing whitespace. Need to fix generator.
10+
exclude: 'platform/android/MapLibreAndroid/src/main/java/org/maplibre/android/(location/LocationIndicatorLayer|style/layers/PropertyFactory)\.java'
811
- repo: https://github.com/pre-commit/mirrors-clang-format
912
rev: v19.1.4
1013
hooks:
@@ -35,4 +38,3 @@ repos:
3538
ci:
3639
# sometimes fails https://github.com/keith/pre-commit-buildifier/issues/13
3740
skip: [buildifier]
38-

ARCHITECTURE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ In the repository, core C++ code is contained in the `include` and `src` directo
1414

1515
## Platform specific code
1616

17-
Code and build scripts belonging to platform SDKs are contained in the `platform` directory, which has subdirectories for each platform.
17+
Code and build scripts belonging to platform SDKs are contained in the `platform` directory, which has subdirectories for each platform.
1818

1919
- `platform/darwin` and `platform/default` directories contain code shared by multiple platform SDKs.
2020
- `platform/ios` and `platform/macos` - the SDKs for Apple's operating systems, forked from https://github.com/mapbox/mapbox-gl-native-ios/commit/a139216 (mapbox hosted both iOS and MacOS SDKs in the same project).

0 commit comments

Comments
 (0)