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

Xcode and xcodebuild versions are not matching #75

Open
kstoletniy opened this issue Jan 15, 2024 · 3 comments
Open

Xcode and xcodebuild versions are not matching #75

kstoletniy opened this issue Jan 15, 2024 · 3 comments

Comments

@kstoletniy
Copy link

A few weeks ago, the workflow utilizing the macOS-13 runner unexpectedly began to fail. Prior to this, the workflow was functioning correctly, and no modifications were made to the workflow file. The failure stemmed from the fact that the Swift tool version was outdated compared to the one utilized in my project's packages. In my local project, I employ Xcode 15.2, so I specified '15.2-beta' in the workflow.

After an extensive investigation into the potential cause of the issue, I discovered that xcodebuild was pointing to version 14.3.1, leading to the problems encountered.

Three weeks ago, everything was functioning smoothly, and both the Xcode version and xcodebuild matched seamlessly. It appears that an issue was introduced recently, causing the discrepancy.

I urgently request assistance in resolving this matter as it is impeding all of my workflows.

Image version and build link
Version: 20240106.8
Included Software: https://github.com/actions/runner-images/blob/macos-13/20240106.8/images/macos/macos-13-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/macos-13%2F20240106.8

Expected behavior
The xcode version and xcodebuild version should match always. i.e.
Screenshot 2024-01-15 at 10 31 58

Actual behavior
The xcode version and xcodebuild version are not matching versions.
Screenshot 2024-01-15 at 10 26 32

@maxim-lobanov
Copy link
Owner

Hey 👋
We didn't have any updated to this action from Sep 2023. So if workflow started to fail without changes on your side, most likely it is related to image and worth to be reported to https://github.com/actions/runner-images repo.

Could you please confirm that issue is still reproduced for you?
I can't repro it using the following workflow file:

jobs:
  build:
    runs-on: macos-13
    steps:
    - uses: maxim-lobanov/setup-xcode@v1
      with:
        xcode-version: '15.2-beta'
    - run: |
        xcode-select -print-path
    - run: |
        xcodebuild -version

I wonder if something on image side is changed again and fixed it 🤔

If it is still reproduced for you, could you run the same workflow in your repo (with xcode-select -print-path step and share logs)

@sisoje
Copy link

sisoje commented Aug 1, 2024

why not set the explicit version that user wants? I could not set 16.0.0

@jeffremer
Copy link

jeffremer commented Aug 3, 2024

Just ran into this. It's likely been failing silently for a while since we're only now bumping up from 15.1 to 15.4.

On our self-hosted runners, the workflow:

name: xcode-select
description: Uses .xcode-version to set the Xcode version
runs:
  using: "composite"
  steps:
    - id: version
      shell: sh
      run: |
        version=$(cat .xcode-version)
        echo "Setting Xcode version to: $version"
        echo "xcode-version=$version" >> $GITHUB_OUTPUT
    - uses: maxim-lobanov/setup-xcode@v1
      with:
        xcode-version: ${{ steps.version.outputs.xcode-version }}
    - name: Print Xcode version
      shell: sh
      run: |
        xcode-select -print-path
        xcodebuild -version
        swift -version

Example output:

Screenshot 2024-08-02 at 6 19 08 PM

I'm guessing the GitHub actions runners allowed sudoers or something similar, but that's not the default so our self-hosted runners have been failing silently. It'd be nice at least if the action errored out in that case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants