Remove old size test (#1802)

This commit is contained in:
Bart Louwers
2023-10-25 18:20:13 +02:00
committed by GitHub
parent 191fe84074
commit 85a15c457e
3 changed files with 1 additions and 97 deletions

View File

@@ -106,24 +106,6 @@ jobs:
- name: Running iOS UI tests
run: bazel test //platform/ios/iosapp-UITests:uitest --test_output=errors --//:renderer=${{ matrix.renderer }}
# size test
- name: Build app for size test & output size
if: matrix.renderer == 'legacy'
working-directory: ./
run: |
bazel build --compilation_mode=opt //platform/ios:size --//:maplibre_platform=ios
cp "$(bazel cquery --compilation_mode=opt --output=files //platform/ios:size --//:maplibre_platform=ios)" ./size
- name: Upload size test result
if: matrix.renderer == 'legacy'
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: size-test-result
path: |
./size
# render test
- name: Build RenderTest .ipa and .xctest for AWS Device Farm

View File

@@ -1,63 +0,0 @@
name: pr-size-test-result
on:
workflow_run:
workflows: [ios-ci]
types:
- completed
jobs:
comment-on-pr:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/download-workflow-run-artifact
with:
artifact-name: size-test-result
expect-files: "./size"
# Move ./size artifact to ./size_main and store as cache
- run: mv size size_main
if: github.event.workflow_run.event != 'pull_request'
- name: Save size
if: github.event.workflow_run.event != 'pull_request'
uses: actions/cache/save@v3
with:
path: |
size_main
key: ios-size
# Restore cache so we can output the difference
- name: Restore size
if: github.event.workflow_run.event == 'pull_request'
uses: actions/cache/restore@v3
with:
path: |
size_main
key: ios-size
- run: |
{
echo old_size="$(cat ./size_main)"
echo new_size="$(cat ./size)"
echo percentage_change="$(awk 'NR==FNR{a=$0;next}{printf "%+.2f%%\n", 100*($0-a)/a}' ./size ./size_main)"
} >> "$GITHUB_ENV"
if: github.event.workflow_run.event == 'pull_request'
- name: 'Leave comment on PR with test results'
if: github.event.workflow_run.event == 'pull_request'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: size-test-result
number: ${{ github.event.workflow_run.pull_requests[0].number }}
message: |
### Size test result
Old size: ${{ env.old_size }} bytes
New size: ${{ env.new_size }} bytes
Difference: **${{ env.percentage_change }}**

View File

@@ -39,7 +39,7 @@ genrule(
echo "#define MLN_RENDER_BACKEND_METAL 1" > $@;
cat $(location src/Mapbox.template.h) >> $@;
""",
"//conditions:default": "cat $(location src/Mapbox.template.h) >> $@"
"//conditions:default": "cat $(location src/Mapbox.template.h) >> $@",
}),
)
@@ -237,21 +237,6 @@ ios_application(
],
)
# Outputs a file with the size of MapLibre as a dynamic library in bytes
genrule(
name = "size",
srcs = [
"AppDynamicLib",
],
outs = [
"size-out",
],
cmd = """
unzip $(location AppDynamicLib)
stat -f%z ./Payload/AppDynamicLib.app/Frameworks/MapLibre.link.framework/MapLibre.link > $@
""",
)
xcodeproj(
name = "xcodeproj",
bazel_env = {"PATH": "/bin:/usr/bin:/usr/local/bin:/opt/homebrew/bin"},