Repository navigation
64 lines (64 loc) · 1.74 KB
/
Copy pathcodeql.yml
File metadata and controls
64 lines (64 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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:
DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer
jobs:
analyze:
name: Analyze
runs-on: macos-15
permissions:
security-events: write
strategy:
fail-fast: false
matrix:
language: [ "swift", "c-cpp" ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Check for changed files
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
src:
- '.github/workflows/codeql.yml'
- 'Package.swift'
- '.gitmodules'
- 'tree-sitter'
- 'Example/**'
- 'Sources/**'
- 'Tests/**'
- 'UITests/**'
- name: Install xcsift
if: steps.changes.outputs.src == 'true'
run: brew install xcsift
- name: Initialize CodeQL
if: steps.changes.outputs.src == 'true'
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Build
if: steps.changes.outputs.src == 'true'
run: |
set -o pipefail &&\
xcodebuild\
-scheme Runestone\
-sdk iphonesimulator\
-destination 'generic/platform=iOS Simulator' \
2>&1 | xcsift -f toon
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
if: steps.changes.outputs.src == 'true'
with:
category: "/language:${{matrix.language}}"