Disable the test case testSDGraphicsImageRenderer on GitHub actions because it does not connect to a display

Only run on local Mac
This commit is contained in:
DreamPiggy 2023-07-17 15:32:03 +08:00
parent 512eb997ca
commit 8dbf8ed97a
1 changed files with 6 additions and 0 deletions

View File

@ -123,6 +123,12 @@
#endif
CGSize size = CGSizeMake(100, 100);
SDGraphicsImageRenderer *renderer = [[SDGraphicsImageRenderer alloc] initWithSize:size format:format];
#if SD_MAC
// GitHub action's Mac does not connect to a display, so the ImageRenderer color space is wrong :(
if (NSProcessInfo.processInfo.environment[@"GITHUB_ACTIONS"]) {
return;
}
#endif
UIColor *color = UIColor.redColor;
NSLog(@"Draw Color ColorSpace: %@", color.CGColor);
UIImage *image = [renderer imageWithActions:^(CGContextRef _Nonnull context) {