From 842777ea4a02b31dc4df8bee263f6f6d635504c1 Mon Sep 17 00:00:00 2001 From: Zhongshu Audit Date: Sat, 20 Jun 2026 21:32:46 +0800 Subject: [PATCH] chore(ci): pin Xcode 16.4 to fix Xcode_16.0.app not found The macos-14 runner image no longer ships Xcode 16.0; the default is now Xcode 16.4. Pin the runner to that version explicitly so `xcode-select -s /Applications/Xcode_16.4.app` succeeds. Also drops the build matrix `xcode` field, since the runner only has one Xcode available and we do not test across multiple Xcode versions on the audit/appstore-prep branch. Refs: AUDIT_APPSTORE.md P0-1 --- .github/workflows/ci.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6141dc..834b041 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,14 +17,23 @@ jobs: # ========================================================= lint: name: SwiftLint + # macos-14 runner ships Xcode 16.x (default 16.4 in 2026). We pin to + # 16.4 instead of hard-coding a path because the runner image is + # refreshed regularly and `/Applications/Xcode_16.0.app` is no + # longer pre-installed — that's the bug this PR fixes. runs-on: macos-14 steps: - uses: actions/checkout@v4 - - name: Select Xcode - run: sudo xcode-select -s /Applications/Xcode_16.0.app + - name: Select Xcode 16.4 + run: sudo xcode-select -s /Applications/Xcode_16.4.app - name: Install SwiftLint run: brew install swiftlint - name: Run SwiftLint + # Run twice: --quiet to fail on errors only, --strict to fail + # on warnings too. The current .swiftlint.yml is intentionally + # permissive (line_length, file_length, function_body_length, + # type_body_length are all disabled) so this should pass on + # the audit/appstore-prep branch. run: | swiftlint lint --quiet swiftlint lint --quiet --strict @@ -41,12 +50,10 @@ jobs: matrix: destination: - generic/platform=iOS Simulator - xcode: - - "16.0" steps: - uses: actions/checkout@v4 - - name: Select Xcode ${{ matrix.xcode }} - run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app + - name: Select Xcode 16.4 + run: sudo xcode-select -s /Applications/Xcode_16.4.app - name: Install XcodeGen run: brew install xcodegen - name: Generate project @@ -71,8 +78,8 @@ jobs: runs-on: macos-14 steps: - uses: actions/checkout@v4 - - name: Select Xcode - run: sudo xcode-select -s /Applications/Xcode_16.0.app + - name: Select Xcode 16.4 + run: sudo xcode-select -s /Applications/Xcode_16.4.app - name: Install XcodeGen run: brew install xcodegen - name: Generate project