maxim-lobanov / setup-xcode

Set up your GitHub Actions workflow with a specific version of Xcode
MIT License
280 stars 28 forks source link

Sometimes unable to find Xcode 13.2 #37

Closed simondelphia closed 2 years ago

simondelphia commented 2 years ago

I realize that Xocde 13.2 is still marked as Beta in Github Actions but most of the time running setup-xcode in our workflow without explicitly specifying "beta" works fine (at least 80% of the time). But sometimes it fails to find Xcode 13.2 and the workflow run fails prematurely.

Is this expected? Is there a specific reason why it works some of the time but not other times?

Failure:

Prepare all required actions
Getting action download info
Download action repository 'maxim-lobanov/setup-xcode@v1' (SHA:86839dbc5bbd0e843469a29e29672baa578e81f6)
Run ./.github/workflows/actions/xcode
Run maxim-lobanov/setup-xcode@v1
Switching Xcode to version '13.2'...
Available versions:
┌─────────┬──────────┬─────────────┬─────────────┬────────┬──────────────────────────────────┐
│ (index) │ version  │ buildNumber │ releaseType │ stable │               path               │
├─────────┼──────────┼─────────────┼─────────────┼────────┼──────────────────────────────────┤
│    0    │ '13.2.0' │ '13C5081f'  │   'Beta'    │ false  │  '/Applications/Xcode_13.2.app'  │
│    1    │ '13.1.0' │ '13A1030d'  │    'GM'     │  true  │  '/Applications/Xcode_13.1.app'  │
│    2    │ '13.0.0' │  '13A233'   │    'GM'     │  true  │  '/Applications/Xcode_13.0.app'  │
│    3    │ '12.5.1' │  '12E507'   │    'GM'     │  true  │ '/Applications/Xcode_12.5.1.app' │
│    4    │ '12.4.0' │   '12D4e'   │    'GM'     │  true  │  '/Applications/Xcode_12.4.app'  │
│    5    │ '11.7.0' │  '11E801a'  │    'GM'     │  true  │  '/Applications/Xcode_11.7.app'  │
└─────────┴──────────┴─────────────┴─────────────┴────────┴──────────────────────────────────┘
Error: Could not find Xcode version that satisfied version spec: '13.2'

Success:

Prepare all required actions
Getting action download info
Download action repository 'maxim-lobanov/setup-xcode@v1' (SHA:86839dbc5bbd0e843469a29e29672baa578e81f6)
Run ./.github/workflows/actions/xcode
Run maxim-lobanov/setup-xcode@v1
Switching Xcode to version '13.2'...
Xcode is set to 13.2.0 (13C90)

EDIT: I guess I just answered my own question… seems that some of Github Action's computers are still running the RC build of Xcode (13C5081f) whereas others have the new one (13C90). I will ask them over in the virtual environments repo.

maxim-lobanov commented 2 years ago

Yes, it is the case. Some machines are definitely outdated and contain RC version. If specifying xcode-version: latest works for you, it should stop to fail and choose either beta or GM (I know it is not ideal :) ) If you specify exact version as 13.2, it is looking for GM version only. If 13.2-beta - only beta versions