maplibre / maplibre-native

MapLibre Native - Interactive vector tile maps for iOS, Android and other platforms.
https://maplibre.org
BSD 2-Clause "Simplified" License
1.05k stars 302 forks source link

Run iOS render tests on CI #942

Closed alexcristici closed 1 year ago

alexcristici commented 1 year ago

In this moment render tests are running in Xcode on devices. Trying to run the render test on simulator will show this error: Building for iOS Simulator, but linking in dylib built for iOS, file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework/XCTest' for architecture arm64

louwers commented 1 year ago

@alexcristici and I have run into the same problem: they do not seem to be running anymore.

Any idea what the issue could be?

alexcristici commented 1 year ago

The issue is that mbgl-render-test has the Build Products Path set to platform/ios/build/ios/render-test but the output static lib file is built in platform/ios/build/ios, so the RenderTestApp cannot findit anymore.

alexcristici commented 1 year ago

Not sure why the libmbgl-render-test.a is build in ios and not in ios/render-test.

alexcristici commented 1 year ago

This issue seems to happen only on Xcode 14.3+.

louwers commented 1 year ago

It runs for me on Xcode 14.3 when I run it from the sidebar.

To be able to build the app I need set up an Apple account on the CI servers.

louwers commented 1 year ago

@alexcristici Do you know how I can pull the test results of the device?

Running on a local device and on AWS Device Farm fails for me. I see:

"IOSTestRunner reports error because some of the tests are not passed, please check the test report"

Here you can see the AWS Device Farm Run: https://us-west-2.console.aws.amazon.com/devicefarm/home#/mobile/projects/20687d72-0e46-403e-8f03-0941850665bc/runs/bb3a0617-601b-4d65-b444-768a39b7e5e6/jobs/00000/suites/00001

louwers commented 1 year ago

I am having some trouble with AWS Device Farm.

I posted a question on Stack Overflow in the hopes of getting some external help:

https://stackoverflow.com/questions/76000371/pulling-ios-files-from-application-sandbox-with-aws-device-farm-xctest

Happy if anyone can take a look.

louwers commented 1 year ago

Probably abandoning #1036

I am now in the process of adding a Bazel target for the RenderTestApp for iOS. It compiles now, still a bit messy. Will try to run it now, still need to add the data and the Storyboard files. https://github.com/louwers/maplibre-native/tree/render-test-bazel

After it runs well I will add something to the app to upload the render test results to S3 directly.