diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d077c2a..f4b9c7d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -40,39 +40,38 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - # Skip installing CocoaPods since pods are already in the repo - - name: Use existing CocoaPods setup + - name: Clean Derived Data if: matrix.language == 'swift' run: | - echo "Pods are already installed, skipping pod install" + rm -rf ~/Library/Developer/Xcode/DerivedData/* - # Run pod install to ensure synchronization without changing the Pods folder - - name: Ensure Podfile and Podfile.lock are in sync + - name: Set Excluded Architectures for Simulator if: matrix.language == 'swift' run: | - pod install --repo-update + echo "EXCLUDED_ARCHITECTURES=arm64" >> "$GITHUB_WORKSPACE/WarDragon.xcconfig" + + - name: Use existing CocoaPods setup + if: matrix.language == 'swift' + run: | + echo "Pods are already installed, skipping pod install" - # Initializes the CodeQL tools for scanning - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} - # Set up Xcode 16 - name: Set up Xcode 16 if: matrix.language == 'swift' uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: '16.0' - # Build the Swift project for physical device (no simulator) - - name: Build Swift project for physical device + - name: Build Swift project for simulator (excluding arm64) if: matrix.language == 'swift' run: | - xcodebuild -scheme WarDragon -destination 'platform=iOS Simulator,name=iPhone 15 Pro,OS=18.1' clean build + xcodebuild -scheme WarDragon -destination 'platform=iOS Simulator,name=iPhone 15 Pro,OS=18.1' ONLY_ACTIVE_ARCH=YES ARCHS="x86_64" clean build - # Perform CodeQL Analysis - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 with: