Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find an installed Xcode satisfying '13.4' on macos-12-Readme.md #6108

Closed
2 of 10 tasks
ghost opened this issue Aug 18, 2022 · 13 comments
Closed
2 of 10 tasks

Cannot find an installed Xcode satisfying '13.4' on macos-12-Readme.md #6108

ghost opened this issue Aug 18, 2022 · 13 comments
Assignees
Labels
bug report external OS: macOS question Further information is requested

Comments

@ghost
Copy link

ghost commented Aug 18, 2022

Description

Cant fint Xcode 13.4 via xcversion on macos-12.

GitHub workflow

on:
   ...
  
jobs:
  test:
    name: XCTests

    runs-on: macos-12
    strategy:
      matrix:
        destination: ['platform=iOS Simulator,OS=15.5,name=iPhone 13 Pro Max']
        xcode: ['/Applications/Xcode_13.4.app/Contents/Developer']

    steps:
    - name: Checkout
      timeout-minutes: 5
      uses: actions/checkout@v2
      with:
        lfs: true
    - name: Cache
      timeout-minutes: 5
      uses: actions/cache@v2
      id: myId
      with:
        path: SourcePackages
        key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
    - name: Bundle Install
      timeout-minutes: 5
      run: bundle install
    - name: Swiftgen Install
      timeout-minutes: 5
      run: brew install swiftgen
    - name: Git-LFS Install
      timeout-minutes: 5
      run: brew install git-lfs
    - name: Build and Test
      timeout-minutes: 30
      run: bundle exec fastlane ios allTests

grafik

Platforms affected

  • Azure DevOps
  • GitHub Actions

Virtual environments affected

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 10.15
  • macOS 11
  • macOS 12
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Current runner version: '2.295.0'
Operating System
macOS
12.5
21G72
Virtual Environment
Environment: macos-12
Version: 20220815.1
Included Software: https://github.com/actions/runner-images/blob/macOS-12/20220815.1/images/macos/macos-12-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/macOS-12%2F20220815.1
Runner Image Provisioner
1.0.0.0-main-20220812-3
GITHUB_TOKEN Permissions
Actions: write
Checks: write
Contents: write
Deployments: write
Discussions: write
Issues: write
Metadata: read
Packages: write
Pages: write
PullRequests: write
RepositoryProjects: write
SecurityEvents: write
Statuses: write
Secret source: Actions
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v2' (SHA:7884fcad6b5d53d10323aee724dc68d8b9096a2e)
Download action repository 'actions/cache@v2' (SHA:937d24475381cd9c75ae6db12cb4e79714b926ed)

Is it regression?

idk

Expected behavior

can find xcode 13.4 on macos-12

Actual behavior

can not find xcode 13.4 on macos-12

Repro steps

see description - default workflow

@al-cheb
Copy link
Contributor

al-cheb commented Aug 18, 2022

Hello @StNebel.
Please use maxim-lobanov/setup-xcode@v1 task

- uses: maxim-lobanov/setup-xcode@v1
  with:
        xcode-version: '13.4.0'

image

@al-cheb al-cheb added question Further information is requested OS: macOS and removed needs triage labels Aug 18, 2022
@sepbehroozi
Copy link

sepbehroozi commented Aug 18, 2022

Same issue here.
The output of the xcversion installed command might differ each time you run the workflow. I believe using the maxim-lobanov/setup-xcode@v1 task can't help as the needed Xcode version is not installed at all.
The screenshots are related to running our workflow on a PR multiple times.

Same configurations:

  • Platform: Github Actions
  • Virtual environments affected: macOS 12

Screenshot 2022-08-18 at 13 20 16
Screenshot 2022-08-18 at 13 17 04

@al-cheb
Copy link
Contributor

al-cheb commented Aug 18, 2022

I can't reproduce the issue. It works as expected:

image

@sepbehroozi
Copy link

I can't reproduce the issue. It works as expected:

image

You might catch the error if you try to run your workflow a few times more. Sometimes not all Xcode versions are available.

@al-cheb
Copy link
Contributor

al-cheb commented Aug 18, 2022

@3pehrbehroozi, Could you provide minimal repro steps with repo?

@sepbehroozi
Copy link

sepbehroozi commented Aug 18, 2022

@al-cheb It happens sometimes. I'm having the issue with a private repo that can't be shared.
Some of our tools depend on a specific version of Xcode, which should be available in macOS 12 VMs as per the README.md file here. I have a step on my workflow to check the available Xcode versions using this command:
bundle exec xcversion installed
Each time we trigger the workflow on a PR, the result of the command above might differ (where it should be the same everytime I believe)

The repro steps are easy, but it's not happening every time:

  1. Have a workflow in which you check the installed Xcode versions (like what you shared with your screenshot)
  2. Run the workflow a few times
  3. You'll see the installed Xcode versions will not be the same on each run.
    Doesn't matter if you're using maxim-lobanov/setup-xcode@v1 or not. The particular version of Xcode is not installed at all. Sometimes it only have versions 14 and 13.4.1 installed. Other times all mentioned versions on README.md are available.

For our case, we have to run the workflows 5 - 6 times until we hit the version we need.

@al-cheb
Copy link
Contributor

al-cheb commented Aug 18, 2022

@3pehrbehroozi, Could you please provide a link to the failed build and info about the image? If you have the same image I think this is a bug in xcversion.

image

@sepbehroozi
Copy link

@al-cheb Runner version is the same but I'm running on a macOS 12 VM.
The build is on a private repo, so I can't share the link to the failed build. But, Here are the details:

Screenshot 2022-08-18 at 15 43 03

@al-cheb
Copy link
Contributor

al-cheb commented Aug 18, 2022

@3pehrbehroozi, I was able to reproduce the same behavior, but Xcode 13.4 exists.

image

@sepbehroozi
Copy link

@al-cheb True. And that's the issue. Not all mentioned Xcode versions are available every time.
I'm expecting 13.1 to be installed on the macOS 12 VM, but I'm getting failure because it isn't.

@al-cheb
Copy link
Contributor

al-cheb commented Aug 18, 2022

@al-cheb True. And that's the issue. Not all mentioned Xcode versions are available every time. I'm expecting 13.1 to be installed on the macOS 12 VM, but I'm getting failure because it isn't.

Looks like a bug with xcversion not with the image.

@sepbehroozi
Copy link

@al-cheb Yup. Confirming with some debugging.
Although we have other versions of Xcode available in the /Applications/ folder, xcversion won't consider them as installed.

The command I put after the listing all Xcode apps is:

ls -a /Applications | grep Xcode

Screenshot 2022-08-18 at 16 01 28

@al-cheb
Copy link
Contributor

al-cheb commented Aug 19, 2022

Close as external - xcpretty/xcode-install#465

@al-cheb al-cheb closed this as completed Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report external OS: macOS question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants