actions / runner-images

GitHub Actions runner images
MIT License
9.39k stars 2.91k forks source link

macos-14 image changes version from `2.314.1` to `2.316.0` breaks the iOS simulator to use HEIF/HEVC codec encoder #9791

Open dreampiggy opened 2 months ago

dreampiggy commented 2 months ago

Description

We're testing the macOS System framework HEIF/HEVC encoder API

However, we found that the runner image version bump(not controlled by me) from 2.314.1 to 2.316.0 breaks the Apple System framework HEIF/HEVC encoder API's behavior.

The error log shows (from macOS system framework):

2024-04-26 08:59:58.966569+0000 xctest[6991:32863] [xctest] writeImageAtIndex:962: *** CMPhotoCompressionSessionAddImage: err = kCMPhotoError_UnsupportedOperation [-16994]    (codec: 'hvc1')

(note: The only changes in the git repo between these 2 action run is only comments, should not effect the result: https://github.com/SDWebImage/SDWebImage/commit/ea2e3d5debbe19f5f59284cf2c605c67dac3cdbd)

And, I can ensure that when running on physical MacBook Pro 15 M1 Pro, the API returns correctly (which may use the Apple M1 chip's media codec for HEVC decoding).

Platforms affected

Runner images affected

Image version and build link

Works: 2.314.1 Broken: 2.316.0

Is it regression?

yes

Expected behavior

The Apple's ImageIO API for HEIF/HEVC encoder should work as expected.

Actual behavior

The Apple's ImageIO API for HEIF/HEVC encoder just report error

Repro steps

  1. Use Apple's System HEIF/HEVC encoder API to decode any HEIF image, like my demo: https://github.com/SDWebImage/SDWebImage/blob/master/Tests/Tests/Images/TestImage.heic
  2. Run on macos-14 runner in version 2.316.0, see failure
  3. Run on macos-14 runner in version 2.314.1, see success
dreampiggy commented 2 months ago

Sorry for the misunderstanding. The broken is HEVC encoding, not HEVC decoding

dreampiggy commented 2 months ago

Similar: https://github.com/rlxone/Equinox/issues/66

Is this the macOS system bug ? What's the actual macOS version number between runner 2.314.1 and 2.316.0 ?

2.314.1

Current runner version: '2.314.1'
Operating System
  macOS
  14.2.1
  23C71
Runner Image
  Image: macos-14-arm64
  Version: 20240116.1
  Included Software: https://github.com/actions/runner-images/blob/macOS-14/20240116.1/images/macos/macos-14-arm64-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/macOS-14%2F20240116.1
Runner Image Provisioner
  2.0.329.1+b3ad46f283ae2edf89fbf23e452357fca7144186

2.316.0

Current runner version: '2.316.0'
Operating System
  macOS
  14.4.1
  23E224
Runner Image
  Image: macos-14-arm64
  Version: 20240422.3
  Included Software: https://github.com/actions/runner-images/blob/macos-14-arm64/20240422.3/images/macos/macos-14-arm64-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/macos-14-arm64%2F20240422.3
Runner Image Provisioner
  2.0.369.1+55cddbb57f254a369b6e7b3b508cebdbee5d24be
dreampiggy commented 2 months ago

I guess this maybe a macOS system bug which introduced during minor version bump (14.2.1 -> 14.4.1)

How can I use github action yaml to declare the exact macOS version I want to use ?😼

dreampiggy commented 2 months ago

For now, since I use GitHub action as free service and not paid service... I quickly ignore HEIF encoding in the unit test :(

https://github.com/SDWebImage/SDWebImage/pull/3710

image

erik-bershel commented 1 month ago

Hey @dreampiggy! Thank you for bringing it into our attention. We'll take a closer look. I may say that it seems as a macOS degradation itself, but should be checked for sure.

UPD: There is no way to choose image/OS version.