Skip to content

chore: don't change system xcode on CI - WPB-27247#5035

Open
samwyndham wants to merge 10 commits into
developfrom
chore/ci-multi-xcode-runners-WPB-27247
Open

chore: don't change system xcode on CI - WPB-27247#5035
samwyndham wants to merge 10 commits into
developfrom
chore/ci-multi-xcode-runners-WPB-27247

Conversation

@samwyndham

@samwyndham samwyndham commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator
TaskWPB-27247 [iOS] Update CI scripts to work in a multi Xcode version environment

Issue

Currently our GitHub action workflows use xcode-select to select the version of Xcode defined by the .xcode-version file. When we move to in house runners, we will have multiple concurrent runners operating directly on the host macs (i.e. not running in a VM). Allowing xcode-select will mean the GitHub action jobs can conflict with each other. Instead in this PR we set the DEVELOPER_DIR which sets xcode build tools for the current process.

This PR also migrates fastlane to use the built in xcodes command which replaces the xcode-install 3rd party gem.

Testing

Run GitHub action workflows. Test run here: https://github.com/wireapp/wire-ios/actions/runs/29829726026


Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

Copilot AI review requested due to automatic review settings July 21, 2026 09:32
Comment thread fastlane/Fastfile

# Fetch dependencies and prepare for building a release
def prepare_for_release(options)
xcode_version = options[:xcode_version]

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xcode_version was unused

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Wire iOS CI to avoid globally switching Xcode with xcode-select (which can conflict on shared/self-hosted macOS runners) by selecting Xcode per job/process via DEVELOPER_DIR, and centralizes Xcode setup into a reusable composite action.

Changes:

  • Introduces a local composite GitHub Action (.github/actions/setup-xcode) that reads .xcode-version and exports DEVELOPER_DIR for the job.
  • Updates reusable workflows/composite setup to use the new local action instead of maxim-lobanov/setup-xcode.
  • Removes the xcode-install Ruby dependency and updates Fastlane to use xcodes(select_for_current_build_only: true).

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
setup.sh Updates the Xcode version prerequisite message to mention DEVELOPER_DIR as an alternative to global xcode-select.
Gemfile Removes xcode-install dependency.
Gemfile.lock Locks in the dependency removal for xcode-install.
fastlane/Fastfile Switches Xcode selection calls to Fastlane’s xcodes(...) action.
.github/workflows/_reusable_run_tests.yml Uses the new local setup-xcode composite action for Xcode setup.
.github/workflows/_reusable_app_release.yml Uses the new local setup-xcode composite action for Xcode setup.
.github/actions/setup-xcode/action.yaml Adds new composite action to set DEVELOPER_DIR based on .xcode-version.
.github/actions/setup-test-environment/action.yaml Switches environment setup to use the new local setup-xcode action and preserves Xcode version output usage for cache keys.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/actions/setup-xcode/action.yaml
Comment thread fastlane/Fastfile
Comment thread fastlane/Fastfile
Comment thread setup.sh
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Test Results

   25 files  1 276 suites   12m 38s ⏱️
9 453 tests 9 421 ✅ 32 💤 0 ❌
9 465 runs  9 433 ✅ 32 💤 0 ❌

Results for commit 76776d1.

♻️ This comment has been updated with latest results.

Summary: workflow run #29829726026
Allure report (download zip): html-report-78-chore_ci-multi-xcode-runners-WPB-27247

samwyndham and others added 3 commits July 21, 2026 14:10
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@samwyndham
samwyndham enabled auto-merge July 21, 2026 12:21
@samwyndham
samwyndham disabled auto-merge July 21, 2026 12:21

@johnxnguyen johnxnguyen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work

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

Successfully merging this pull request may close these issues.

4 participants