Xcode performance tests written with the XCTest.measure()
API pass or fail depending on the "baseline" performance which must be set manually in Xcode and stored in ProjectName.xcodeproj/xcshareddata/xcbaselines/
. As of Xcode 13.2.1 these baselines can only be set for your current device + simulator combo. For example, if you run the performance tests on another machine with a different processor it will ignore the baseline you set before. This makes sense because different configurations could have very different performance characteristics.
But this presents a problem when running performance test on a headless CI server. How can I set the performance baselines for my headless CI server?
I don't have access to the Xcode UI and xcodebuild
doesn't seem to provide a way to set baselines.
And to be clear, the tests do execute sucessfully on my CI server, but they will never fail because baselines are not set.