codeql: upgrade from v3 to v4 #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "CodeQL" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| XCODEBUILD_DESTINATION: iPhone 15 Pro | |
| XCODEBUILD_OS: 17.2 | |
| jobs: | |
| analyze: | |
| name: Analyze | |
| runs-on: macos-14 | |
| permissions: | |
| security-events: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: [ "swift", "c-cpp" ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Check for changed files | |
| uses: dorny/paths-filter@v3 | |
| id: changes | |
| with: | |
| filters: | | |
| src: | |
| - 'Example/**' | |
| - 'Sources/**' | |
| - 'Tests/**' | |
| - 'UITests/**' | |
| - name: Initialize CodeQL | |
| if: steps.changes.outputs.src == 'true' | |
| uses: github/codeql-action/init@v4 | |
| with: | |
| languages: ${{ matrix.language }} | |
| - name: Build | |
| if: steps.changes.outputs.src == 'true' | |
| run: | | |
| set -o pipefail &&\ | |
| xcodebuild\ | |
| -scheme Runestone\ | |
| -sdk iphonesimulator\ | |
| -destination "platform=iOS Simulator,name=${{ env.XCODEBUILD_DESTINATION }},OS=${{ env.XCODEBUILD_OS }}"\ | |
| | xcbeautify --renderer github-actions | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v4 | |
| if: steps.changes.outputs.src == 'true' | |
| with: | |
| category: "/language:${{matrix.language}}" |