Skip to content

Commit cc9da9b

Browse files
Update codeql.yml
1 parent a26e8c1 commit cc9da9b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/codeql.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,14 @@ jobs:
118118
- if: matrix.build-mode == 'manual' && matrix.language == 'swift'
119119
shell: bash
120120
run: |
121-
swift package resolve
122-
swift build
121+
# Build for macOS
122+
xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "XLKit-CI" -destination "generic/platform=macOS,name=Any Mac" | xcbeautify && exit ${PIPESTATUS[0]}
123+
# Build for iOS (if available simulators found)
124+
if xcodebuild -showdestinations -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "XLKit-CI" | grep -q "iOS Simulator"; then
125+
xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "XLKit-CI" -destination "generic/platform=iOS Simulator,name=Any iOS Device" | xcbeautify && exit ${PIPESTATUS[0]}
126+
else
127+
echo "No iOS simulators found, skipping iOS build"
128+
fi
123129
124130
- name: Perform CodeQL Analysis
125131
uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)