From 7d91fdaaf3fc0f7047dcfd4fe9713d65d3f7df3e Mon Sep 17 00:00:00 2001 From: Bill Booth Date: Thu, 8 Oct 2026 21:51:35 -0700 Subject: [PATCH] Fix CodeQL Swift build on macos-26 runners Pin Xcode 26.5 (Xcode_16.2 no longer exists on macos-latest), skip macro fingerprint validation for Mockable, build against a generic simulator destination instead of a hardcoded iOS 18.4 SDK/device, and pin action references to commit SHAs. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/codeql.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 3ef5165..85e43d1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -57,9 +57,14 @@ jobs: # - name: Setup runtime (example) # uses: actions/setup-example@v1 - - name: Set Xcode version 16.2 + - name: Set Xcode version if: ${{ matrix.language == 'swift' }} - run: sudo xcode-select -s /Applications/Xcode_16.2.app + run: sudo xcode-select -s /Applications/Xcode_26.5.app + + - name: Disable macro validation + if: ${{ matrix.language == 'swift' }} + run: | + defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -83,7 +88,9 @@ jobs: - if: matrix.build-mode == 'manual' shell: bash run: | - xcodebuild -project SnapSafe.xcodeproj/ -scheme SnapSafe -configuration Debug -sdk iphonesimulator18.4 -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.4' -derivedDataPath ./build CODE_SIGNING_ALLOWED=NO clean build + xcodebuild -project SnapSafe.xcodeproj -scheme SnapSafe -configuration Debug \ + -destination 'generic/platform=iOS Simulator' -derivedDataPath ./build \ + -skipMacroValidation CODE_SIGNING_ALLOWED=NO clean build - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@02c5e83432fe5497fd85b873b6c9f16a8578e1d9 # v3