Sunset non-Metal iOS builds on CI (#1967)
This commit is contained in:
36
.github/workflows/ios-ci.yml
vendored
36
.github/workflows/ios-ci.yml
vendored
@@ -45,14 +45,10 @@ jobs:
|
||||
ios-build:
|
||||
needs: pre_job
|
||||
if: needs.pre_job.outputs.should_skip != 'true'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
renderer: [legacy, drawable, metal]
|
||||
runs-on: [self-hosted, macOS, ARM64]
|
||||
concurrency:
|
||||
# cancel jobs on PRs only
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.renderer }}
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
env:
|
||||
BUILDTYPE: Debug
|
||||
@@ -98,25 +94,23 @@ jobs:
|
||||
- run: cp bazel/example_config.bzl bazel/config.bzl
|
||||
|
||||
- name: Check debug symbols
|
||||
run: bazel run //platform:check-public-symbols --//:renderer=${{ matrix.renderer }}
|
||||
run: bazel run //platform:check-public-symbols --//:renderer=metal
|
||||
|
||||
- name: Lint plist files
|
||||
run: bazel run //platform/ios:lint-plists --//:renderer=${{ matrix.renderer }}
|
||||
run: bazel run //platform/ios:lint-plists --//:renderer=metal
|
||||
|
||||
- name: Running iOS tests
|
||||
if: matrix.renderer != 'metal'
|
||||
run: bazel test //platform/ios/test:ios_test --test_output=errors --//:renderer=${{ matrix.renderer }}
|
||||
run: bazel test //platform/ios/test:ios_test --test_output=errors --//:renderer=metal
|
||||
|
||||
- name: Running iOS UI tests
|
||||
run: bazel test //platform/ios/iosapp-UITests:uitest --test_output=errors --//:renderer=${{ matrix.renderer }}
|
||||
run: bazel test //platform/ios/iosapp-UITests:uitest --test_output=errors --//:renderer=metal
|
||||
|
||||
# render test
|
||||
|
||||
- name: Build RenderTest .ipa and .xctest for AWS Device Farm
|
||||
if: matrix.renderer == 'legacy'
|
||||
run: |
|
||||
set -e
|
||||
bazel run //platform/ios:xcodeproj
|
||||
bazel run --//:renderer=metal //platform/ios:xcodeproj
|
||||
build_dir="$(mktemp -d)"
|
||||
xcodebuild build-for-testing -scheme RenderTest -project MapLibre.xcodeproj -derivedDataPath "$build_dir"
|
||||
render_test_app_dir="$(dirname "$(find "$build_dir" -name RenderTestApp.app)")"
|
||||
@@ -130,7 +124,6 @@ jobs:
|
||||
echo render_test_artifacts_dir="$render_test_app_dir" >> "$GITHUB_ENV"
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: matrix.renderer == 'legacy'
|
||||
with:
|
||||
name: ios-render-test
|
||||
retention-days: 3
|
||||
@@ -142,10 +135,9 @@ jobs:
|
||||
# C++ unit tests
|
||||
|
||||
- name: Build CppUnitTests .ipa and .xctest for AWS Device Farm
|
||||
if: matrix.renderer == 'legacy'
|
||||
run: |
|
||||
set -e
|
||||
bazel run //platform/ios:xcodeproj
|
||||
bazel run --//:renderer=metal //platform/ios:xcodeproj
|
||||
build_dir="$(mktemp -d)"
|
||||
xcodebuild build-for-testing -scheme CppUnitTests -project MapLibre.xcodeproj -derivedDataPath "$build_dir"
|
||||
ios_cpp_test_app_dir="$(dirname "$(find "$build_dir" -name CppUnitTestsApp.app)")"
|
||||
@@ -159,7 +151,6 @@ jobs:
|
||||
echo ios_cpp_test_artifacts_dir="$ios_cpp_test_app_dir" >> "$GITHUB_ENV"
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: matrix.renderer == 'legacy'
|
||||
with:
|
||||
name: ios-cpp-unit-tests
|
||||
retention-days: 3
|
||||
@@ -171,7 +162,6 @@ jobs:
|
||||
# Size test (Bloaty)
|
||||
|
||||
- name: Build dynamic library for size test (Bloaty)
|
||||
if: matrix.renderer == 'drawable'
|
||||
run: |
|
||||
bazel build //platform/ios:MapLibre.dynamic --//:renderer=metal --//:maplibre_platform=ios --compilation_mode="opt" --copt -g --copt="-Oz" --strip never --output_groups=+dsyms --apple_generate_dsym
|
||||
bazel_bin="$(bazel info --compilation_mode="opt" bazel-bin)"
|
||||
@@ -180,8 +170,8 @@ jobs:
|
||||
cp MapLibre.xcframework/ios-arm64/MapLibre.framework/MapLibre MapLibre_dynamic
|
||||
|
||||
- name: Upload size test as artifact (Bloaty)
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: actions/upload-artifact@v4
|
||||
if: matrix.renderer == 'drawable' && github.event_name == 'pull_request'
|
||||
with:
|
||||
name: ios-size-test-files
|
||||
retention-days: 3
|
||||
@@ -191,7 +181,7 @@ jobs:
|
||||
platform/ios/MapLibre_dynamic
|
||||
|
||||
- name: Configure AWS Credentials
|
||||
if: matrix.renderer == 'drawable' && github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
|
||||
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
with:
|
||||
aws-region: us-west-2
|
||||
@@ -199,7 +189,7 @@ jobs:
|
||||
role-session-name: ${{ github.run_id }}
|
||||
|
||||
- name: Upload MapLibre_DWARF & MapLibre_dynamic to S3
|
||||
if: matrix.renderer == 'drawable' && github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
|
||||
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
|
||||
run: |
|
||||
aws s3 cp MapLibre_DWARF s3://maplibre-native/size-test-ios/MapLibre_DWARF-main
|
||||
aws s3 cp MapLibre_dynamic s3://maplibre-native/size-test-ios/MapLibre_dynamic-main
|
||||
@@ -209,13 +199,13 @@ jobs:
|
||||
|
||||
# Make Metal XCFramework release
|
||||
- name: Should make release?
|
||||
if: ${{ github.ref == 'refs/heads/main' && matrix.renderer == 'metal' }}
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
run: echo make_release=true >> "$GITHUB_ENV"
|
||||
|
||||
- name: Build XCFramework
|
||||
run: |
|
||||
bazel build --compilation_mode=opt --//:renderer=${{ matrix.renderer }} --//:maplibre_platform=ios //platform/ios:MapLibre.dynamic
|
||||
echo xcframework="$(bazel info execution_root)"/"$(bazel cquery --output=files --compilation_mode=opt --//:renderer=${{ matrix.renderer }} --//:maplibre_platform=ios //platform/ios:MapLibre.dynamic)" >> "$GITHUB_ENV"
|
||||
bazel build --compilation_mode=opt --//:renderer=metal --//:maplibre_platform=ios //platform/ios:MapLibre.dynamic
|
||||
echo xcframework="$(bazel info execution_root)"/"$(bazel cquery --output=files --compilation_mode=opt --//:renderer=metal --//:maplibre_platform=ios //platform/ios:MapLibre.dynamic)" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Get version (release)
|
||||
if: env.make_release && github.event.inputs.release
|
||||
|
||||
8
.github/workflows/pr-bloaty-ios.yml
vendored
8
.github/workflows/pr-bloaty-ios.yml
vendored
@@ -58,6 +58,14 @@ jobs:
|
||||
- name: Run Bloaty
|
||||
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
|
||||
|
||||
- name: Configure AWS Credentials
|
||||
if: vars.OIDC_AWS_ROLE_TO_ASSUME
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
with:
|
||||
aws-region: us-west-2
|
||||
role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }}
|
||||
role-session-name: ${{ github.run_id }}
|
||||
|
||||
- name: Prepare Bloaty message
|
||||
run: |
|
||||
report_path=bloaty-results-ios/pr-${{ steps.get-pr-number.outputs.pr-number }}-compared-to-main.txt
|
||||
|
||||
@@ -458,7 +458,9 @@ class MLNDocumentationExampleTests: XCTestCase, MLNMapViewDelegate {
|
||||
//#-end-example-code
|
||||
}
|
||||
|
||||
func testMLNMapSnapshotter() {
|
||||
func testMLNMapSnapshotter() throws {
|
||||
throw XCTSkip("Snapshotter not implemented yet for Metal. See https://github.com/maplibre/maplibre-native/issues/1862")
|
||||
|
||||
let expectation = self.expectation(description: "MLNMapSnapshotter should produce a snapshot")
|
||||
#if os(macOS)
|
||||
var image: NSImage? {
|
||||
|
||||
@@ -75,6 +75,7 @@ MLNImage *MLNImageFromCurrentContext(void) {
|
||||
}
|
||||
|
||||
- (void)testOverlayHandler {
|
||||
XCTSkip(@"Snapshotter not implemented yet for Metal. See https://github.com/maplibre/maplibre-native/issues/1862");
|
||||
self.styleLoadingExpectation = [self expectationWithDescription:@"Style should finish loading."];
|
||||
XCTestExpectation *overlayExpectation = [self expectationWithDescription:@"Overlay handler should get called."];
|
||||
XCTestExpectation *completionExpectation = [self expectationWithDescription:@"Completion handler should get called."];
|
||||
@@ -118,6 +119,7 @@ MLNImage *MLNImageFromCurrentContext(void) {
|
||||
}
|
||||
|
||||
- (void)testDelegate {
|
||||
XCTSkip(@"Snapshotter not implemented yet for Metal. See https://github.com/maplibre/maplibre-native/issues/1862");
|
||||
self.styleLoadingExpectation = [self expectationWithDescription:@"Style should finish loading."];
|
||||
XCTestExpectation *completionExpectation = [self expectationWithDescription:@"Completion handler should get called."];
|
||||
|
||||
@@ -141,6 +143,7 @@ MLNImage *MLNImageFromCurrentContext(void) {
|
||||
}
|
||||
|
||||
- (void)testRuntimeStyling {
|
||||
XCTSkip(@"Snapshotter not implemented yet for Metal. See https://github.com/maplibre/maplibre-native/issues/1862");
|
||||
[self testStyleURL:nil camera:[MLNMapCamera camera] applyingRuntimeStylingActions:^(MLNStyle *style) {
|
||||
MLNBackgroundStyleLayer *backgroundLayer = [[MLNBackgroundStyleLayer alloc] initWithIdentifier:@"background"];
|
||||
backgroundLayer.backgroundColor = [NSExpression expressionForConstantValue:[MLNColor orangeColor]];
|
||||
@@ -149,6 +152,7 @@ MLNImage *MLNImageFromCurrentContext(void) {
|
||||
}
|
||||
|
||||
- (void)testLocalGlyphRendering {
|
||||
XCTSkip(@"Snapshotter not implemented yet for Metal. See https://github.com/maplibre/maplibre-native/issues/1862");
|
||||
[[NSUserDefaults standardUserDefaults] setObject:@[@"PingFang TC"] forKey:@"MLNIdeographicFontFamilyName"];
|
||||
NSURL *styleURL = [[NSBundle bundleForClass:[self class]] URLForResource:@"mixed" withExtension:@"json"];
|
||||
[self testStyleURL:styleURL camera:nil applyingRuntimeStylingActions:^(MLNStyle *style) {} expectedImageName:@"Fixtures/MLNMapSnapshotterTests/PingFang"];
|
||||
|
||||
Reference in New Issue
Block a user