Skip to content

Commit

Permalink
Fix CodeQL workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
okhan-okbay-cko committed Apr 3, 2024
1 parent 180bc46 commit 7d584f0
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 6 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,17 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
destination: "platform=iOS Simulator,name=iPhone 15 Pro,OS=latest"
configuration: "Debug"
noIndex: "COMPILER_INDEX_STORE_ENABLE=NO"
noSigning: "CODE_SIGNING_ALLOWED=NO"
versionXcode: "15.3"

jobs:
analyze:
name: Analyze
runs-on: [ macos-latest ]
runs-on: [ macos-13-xl ]
permissions:
actions: read
contents: read
Expand All @@ -33,6 +40,14 @@ jobs:
matrix:
language: [ 'swift' ]

- name: Select Xcode
run: |
sudo xcode-select -switch /Applications/Xcode_${versionXcode}.app
- name: Log xcodebuild Version
run: |
xcodebuild -version
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -48,21 +63,25 @@ jobs:

- name: Build Frames
run: |
xcodebuild -scheme Frames -destination "platform=iOS Simulator,name=iPhone 14 Pro,OS=latest"
xcodebuild -scheme Frames -destination "${destination}" "${noIndex}" "${noSigning}" | xcpretty
- name: Build CheckoutTests
run: |
xcodebuild -scheme CheckoutTests -destination "${destination}" "${noIndex}" "${noSigning}" | xcpretty
- name: Build FramesTests
run: |
xcodebuild -scheme FramesTests -destination "platform=iOS Simulator,name=iPhone 14 Pro,OS=latest" test
xcodebuild -scheme FramesTests -destination "${destination}" "${noIndex}" "${noSigning}" | xcpretty
- name: Build iOS Example Frame SPM
run: |
cd iOS\ Example\ Frame\ SPM
xcodebuild build -scheme iOS\ Example\ Frame -destination "platform=iOS Simulator,name=iPhone 14 Pro,OS=latest"
xcodebuild build -scheme iOS\ Example\ Frame -destination "${destination}" "${noIndex}" "${noSigning}" | xcpretty
- name: Build UITest
run: |
cd iOS\ Example\ Frame\ SPM
xcodebuild -scheme UITest -destination "platform=iOS Simulator,name=iPhone 14 Pro,OS=latest"
xcodebuild -scheme UITest -destination "${destination}" "${noIndex}" "${noSigning}" | xcpretty
# Perform analysis on the code
- name: Analyze code with CodeQL
Expand Down
11 changes: 10 additions & 1 deletion .swiftpm/xcode/xcshareddata/xcschemes/CheckoutTests.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
Expand Down Expand Up @@ -53,6 +53,15 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CheckoutTests"
BuildableName = "CheckoutTests"
BlueprintName = "CheckoutTests"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
25 changes: 25 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/FramesTests.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FramesTests"
BuildableName = "FramesTests"
BlueprintName = "FramesTests"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
Expand Down Expand Up @@ -42,6 +58,15 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FramesTests"
BuildableName = "FramesTests"
BlueprintName = "FramesTests"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down

0 comments on commit 7d584f0

Please sign in to comment.