maplibre / maplibre-native

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

Build XCTest for iOS device test with Bazel #2028

Open louwers opened 10 months ago

louwers commented 10 months ago

We have had a case of the iOS render test passing on CI when it did not locally. This may have had something to do with how we build the render test app with XCTest bundle. Building the latter is not natively supported by Bazel right now: https://github.com/bazelbuild/rules_apple/issues/2175 So we use a bit of a hack:

https://github.com/maplibre/maplibre-native/blob/f1cdc20daa0b04402f8b3fc4626b610387038459/.github/workflows/ios-ci.yml#L117-L128

This may be a workaround that we can use.

@keith Maybe you want to look at this or can give some pointers.

keith commented 10 months ago

Is it required that a relocatable xctestrun bundle is built? That hasn't been implemented mostly because folks just use bazel test instead. Could that work in this case somehow?

louwers commented 10 months ago

@keith Maybe now with Metal the simulator is reliable enough to run the render tests, I'd have to try it out.

We run instrumented tests on AWS Device Farm and there it is required to upload a XCTest bundle...

keith commented 10 months ago

ah yea for distributing off to another machine I think we'd need something like the issue you linked

louwers commented 2 months ago

Seems like there is some movement:

image