Skip to content

Commit

Permalink
Update codeql.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeswitz authored Dec 17, 2024
1 parent ec82410 commit 17fa5ba
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 17fa5ba

Please sign in to comment.