Skip to content

Commit f7fc76e

Browse files
pjleonard37Release SDK bot for Maps SDK teamactions-user
authored andcommitted
Automate testing new Standard style versions (#3782)
This PR automates the Maps SDK process for Standard and Standard-Satellite testing for new versions of these styles. It has two parts: ### Add Standard/Standard-Satellite styles to our SLA metrics Specific changes: - Update the `mapbox-maps-internal` pin to include new tests for these four styles (`standard`, `standard-rc`, `standard-satellite`, `standard-satellite-rc`). They were added in this [pr](mapbox/mapbox-maps-internal#1430). - Update the SLA runners for iOS and Android to run these new tests whenever our existing benchmarks are run. Once these changes land, I will add charts for these new tests to the Mode Engineering Dashboards for iOS and Android. Example chart from a trial run: ![Screenshot 2025-05-16 at 4 44 00 PM](https://github.com/user-attachments/assets/8e11cb98-6b36-41ec-89c2-4b24f83e9444) ### Enable Mobot testing of RC versions of these styles Specific changes: - Add an example to iOS and update an example for Android to allow pasting a style URL at runtime Once this is merged I will update the Mobot test script to include test specific features in `standard`, `standard-rc`, `standard-satellite`, and `standard-satellite-rc`. We can easily add new test cases for new Standard features in the RC versions of these styles. <img src="https://github.com/user-attachments/assets/742eaca8-14f5-4deb-825f-396a6fdad5c7" width="300"> <img src="https://github.com/user-attachments/assets/65a133af-eae3-464f-93d3-6d4b38bd4d95" width="300"> cc @mapbox/sdk-ci cc @mapbox/maps-ios cc @mapbox/gl-native cc @mapbox/maps-android --------- Co-authored-by: Release SDK bot for Maps SDK team <[email protected]> Co-authored-by: Changelog autocreator bot <[email protected]> GitOrigin-RevId: 19690b797f4bb2cb4aeccddd3684b0e99e0ea3ec
1 parent de058d0 commit f7fc76e

File tree

7 files changed

+230
-157
lines changed

7 files changed

+230
-157
lines changed

DEVELOPING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ git clone [email protected]:mapbox/mapbox-maps-ios.git && cd mapbox-maps-ios
5353

5454
### Building the Maps SDK
5555

56-
Open `Apps/Apps.xcworkspace` and build the `MapboxMaps` target.
56+
* Run `xcodegen` in the root of the repo to generate the Xcode project.
57+
* Open the resulting `MapboxMaps.xcodeproj` in Xcode and and build the `MapboxMaps` target.
5758

5859
### Running the Debug App
5960

Examples.xcodeproj/project.pbxproj

Lines changed: 139 additions & 113 deletions
Large diffs are not rendered by default.

Examples.xcodeproj/xcshareddata/xcschemes/Examples.xcscheme

Lines changed: 33 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"
7-
buildImplicitDependencies = "YES"
8-
runPostActionsOnFailure = "NO">
7+
buildImplicitDependencies = "YES">
98
<BuildActionEntries>
109
<BuildActionEntry
1110
buildForTesting = "YES"
@@ -27,17 +26,7 @@
2726
buildConfiguration = "Debug"
2827
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2928
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
30-
shouldUseLaunchSchemeArgsEnv = "NO"
31-
onlyGenerateCoverageForSpecifiedTargets = "NO">
32-
<TestPlans>
33-
<TestPlanReference
34-
default = "YES"
35-
reference = "container:Tests/TestPlans/Examples.xctestplan">
36-
</TestPlanReference>
37-
<TestPlanReference
38-
reference = "container:Tests/TestPlans/Examples no unit tests.xctestplan">
39-
</TestPlanReference>
40-
</TestPlans>
29+
shouldUseLaunchSchemeArgsEnv = "NO">
4130
<MacroExpansion>
4231
<BuildableReference
4332
BuildableIdentifier = "primary"
@@ -47,30 +36,6 @@
4736
ReferencedContainer = "container:Examples.xcodeproj">
4837
</BuildableReference>
4938
</MacroExpansion>
50-
<Testables>
51-
<TestableReference
52-
skipped = "NO">
53-
<BuildableReference
54-
BuildableIdentifier = "primary"
55-
BlueprintIdentifier = "542BE47134765F0824559C2F"
56-
BuildableName = "ExamplesTests.xctest"
57-
BlueprintName = "ExamplesTests"
58-
ReferencedContainer = "container:Examples.xcodeproj">
59-
</BuildableReference>
60-
</TestableReference>
61-
<TestableReference
62-
skipped = "NO">
63-
<BuildableReference
64-
BuildableIdentifier = "primary"
65-
BlueprintIdentifier = "F3570A57FF15EEC3B4529EF0"
66-
BuildableName = "ExamplesUITests.xctest"
67-
BlueprintName = "ExamplesUITests"
68-
ReferencedContainer = "container:Examples.xcodeproj">
69-
</BuildableReference>
70-
</TestableReference>
71-
</Testables>
72-
<CommandLineArguments>
73-
</CommandLineArguments>
7439
<EnvironmentVariables>
7540
<EnvironmentVariable
7641
key = "MTL_HUD_ENABLED"
@@ -98,6 +63,37 @@
9863
isEnabled = "YES">
9964
</EnvironmentVariable>
10065
</EnvironmentVariables>
66+
<TestPlans>
67+
<TestPlanReference
68+
reference = "container:Tests/TestPlans/Examples.xctestplan"
69+
default = "YES">
70+
</TestPlanReference>
71+
<TestPlanReference
72+
reference = "container:Tests/TestPlans/Examples no unit tests.xctestplan">
73+
</TestPlanReference>
74+
</TestPlans>
75+
<Testables>
76+
<TestableReference
77+
skipped = "NO">
78+
<BuildableReference
79+
BuildableIdentifier = "primary"
80+
BlueprintIdentifier = "542BE47134765F0824559C2F"
81+
BuildableName = "ExamplesTests.xctest"
82+
BlueprintName = "ExamplesTests"
83+
ReferencedContainer = "container:Examples.xcodeproj">
84+
</BuildableReference>
85+
</TestableReference>
86+
<TestableReference
87+
skipped = "NO">
88+
<BuildableReference
89+
BuildableIdentifier = "primary"
90+
BlueprintIdentifier = "F3570A57FF15EEC3B4529EF0"
91+
BuildableName = "ExamplesUITests.xctest"
92+
BlueprintName = "ExamplesUITests"
93+
ReferencedContainer = "container:Examples.xcodeproj">
94+
</BuildableReference>
95+
</TestableReference>
96+
</Testables>
10197
</TestAction>
10298
<LaunchAction
10399
buildConfiguration = "Debug"
@@ -119,8 +115,6 @@
119115
ReferencedContainer = "container:Examples.xcodeproj">
120116
</BuildableReference>
121117
</BuildableProductRunnable>
122-
<CommandLineArguments>
123-
</CommandLineArguments>
124118
<EnvironmentVariables>
125119
<EnvironmentVariable
126120
key = "MTL_HUD_ENABLED"
@@ -165,8 +159,6 @@
165159
ReferencedContainer = "container:Examples.xcodeproj">
166160
</BuildableReference>
167161
</BuildableProductRunnable>
168-
<CommandLineArguments>
169-
</CommandLineArguments>
170162
<EnvironmentVariables>
171163
<EnvironmentVariable
172164
key = "MTL_HUD_ENABLED"

Gemfile.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ PLATFORMS
224224
arm64-darwin-21
225225
arm64-darwin-22
226226
arm64-darwin-23
227+
arm64-darwin-24
227228

228229
DEPENDENCIES
229230
fastlane (= 2.219.0)

Sources/Examples/SwiftUI Examples/SwiftUIRoot.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ struct SwiftUIRoot: View {
5959
#endif
6060
ExampleLink("Precipitation", note: "Show show and rain", destination: PrecipitationExample())
6161
ExampleLink("Custom geometry", note: "Supply custom geometry to the map", destination: CustomGeometrySourceExample())
62+
ExampleLink("Studio style", note: "Test a Mapbox Studio style", destination: StudioStyleExample())
6263

6364
} header: { Text("Testing Examples") }
6465
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import SwiftUI
2+
import MapboxMaps
3+
4+
struct StudioStyleExample: View {
5+
@State private var mapStyle: MapStyle = .standard
6+
@State private var styleURLInputAlertPresented = false
7+
@State private var invalidStyleURLAlertPresented = false
8+
@State private var styleURLInput = ""
9+
10+
var body: some View {
11+
Map(initialViewport: .camera(center: CLLocationCoordinate2D(latitude: 51.5015, longitude: -0.1213), zoom: 15, bearing: 57, pitch: 60))
12+
.mapStyle(mapStyle)
13+
.ignoresSafeArea()
14+
.toolbar {
15+
Button("Change style") {
16+
styleURLInputAlertPresented = true
17+
}
18+
}
19+
.alert("Mapbox Style URL", isPresented: $styleURLInputAlertPresented) {
20+
TextField("Style URL", text: $styleURLInput)
21+
Button("Save") {
22+
Task {
23+
await saveStyleURLInput(styleURLInput)
24+
}
25+
}
26+
Button("Cancel", action: {})
27+
} message: {
28+
Text("Paste the “Share URL” for your public Mapbox style")
29+
}
30+
.alert("Invalid URL", isPresented: $invalidStyleURLAlertPresented) {
31+
Button("Cancel", action: {})
32+
} message: {
33+
Text("Please check your Mapbox Studio Style URL")
34+
}
35+
}
36+
37+
private func saveStyleURLInput(_ input: String) async {
38+
guard let url = URL(string: input),
39+
let styleURI = StyleURI(url: url) else {
40+
invalidStyleURLAlertPresented = true
41+
return
42+
}
43+
let style = MapStyle(uri: styleURI)
44+
mapStyle = style
45+
}
46+
}
47+
48+
struct StudioStyleExample_Previews: PreviewProvider {
49+
static var previews: some View {
50+
StudioStyleExample()
51+
}
52+
}

Tests/TestPlans/Examples.xctestplan

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
],
2929
"target" : {
3030
"containerPath" : "container:Examples.xcodeproj",
31-
"identifier" : "077C4F0A252F7E89007636F1",
31+
"identifier" : "F3570A57FF15EEC3B4529EF0",
3232
"name" : "ExamplesUITests"
3333
}
3434
},
3535
{
3636
"target" : {
3737
"containerPath" : "container:Examples.xcodeproj",
38-
"identifier" : "077C4EFF252F7E89007636F1",
38+
"identifier" : "542BE47134765F0824559C2F",
3939
"name" : "ExamplesTests"
4040
}
4141
},

0 commit comments

Comments
 (0)