maxim-lobanov / setup-xcode

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

Using "runs-on: macos-13-xlarge" leads to inconsistencies #71

Closed piofusco closed 10 months ago

piofusco commented 10 months ago

Inconsistently seeing the following when trying to run any of my related workflows:

image

For more context, here's what most of our workflows look like

name: Continuous Integration
on: pull_request
concurrency:
  group: ${{ github.head_ref }}-unit-tests
  cancel-in-progress: true
jobs:
  unit-tests:
    runs-on: macos-13-xlarge
    timeout-minutes: 60
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Restore SPM Cache
        uses: actions/cache@v3
        with:
          path: SPMCache
          key: ${{ runner.os }}-spm-reduced-cache-${{ hashFiles('**/packages.yml') }}
          restore-keys: ${{ runner.os }}-spm-reduced-cache-
      - name: Xcode Configuration
        uses: maxim-lobanov/setup-xcode@v1
        with:
          xcode-version: '15.0.1'
      - name: Install ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 3.1.2
          bundler-cache: true
      - name: Install Xcodegen
        run: brew install xcodegen
      - name: Generate project
        run: xcodegen generate
      - name: Run Unit Tests
        run: bundle exec fastlane unit_tests
        env:
          CI: true
          HAS_PACKAGES_CACHE_HIT: ${{ steps.packages-cache.outputs.cache-hit == 'true' }}

While I imagine this might be related to this Github actions issue, I figured it couldn't hurt to be sure I am not missing something.

maxim-lobanov commented 10 months ago

Hi @piofusco,

Yes, I think it is GitHub Actions issue. This action only switches pre-installed Xcode versions and based on your screenshot it is pretty clear that job is run on VM where Xcode 15.0.1 is not installed.

To confirm it, could you please check the logs of jobs:

Open logs of "Set up job" step and Runner image section: Image

I guess you will see the different image version. If it is true, it is worth to add additional information to https://github.com/actions/runner-images/issues/8697. Looks like some macOS VMs were not updated properly with new image version 😢

piofusco commented 10 months ago

Thanks for the quick response! Will do some more digging to provide GitHub Actions more information.