ci: update v9 workflows to use macos-14/15, Xcode 15.4/16.4, and newer simulators#495
Conversation
…r simulators Update GitHub Actions workflows and CI composite action to match v10: - Replace macos-13 runners with macos-15 (primary) and macos-14 (secondary) - Update Xcode versions from 15.0.1/14.3.1 to 16.4.0/15.4.0 - Update iOS simulator targets to iPhone 16/iPhone 15 (without pinned OS) - Add explicit swiftlint and xcpretty installation steps - Add SwiftLint and Sourcery failure output logging steps This unblocks the v9 release workflow which was failing with: 'The configuration macos-13-us-default is not supported' Co-Authored-By: tanderson@launchdarkly.com <tanderson@launchdarkly.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: tanderson@launchdarkly.com <tanderson@launchdarkly.com>
| runOnlyForDeploymentPostprocessing = 0; | ||
| shellPath = /bin/sh; | ||
| shellScript = "# Adds support for Apple Silicon brew directory\nexport PATH=\"$PATH:/opt/homebrew/bin\"\n\nif which mint >/dev/null; then\n /usr/bin/xcrun --sdk macosx mint run realm/SwiftLint\nelse\n echo \"warning: mint not installed, available from https://github.com/yonaskolb/Mint\"\nfi\n"; | ||
| shellScript = "# Adds support for Apple Silicon brew directory\nexport PATH=\"$PATH:/opt/homebrew/bin\"\n\n# Write to a file in the workspace that persists after build\nLOG_FILE=\"${SRCROOT}/swiftlint_build_output.log\"\n\necho \"[SwiftLint] Starting SwiftLint check...\" >> \"$LOG_FILE\"\necho \"[SwiftLint] PATH: $PATH\" >> \"$LOG_FILE\"\necho \"[SwiftLint] Working directory: $(pwd)\" >> \"$LOG_FILE\"\necho \"[SwiftLint] SRCROOT: ${SRCROOT}\" >> \"$LOG_FILE\"\n\n# Try system swiftlint first (installed via brew in CI), fall back to mint\nif command -v swiftlint >/dev/null 2>&1; then\n SWIFTLINT_CMD=$(command -v swiftlint)\n echo \"[SwiftLint] Using system swiftlint at: $SWIFTLINT_CMD\" >> \"$LOG_FILE\"\n set +e\n \"$SWIFTLINT_CMD\" >> \"$LOG_FILE\" 2>&1\n SWIFTLINT_EXIT_CODE=$?\n set -e\n echo \"[SwiftLint] Exit code: $SWIFTLINT_EXIT_CODE\" >> \"$LOG_FILE\"\n exit $SWIFTLINT_EXIT_CODE\nelif which mint >/dev/null; then\n echo \"[SwiftLint] Using mint, found at: $(which mint)\" >> \"$LOG_FILE\"\n echo \"[SwiftLint] Running: /usr/bin/xcrun --sdk macosx mint run realm/SwiftLint\" >> \"$LOG_FILE\"\n set +e\n /usr/bin/xcrun --sdk macosx mint run realm/SwiftLint >> \"$LOG_FILE\" 2>&1\n SWIFTLINT_EXIT_CODE=$?\n set -e\n echo \"[SwiftLint] Exit code: $SWIFTLINT_EXIT_CODE\" >> \"$LOG_FILE\"\n exit $SWIFTLINT_EXIT_CODE\nelse\n echo \"warning: Neither swiftlint nor mint found. SwiftLint check skipped.\" >> \"$LOG_FILE\"\n echo \"warning: Install swiftlint via 'brew install swiftlint' or mint via 'brew install mint'\"\nfi\n"; |
There was a problem hiding this comment.
SwiftLint output redirected away from Xcode build log
Medium Severity
The SwiftLint build phase scripts now redirect all output to a log file with >> "$LOG_FILE" 2>&1, which means Xcode no longer receives SwiftLint's stdout/stderr. Previously, output went directly to the build log where Xcode could parse it to show inline warnings and errors in the source editor. This silently breaks SwiftLint annotations in Xcode for all local development. The same applies to Sourcery output in 83411A56. The CI debug logging goal could be achieved by teeing output instead of redirecting it entirely.
Additional Locations (2)
| runOnlyForDeploymentPostprocessing = 0; | ||
| shellPath = /bin/sh; | ||
| shellScript = "# Adds support for Apple Silicon brew directory\nexport PATH=\"$PATH:/opt/homebrew/bin\"\n\nif which mint >/dev/null; then\n /usr/bin/xcrun --sdk macosx mint run realm/SwiftLint\nelse\n echo \"warning: mint not installed, available from https://github.com/yonaskolb/Mint\"\nfi\n"; | ||
| shellScript = "# Adds support for Apple Silicon brew directory\nexport PATH=\"$PATH:/opt/homebrew/bin\"\n\n# Write to a file in the workspace that persists after build\nLOG_FILE=\"${SRCROOT}/swiftlint_build_output.log\"\n\necho \"[SwiftLint] Starting SwiftLint check...\" >> \"$LOG_FILE\"\necho \"[SwiftLint] PATH: $PATH\" >> \"$LOG_FILE\"\necho \"[SwiftLint] Working directory: $(pwd)\" >> \"$LOG_FILE\"\necho \"[SwiftLint] SRCROOT: ${SRCROOT}\" >> \"$LOG_FILE\"\n\n# Try system swiftlint first (installed via brew in CI), fall back to mint\nif command -v swiftlint >/dev/null 2>&1; then\n SWIFTLINT_CMD=$(command -v swiftlint)\n echo \"[SwiftLint] Using system swiftlint at: $SWIFTLINT_CMD\" >> \"$LOG_FILE\"\n set +e\n \"$SWIFTLINT_CMD\" >> \"$LOG_FILE\" 2>&1\n SWIFTLINT_EXIT_CODE=$?\n set -e\n echo \"[SwiftLint] Exit code: $SWIFTLINT_EXIT_CODE\" >> \"$LOG_FILE\"\n exit $SWIFTLINT_EXIT_CODE\nelif which mint >/dev/null; then\n echo \"[SwiftLint] Using mint, found at: $(which mint)\" >> \"$LOG_FILE\"\n echo \"[SwiftLint] Running: /usr/bin/xcrun --sdk macosx mint run realm/SwiftLint\" >> \"$LOG_FILE\"\n set +e\n /usr/bin/xcrun --sdk macosx mint run realm/SwiftLint >> \"$LOG_FILE\" 2>&1\n SWIFTLINT_EXIT_CODE=$?\n set -e\n echo \"[SwiftLint] Exit code: $SWIFTLINT_EXIT_CODE\" >> \"$LOG_FILE\"\n exit $SWIFTLINT_EXIT_CODE\nelse\n echo \"warning: Neither swiftlint nor mint found. SwiftLint check skipped.\" >> \"$LOG_FILE\"\n echo \"warning: Install swiftlint via 'brew install swiftlint' or mint via 'brew install mint'\"\nfi\n"; |
There was a problem hiding this comment.
Generated log files missing from .gitignore
Low Severity
The build phase scripts write swiftlint_build_output.log and sourcery_build_output.log to ${SRCROOT} (the repository root) using append mode (>>). These files are not listed in .gitignore, so they'll appear as untracked files after every local Xcode build and risk being accidentally committed. They also grow indefinitely across builds since append mode is used without ever truncating.
Additional Locations (1)
Co-Authored-By: tanderson@launchdarkly.com <tanderson@launchdarkly.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
… for v9 code Co-Authored-By: tanderson@launchdarkly.com <tanderson@launchdarkly.com>
…v10) Co-Authored-By: tanderson@launchdarkly.com <tanderson@launchdarkly.com>


Requirements
Related issues
Unblocks v9 releases — the
macos-13runner is no longer supported by GitHub Actions, causing all workflows to fail with:Describe the solution you've provided
Aligns v9 GitHub Actions workflows, CI composite action, build scripts, and tooling with v10's configuration:
Workflow files (
ci.yml,release-please.yml,manual-publish.yml,manual-publish-docs.yml):macos-13→macos-15(primary) /macos-14(secondary, inci.ymlmatrix)15.0.1/14.3.1→16.4.0/15.4.0iPhone 16/iPhone 15(OS version pins removed, matching v10)CI composite action (
.github/actions/ci/action.yml):brew install swiftlintstep (no longer pre-installed on newer runners)gem install xcprettystepXcode project build scripts (
LaunchDarkly.xcodeproj/project.pbxproj):swiftlintfirst, fall back tomint run, and log output (matching v10)Mintfile:
0.43.1→0.63.0(matching v10)1.2.1→2.3.0(matching v10).swiftlint.yml(v9-specific, not on v10):type_body_lengtherror threshold from 500 → 550 (v9'sLDClient.swiftis 539 lines; v10 refactored this below 500)large_tuplerule config with error threshold of 5 (v9'sDarklyService.swifthas a 4-member tuple that v10 removed)Describe alternatives you've considered
Could have pinned to
macos-14only as a minimal fix, but matching v10 ensures consistency across version branches and avoids needing another migration soon.Additional context
CI status:
macos-build (15.4.0, macos-14)— ✅ passingmacos-build (16.4.0, macos-15)— ❌ failed due to a flaky test (publishEventData__failure__calls_completion_with_error_and_no_data_or_responsetimed out). This is a pre-existing test timing issue, not related to the workflow changes.Human review checklist:
.swiftlint.ymlthreshold changes are acceptable for v9 (these deviate from v10's config since v9's source code differs)Link to Devin session: https://app.devin.ai/sessions/d37a5a4777fb46abb76d0edacf1e10e0